Skip to content

Commit 20bcaee

Browse files
justin808claude
andcommitted
Improve CI status checking guidance with timeline analysis
Show how to determine if failures are from your changes by: 1. Checking if master is passing 2. Viewing PR branch CI history with timestamps 3. Comparing failure start times vs your commit times This answers the critical question: "Did my changes introduce these failures?" Real example from today: - My commits: c124df6 (06:22), 555770d (06:35) - Integration Tests failures started: 851d5ee (07:59) - Conclusion: Failures started AFTER my commits 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent a7cda9c commit 20bcaee

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,25 @@
1717
**CRITICAL: Before investigating failures, check if they're pre-existing:**
1818

1919
```bash
20-
# Get the commit SHA before your changes
21-
git log --oneline -20 | grep "your-branch-base"
20+
# 1. Check if master is passing for the same workflow
21+
gh run list --workflow="Integration Tests" --branch master --limit 5 --json conclusion,createdAt --jq '.[] | "\(.createdAt) \(.conclusion)"'
2222

23-
# Check CI status for that commit
24-
gh run list --commit <SHA> --json conclusion,workflowName
23+
# 2. Check your PR branch history for this workflow
24+
gh run list --workflow="Integration Tests" --branch your-branch --limit 10 --json conclusion,headSha,createdAt --jq '.[] | "\(.createdAt) \(.headSha[0:7]) \(.conclusion)"'
2525

26-
# Compare to current commit
27-
gh run list --commit HEAD --json conclusion,workflowName
26+
# 3. Find when failures started vs when your commits were made
27+
git log --oneline --all | grep your-commit-sha
2828

29-
# Or check PR status changes over time
29+
# 4. Check all failing workflows on current PR
3030
gh pr view --json statusCheckRollup | jq '.statusCheckRollup[] | select(.conclusion == "FAILURE") | .name'
3131
```
3232

33+
**Key Questions to Answer:**
34+
35+
1. **Is master passing?** If yes, the failures are PR-specific
36+
2. **When did failures start?** Compare timestamps of failing runs vs your commits
37+
3. **Did your commits introduce the failures?** If failures started AFTER your commits, they're not from your changes
38+
3339
**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.
3440

3541
## Mandatory Testing After ANY Changes

0 commit comments

Comments
 (0)