Skip to content

Commit a7cda9c

Browse files
justin808claude
andcommitted
Add guidance on using GH CLI to check if failures are pre-existing
Before investigating test failures, always check if they existed before your changes using gh CLI: - Check CI status for commits before your changes - Compare to current HEAD to see if your changes introduced failures - Don't waste time debugging pre-existing issues This prevents the mistake of asking "are these failures from my changes?" when GH CLI can answer that question definitively. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e8f6ce2 commit a7cda9c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.claude/docs/testing-build-scripts.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
- If these fail, users can't install or use the package
1313
- Failures are often silent - they don't show up in normal CI
1414

15+
## Before You Start: Check CI Status
16+
17+
**CRITICAL: Before investigating failures, check if they're pre-existing:**
18+
19+
```bash
20+
# Get the commit SHA before your changes
21+
git log --oneline -20 | grep "your-branch-base"
22+
23+
# Check CI status for that commit
24+
gh run list --commit <SHA> --json conclusion,workflowName
25+
26+
# Compare to current commit
27+
gh run list --commit HEAD --json conclusion,workflowName
28+
29+
# Or check PR status changes over time
30+
gh pr view --json statusCheckRollup | jq '.statusCheckRollup[] | select(.conclusion == "FAILURE") | .name'
31+
```
32+
33+
**Don't waste time debugging pre-existing failures.** If the tests were already failing before your changes, document this and focus on your actual changes.
34+
1535
## Mandatory Testing After ANY Changes
1636

1737
**If you modify package.json, package-scripts.yml, or build configs:**

0 commit comments

Comments
 (0)