Skip to content

Commit 894d0ce

Browse files
justin808claude
andcommitted
docs: Update CI polling guidance to use 30-second intervals
Update documentation to explicitly recommend 30-second polling intervals when waiting for CI, rather than 180 seconds. This matches the existing behavior in bin/ci-rerun-failures script. Added new "Polling CI Status While Waiting" section to master-health-monitoring.md with: - Example polling loop using sleep 30 - Reference to bin/ci-rerun-failures which already uses 30s intervals - Rationale for why 30s is preferred over 180s Updated avoiding-ci-failure-cycles.md to: - Include example polling loop in the "After Pushing" section - Emphasize the importance of 30-second vs 180-second polling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e906ebf commit 894d0ce

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.claude/docs/avoiding-ci-failure-cycles.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,14 @@ Tested with:
201201
**After Pushing**:
202202

203203
```bash
204-
# Within 30 minutes: Check CI status
205-
gh pr view --json statusCheckRollup
204+
# Poll CI status every 30 seconds until completion
205+
while true; do
206+
gh pr view --json statusCheckRollup --jq '.statusCheckRollup | group_by(.conclusion) | map({conclusion: .[0].conclusion, count: length})'
207+
sleep 30
208+
done
209+
210+
# Or use the automated tool (polls every 30s):
211+
bin/ci-rerun-failures
206212

207213
# If failures occur:
208214
# 1. Check if they're new (not pre-existing)
@@ -211,6 +217,8 @@ gh pr view --json statusCheckRollup
211217
# 4. Don't push "hopeful" fixes
212218
```
213219

220+
**IMPORTANT: Poll every 30 seconds, NOT 180 seconds.** CI jobs typically complete in 3-15 minutes, so 30-second polling gives responsive feedback.
221+
214222
**See**: [master-health-monitoring.md](master-health-monitoring.md)
215223

216224
## Red Flags: When to STOP and Test More

.claude/docs/master-health-monitoring.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@ Within 30 minutes of your PR merging to master:
2121
- Don't assume "someone else will fix it"
2222
- You are responsible for ensuring your PR doesn't break master
2323

24+
## Polling CI Status While Waiting
25+
26+
**When actively monitoring CI, poll every 30 seconds (not 180 seconds):**
27+
28+
```bash
29+
# Poll every 30 seconds while CI is running
30+
while true; do
31+
gh pr view --json statusCheckRollup --jq '.statusCheckRollup | group_by(.conclusion) | map({conclusion: .[0].conclusion, count: length})'
32+
sleep 30
33+
done
34+
```
35+
36+
Or use the automated tool which polls at 30-second intervals:
37+
38+
```bash
39+
bin/ci-rerun-failures # Automatically waits for in-progress CI, polling every 30s
40+
```
41+
42+
**Why 30 seconds?**
43+
44+
- CI jobs typically complete in 3-15 minutes
45+
- 30-second polling gives responsive feedback without excessive API calls
46+
- 180 seconds (3 minutes) is too slow—you waste time waiting unnecessarily
47+
- GitHub API rate limits are 5000 requests/hour, so 30-second polls are fine
48+
2449
## When You Discover Master is Broken
2550

2651
1. **Determine if it's from your PR:**

0 commit comments

Comments
 (0)