You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add CI check retry logic to prepare-release script (#337)
The `gh pr checks --watch` command fails immediately when CI checks
haven't registered yet after PR creation. Add a retry loop (5 attempts,
15s between) that detects "no checks reported" and waits. Also update
the skill docs with benchmark timing data (mean 10.3 min across 10
releases) and background mode requirement.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/prepare-release/SKILL.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,22 +137,25 @@ After all agents complete:
137
137
138
138
> ⚠️ **CRITICAL:** Use the prepare script. Do NOT run these commands manually.
139
139
140
-
After all agent work is committed, from the repository root run:
140
+
After all agent work is committed, from the repository root run the script **in background mode** (`run_in_background: true`):
141
141
142
142
```bash
143
143
.claude/scripts/prepare-release.sh <version>
144
144
```
145
145
146
+
> **Timing:** The script takes ~13-15 minutes total (CI benchmarks ~10.3 min + CI checks ~3 min + overhead). This exceeds the Bash tool's 10-minute max timeout, so it **must** run in background mode. Use `TaskOutput` with `block: true, timeout: 600000` to wait, and re-check if it times out — the script is idempotent and can be re-run safely.
147
+
146
148
The script handles:
147
149
148
150
-**Phase 4:** Push branch, trigger CI benchmarks, wait for completion, pull results
149
-
-**Phase 5:** Create PR, wait for CI checks, merge with `--admin`, switch to main
151
+
-**Phase 5:** Create PR, wait for CI checks (with retry for check registration delay), merge with `--squash --admin`, switch to main
150
152
-**Phase 6:** Generate release notes, save to temp file, display for review
151
153
152
154
If the script fails partway through, check the error message. You can re-run safely:
153
155
154
156
-`--skip-benchmarks` flag if benchmarks already completed
155
157
- The script auto-detects already-merged PRs and skips to checkout
158
+
- CI check registration delay is handled with automatic retries (up to 75s)
156
159
157
160
### Phase 6.2: Enhance Release Notes
158
161
@@ -264,4 +267,6 @@ If user chooses "Yes", from the repository root run:
264
267
- CI benchmarks run on the pre-release branch and are included in the PR
265
268
- Document all new public API in CLAUDE.md
266
269
-**ALWAYS use scripts** for phases 4-6 - never run release commands manually
270
+
-**ALWAYS run scripts in background mode** - the prepare script takes ~13-15 min (exceeds Bash 10-min max timeout)
267
271
-**ALWAYS enhance release notes** (Phase 6.2) - never skip to publishing with auto-generated notes only
272
+
-**If the script fails at Phase 5.3** (CI checks), it's often a timing issue — re-run the script (it's idempotent) or manually run `gh pr checks <PR#> --watch` then merge
0 commit comments