fix(ship): restart empty CI launches once - #2137
Conversation
There was a problem hiding this comment.
Changes requested: The refire recovery can strand the pull request closed when the reopen request fails.
Warning
Changes requested · head cc9fd12 · 1 finding: 1 major
| Severity | Finding | Where |
|---|---|---|
| major | F1 Spec contradiction — docs/reference/specs/agent-ship.md item 9: a failed reopen can leave the pull request closed | src/execution/githubPulls.ts:226 |
Full review
F1: If the close PATCH succeeds but the reopen PATCH returns 503 or times out, refirePullRequestEvent returns false while leaving the pull request closed. The coordinator then permanently spends its single refire attempt, so the pipeline cannot recover and may stop on the closed PR. Retry or otherwise guarantee the reopen after a successful close; update the partial-failure test to prove the PR is restored to open.
7cd8c68 to
0dff9b0
Compare
Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
0dff9b0 to
35ca0dc
Compare
There was a problem hiding this comment.
LGTM: The reopen recovery now keeps the durable refire step incomplete until the pull request is restored open, resolving F1.
Note
Approved · head 35ca0dc · no findings
Full review
F1 is resolved: failed reopen attempts now leave the durable Workflow step incomplete for retry rather than spending the refire while the pull request remains closed. No new findings.
The ship runner restarts an empty required-check launch once, while the state Worker test pool no longer leaks Workflow or alarm work between cases. This makes CI recoverable without letting a partial close/reopen leave the pull request closed.
Why: Issue #2119 showed random state Worker failures and ship rounds that could not recover empty CI launches. Record 0055 makes checks part of the round, so PR #2137 closes both failure paths.
Where to look
Feedback wanted: Please focus on the reopen failure boundary delegated to Workflow retries, and whether the Worker test cleanup fully closes every cross-case asynchronous boundary.
Risk: 459 changed lines. A mistake can strand a pull request closed or weaken state Worker test fidelity; revert the commit to roll back. Splitting Worker isolation from ship recovery was considered, but both close issue #2119's CI-flake loop.
Verified: Scoped gates passed; CI bot, Worker, package, docs, web, image, and title checks are green. CodeQL analysis remains in progress.
Decisions (4)
Validation (9 criteria)
For agents
Head 35ca0dc is one coherent commit rebased onto origin/main e392e08. Review fix F1 is in src/execution/githubPulls.ts and its adjacent tests. CI on prior heads exposed test-only package assets and a still-live one-millisecond alarm RPC; both boundaries now have direct tests.
Requested by @justinhelmer in slack:C0BRRHKFLCB
🤖 Generated with Claude Code