fix(ship): bind recovered pull requests before review - #2346
Merged
Merged
Conversation
Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
coreplane-switchboard
Bot
requested a review
from justinhelmer
as a code owner
September 24, 2026 15:57
Contributor
Author
There was a problem hiding this comment.
LGTM: The durable publication binding is now established atomically and fail-closed before review or findings work begins.
Note
Approved · head cd141bb · no findings
Full review
No findings. The atomic publication-binding transition and whole-path regression coverage satisfy the contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ship now records one complete publication authority before any newly opened pull request reaches review. That keeps later findings work on the original unit, branch, and owner instead of failing at the publication fence.
Why: A recovered PR could advance with only its number persisted, so an ordinary request-changes verdict later failed at #2341. This is the bounded new-PR repair after #2342; retained-unit recovery remains separate under #2265.
Where to look
Feedback wanted: Check that ownership acquisition, full-row CAS, and conditional release form one fail-closed transition across every ordinary PR-discovery path.
Risk: A mistake can block review or authorize later coding against stale PR facts. This is about 550 changed lines; storage and coordinator changes stayed together because splitting them would leave the atomic contract temporarily unproved. Roll back this commit to restore the prior guard behavior.
Verified: 563 dispatcher tests and scoped format, type, hygiene, and spec checks passed; exact-head review is approved. all current-head CI passed, including the recovered memory-worker job.
Decisions (3)
Validation (6 criteria)
src/channels/adminCoordinator.test.ts::a completed child's production read-record view carries its observed final head, so same-head salvage opens the pull request and enters reviewsrc/channels/adminCoordinator.test.ts::ordinary open pull-request binding refuses every incomplete or mismatched remote fact without starting reviewsrc/channels/adminCoordinator.test.ts::a refused ownership claim, an unknown fence, a stale row and an unavailable store all release only this attempt's owner and store no PR-only rowsrc/channels/adminCoordinator.test.ts::the exact publication binding replays idempotently without releasing the retained ownerdeploy/cloudflare-memory/runLedger.test.ts::the full-row CAS atomically binds an ordinary open pull request and rejects a stale PR-only writeFor agents
This PR covers only ordinary newly discovered PRs. Do not infer support for CLI#113, Switchboard#2338, nominal#3589, nominal#3680, generic Ship reissue, moved-head review, or any replacement instance/unit/ref.