Repository navigation
fix(sync): never lose a PostgreSQL forward between the ref CAS and its push run - #679
Conversation
…h-lane schedule Model-checks the ADR-50 push lane (SQLite and S3-WAL) against git pushes, push-upstream calls, runs, steals, retries, restores, crashes and shutdown. Nine code facts tie the model to both backends and the worker; fingerprints in the lane-schedule-fingerprints CI job flag covered-code changes. The NoCompletionAssumption probe records two findings: a push that dies after its authority CAS can lose its forward. Change-Id: I07baac11eba4d51333064aa0fb5e90dd84e48653 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…e model variables Change-Id: Iafc903e2e9a284d33bd0cb076b93f5c621837eb2 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…print the push-hold path Codex round 1 on #675: fingerprint the push-hold lifecycle, both refspec vars and LocalScheduler.Start; model pushes that record no intent; state that ref deletions are not forwarded by design. The model now counts a write as owed at its CAS, adds REST writes (OtherWriters.cfg) and a HeldRefsFresh probe that fails with no fault. Change-Id: I863914ac2567ec75ba1b8f92a9b68663b3816c6d Signed-off-by: Thomas Kosiewski <tk@coder.com>
On PostgreSQL a River push run on the node that took the push can snapshot the cache before receive-pack publishes the pushed ref, and a hook that loses its CAS outcome after the commit records no forward intent. Both tests fail on this commit: the upstream never gets the accepted main. Change-Id: Ia41ff2be8d3b15ff159e7531f8955a667355b237 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…pshots A git push's River job exists from its authority CAS on, before receive-pack publishes the cache ref. A push run on the same node could claim it, snapshot the cache while the push's hold kept the old value, forward that, and end done: the accepted push never reached the upstream. River push runs now call the publication wait after the claim, like local runs. A failed wait hands the request back with RestorePush and fails the run, so the job's completion gate snoozes it. Fixes TestPGHookForwardBeforeCachePublication. Change-Id: I5c7fc02af849c5fe27d90e121156e1b29d6d4c4d Signed-off-by: Thomas Kosiewski <tk@coder.com>
…EST CAS On PostgreSQL a REST write records forward intent only after its ref CAS commits. A serve process that dies between the two leaves the accepted write with no push job. The test fails on this commit. Change-Id: I4f1721fdef341cf8834e00c5a79a87f484afa930 Signed-off-by: Thomas Kosiewski <tk@coder.com>
On PostgreSQL a write to a forward_on_push repository recorded its forward intent (push_pending and the River push job) only after the ref CAS committed. A hook or serve process that died in between, or a failed RequestPush or EnqueuePush, left the accepted write with no intent, and nothing on PostgreSQL scans for it. Metadata and refs share one PostgreSQL database, so the CAS now writes the intent in its own transaction: ref.WithCASTxHook runs a hook after a won swap statement and before COMMIT, and the serve and hook wiring set it for every write the sync poke forwards. The pending level, the push job and the ref commit together or not at all. The after-CAS poke stays, for old replicas during a rolling upgrade and for wins recovered from another caller's identical write. Fixes TestPGHookForwardAfterLostCASOutcome and TestServeRecordsForwardIntentWithTheCAS. Change-Id: I18b0962ee614728adffac868277ab8164c8ce97a Signed-off-by: Thomas Kosiewski <tk@coder.com>
…saction Change-Id: Ib7dd1c7257f42c1f6a65197cfb066cec9616b9a9 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…efore the poke The CAS transaction now inserts the push job, so a River run can claim it before the decorator's after-CAS sync poke runs. The poke then marks push_pending again, and the job's completion schedules a second forward run with its own repo.push_upstream events. The new subtest fails on this commit (PushPending:1 after the claim). Change-Id: Id72e26deed6ab966bbc467120b2295901d8efae2 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…e job first The sync poke after a PostgreSQL CAS re-marked a forward that the CAS transaction had already recorded. When a run claimed the new job before the poke, that scheduled a second forward run. The CAS hook now reports through ref.CASTxHook.Committed that its committed transaction recorded the intent, and the poke skips the forward then. A win that ref.IdempotentCAS recovered still gets the poke. RecordForwardTx now inserts the push job before it marks push_pending. It used to hold the upstream row while it waited for a job row held by the job's completion transaction, which reads that row through another pool. With that pool full of statements waiting on the row, neither side could move, and PostgreSQL cannot see that cycle. Fixes TestServeRecordsForwardIntentWithTheCAS/claimed_before_poke; adds TestRiverRecordForwardTxWaitsForJobBeforeUpstreamRow. Change-Id: Id5c9241b5b84457fbe41988cc62e57a2a30bd9ef Signed-off-by: Thomas Kosiewski <tk@coder.com>
… River publication wait A River push run whose publication wait the shutdown drain cancelled restored its request through the 30-second detached finish instead of the short shutdown restore that a cancelled transfer uses. It now uses restoreForShutdown and returns ErrShutdown, so River keeps the job. TestRiverPushRestoredRunSnoozesForRetry pins that the job of a run that restored its request after a failed wait snoozes and runs again. Change-Id: I4c97e34e77aa6812b2949a34cee0d96358cc6867 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I008f14e5ef848e5505344bebcf6288b8e3bec719 Signed-off-by: Thomas Kosiewski <tk@coder.com>
… caller's write Change-Id: Id162f732f5606bf1f0157e29aa2a6425c5039415 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…inish Two River push runs end with their claim held and the request they consumed: a run whose publication-wait restore the shutdown drain cancels returns an error without ErrShutdown, and a run whose finish or restore write fails returns a plain error. The push job's completion gate then completes the job, and nothing forwards the request. Both new tests fail on this commit. Change-Id: Id0fdef5b68c69bfebd9e5177657e4523f9035505 Signed-off-by: Thomas Kosiewski <tk@coder.com>
… held A River push run whose finish or restore write failed returned a plain error with its claim still held and the request it had consumed, and the job's completion gate completed the job. The gate now snoozes such a job until the claim's lease runs out; the re-run steals the claim and its force level, and forwards. A run that the shutdown drain cancels during its publication-wait restore now also returns ErrShutdown, so River keeps that job too. Fixes TestPushRunShutdownDuringFailedWaitRestoreKeepsJob and TestRiverPushFailedFinishKeepsJobUntilClaimExpires. Change-Id: I7eb270392d85832ea7b510eb3dd331bca0ee46d0 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…ead or completion The completion gate keeps a push job whose failed run left its claim held only when that same Work call saw the run fail and read the row before the run. When the pre-run read fails, or when the first completion fails and the re-run meets the unexpired claim, the gate completes the job and the consumed request is lost. Both new subtests fail on this commit. Change-Id: I7e7b8b8a6012adf537cd91c54e2d8fdffdd4c70e Signed-off-by: Thomas Kosiewski <tk@coder.com>
Only the push job runs a repository's push lane, so a claim still held at completion belongs to one of the job's own runs whose finish or restore failed, or that died, and it holds the request it consumed. The completion gate now snoozes the job until the lease can be stolen whatever this Work call saw, instead of only when it saw the run fail and knew the run count. Fixes TestRiverPushFailedFinishKeepsJobUntilClaimExpires subtests pre_run_read_fails and completion_fails_once. Change-Id: I0b69741189f40561b874cb313fec0436a11e55e3 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Also correct the shutdownSnooze and RecordForwardTx docs. Change-Id: Ida509a3c433a7cc4b746c6621ef89e1868414704 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…im held The gate snoozes a push job while its push claim is held, so that the re-run can steal the claim. A run for a repository deleted while queued returns before it claims, so nothing stole the claim, and the job snoozed every 5 seconds forever. On the River lane RunPush now returns ErrRepoGone for a deleted repository, and the push worker completes the job on it. Also correct the pushWorker and RecordForwardTx docs. Change-Id: I7345fd33816f75cf1d1725592507c742f2d77af3 Signed-off-by: Thomas Kosiewski <tk@coder.com>
… log no warning for a deleted repo's run Change-Id: I892bc4f7a4d8cba5b77ed9d4ad4e76543473342d Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I5b2a152ddfdc740e0956b9e08d1d309eb31c5d31 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: Ia945d392c7b59bf3485df519eff43e8b319d86e6 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…SQL forward fix The covered functions that changed (buildServeEventing, wireHookEventing, Worker.waitPublication, Worker.RunPush, ErrRepoGone) changed only on their PostgreSQL and River branches. The local schedule the model describes is unchanged, and check.sh passes. Change-Id: Ib7ff1062c8c9b67db8b7917d3d24debd56fd27ab Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I97768bca03a2121d6725a7a5849329047193d7a9 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
A verifier mutated four guards of the forward-intent fix and every test stayed green. Each now has a test that fails under its mutation: - TestPGCASTxHookCommitsWithSwap: a COMMIT that fails on a deferred constraint after the hook ran must not run Committed. - TestServeRecordsForwardIntentWithTheCAS: an ephemeral ref, and a write under the repo's +ephemeral key, record no forward intent. - TestRiverRecordForwardTxSkipsReposThatDoNotForward: a repository whose link does not forward, or that has no link, gets no push job and no pending level. - TestHookRecordsNoForwardForSyncLoopbackPush: a sync run's own loopback push records no forward intent in the hook's CAS. Change-Id: I279809bcb8aef983024950c2d4a51f235fff445c Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7845ac9526
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
On PostgreSQL, a push whose COMMIT reply was lost reported failure and dropped its push event, although the ref moved. pgx v5.11 reports that loss as a request never sent: MultiResultReader.NextResult drops the read error of peekMessage, which has already closed the connection, so the next receiveMessage returns connLockError "conn closed", and SafeToRetry is true for it. ref.IdempotentCAS then took the failure as definitive and never rechecked the ref. A swap that changed a row now reads txid_current() before COMMIT. When COMMIT fails, the CAS asks txid_status on another pooled connection, waiting at most 5 s while the transaction is in progress. Committed is a win and runs CASTxHook.Committed, so the forward-intent poke sees the recorded forward and does not schedule a second forward run. Aborted is definitive. An outcome PostgreSQL cannot confirm is marked ambiguous, so IdempotentCAS rechecks the ref. internal/testutil/pgfault is a TCP proxy that loses, drops, or holds the next COMMIT for these tests. Change-Id: I99076d2bb367457c946500bf1fe877ba06322f60 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…closes A CAS that fails at once could see the closed connection before Fired was set, so CutAll and HoldCommit read as "never fired" on code that does not wait for the outcome. Change-Id: I4191e8286e52df79b2f47ec758e3a247722d2dc0 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I86e9db5e82af432f565ddd5016a0f9b6d32bea1e Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I87e8b2995d4f768c0d8a4b4b67a62615aa57504f Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…come casRef kept its pool connection while commitStatus asked the pool for another one. With pool_max_conns=1, or a full pool, a lost COMMIT reply waited the whole 5 s budget and came back ambiguous, so Committed never ran and the forward poke ran after the recovered win. The connection is closed after a failed COMMIT, so casRef now returns it to the pool first. pgfault now marks every fault fired before it closes any connection: DropCommit and CutAll closed the server side first, and the relay could close the client side before Fired was set. A new DelayCommit fault commits 300 ms late. TestPGCASResolvesFailedCommit adds a one-connection pool, a late COMMIT (the in-progress loop and the 5 s budget), a context that ends with the fault (the detached status context), and a swap that changed no row (the pass-through). Change-Id: I62aa6a71be0d2547d5cf3fa65aae76010b8edbcb Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I4f2e40ee912d755c05273f34e4dcb8e247bb06da Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Change-Id: Ib57fdfb972853f6f778efdd69495112629eb8181 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Why
Every accepted write to a
forward_on_pushrepository must reach the upstream, and no crash window may silently lose a forward. On PostgreSQL, accepted git pushes and REST writes could miss the upstream in four ways. Nothing polls the upstream, so a lost forward stayed lost until the next authorized write orpush-upstreamcall. This PR fixes all four. SQLite and S3-WAL behave as before.On PostgreSQL, a push whose COMMIT reply is lost reports failure and drops its push event, although the ref moved. Main has this bug too. The forward-intent hook needs the real outcome of its COMMIT, so this PR fixes it as well (item 5).
What was broken
enqueueSyncOrForward) ranRequestPushandEnqueuePushas two more statements. A hook or serve process that died in between, or a failedRequestPushor enqueue, left the write with nopush_pendingand no River job. Nothing on PostgreSQL scanspush_pending: River's rescuer and the push job's completion gate act only on a job that exists.FinishPush(or, with item 2,RestorePush) failed after its retries kept its claim and the request it had consumed, and the push job completed. Nothing re-ran it.repo.push_upstream.*events.MultiResultReader.NextResultdrops the read error ofpeekMessage, which has already closed the connection, so the nextreceiveMessagereturnsconnLockError"conn closed", and pgconn'sSafeToRetryis true for it.ref.IdempotentCAStook that as a request never sent and did not recheck the ref, although thecasRefcomment said that a lost COMMIT reply stays ambiguous. When the loss did read as ambiguous (for example, when the request context ends during COMMIT, pgx returns a context error), the recovered win never ranCommitted, so the poke marked the level again and could start a second forward run (Codex review, round 2).Fix
The CAS transaction records the intent.
ref.WithCASTxHookrunsInTxafter a won swap statement and before COMMIT, andCommittedafter COMMIT succeeds. AnInTxerror rolls the swap back and is marked not executed, soref.IdempotentCASdoes not recover it. On PostgreSQL, serve and the hook build their events decorator withnewPGEventsStore(cmd/openstorage/wire_eventing_pg.go). It sets the hook for every write that the poke forwards: refs outside the ephemeral namespace, by a caller that may forward, and not a sync run's own loopback push. The hook callsjobs.River.RecordForwardTx, which readsforward_on_push, inserts the same unique-by-repoupstream_pushjob asEnqueuePush, and then raisespush_pending, all in the CAS's transaction. Metadata and refs share one PostgreSQL database, so the ref, the job and the pending level commit together or not at all.The poke skips a forward that the committed CAS recorded.
Committedmarks a per-CAS record in the context, and the poke returns early for it. A win thatIdempotentCASrecovered (another caller's identical write, or a COMMIT outcome that PostgreSQL could not confirm) still gets the poke.River push runs wait for publication.
buildServeEventingwiresworker.WaitPublicationon PostgreSQL asbuildLocalSyncQueuedoes, andRunPushcalls it after the claim on both lanes. Holds are per node, and the run's loopback fetch reads its own node's cache, so its own node's holds are the ones that matter. A failed wait hands the request back withRestorePushand fails the run, so the job snoozes. Under shutdown the run restores within the shutdown budget and returnsErrShutdown, so River keeps the job.The push gate never completes a job while a push claim is held. Push jobs are unique by repo, so a held claim belongs to one of the job's own runs (or an older binary's) and holds a consumed request. The job snoozes until the lease ends, and its re-run steals the claim with its force level. A run for a deleted repository returns
ErrRepoGone, and its job completes.The CAS asks PostgreSQL for the outcome of a failed COMMIT. A PostgreSQL swap that changed a row reads
txid_current()before COMMIT. When COMMIT fails,casRefreturns its connection to the pool, so the status query also works in a pool of one, then askstxid_statuswith a detached context, and asks again while the transaction is in progress, for at mostcommitStatusTimeout(5 s).committedis a win, andCommittedruns, so the poke skips the recorded forward.abortedis a definitive failure. When the status query fails, or the transaction is still in progress at the timeout, the error is marked ambiguous (commitUnknown, neverSafeToRetry), andIdempotentCASrechecks the ref as before. The vendored pgx is unchanged. Tests inject the faults withinternal/testutil/pgfault, a TCP proxy that loses, drops or holds the next COMMIT.River interplay. The vendored River v0.50.0 unique insert is
ON CONFLICT (unique_key) ... DO UPDATE, so it row-locks a live job. The push worker's completion transaction updates that row first (JobCompleteTx). Either the CAS locks the job first, and the completion waits for the CAS commit, reads the newpush_pendingand inserts a successor. Or the completion commits first, and the CAS's insert joins its successor or adds a new job. The job is inserted before the upstream row is marked. The completion reads that row through the metadata pool, so a CAS must not hold the row while it waits for the job.Rolling upgrade. No schema change, no new column, the same job kind and args. Old replicas keep their after-CAS poke, so their writes keep the old window until the fleet runs this build. Old and new workers run each other's jobs. Rollback is safe.
Cost per PostgreSQL write. Every PostgreSQL swap that changes a row runs one more statement,
SELECT txid_current(). A hooked swap also readsforward_on_pushby primary key. A failed COMMIT of such a swap addstxid_statusqueries for at most 5 s. Forforward_on_pushrepositories, the job insert and thepush_pendingupdate move into the CAS transaction, and the poke's three statements no longer run. A CAS that meets a live job waits for that job's completion transaction. Push runs list the node's push-hold directory once.Not covered here
verify-lane-scheduleskill (a hold reserved by a stale-advertisement push after a run's wait passed) also applies to PostgreSQL. River runs now call the same wait and snapshot code as local runs. fix(sync): record git forward intent before the CAS and refuse stale held snapshots #678's strict held snapshot is not enough for them alone: fix(sync): record git forward intent before the CAS and refuse stale held snapshots #678 turnsStrictSyncFetchon only for the local schedule and restores only whenw.Localis set. A follow-up PR in this run turns it on for PostgreSQL and restores the run throughRestorePush.syncRescueAttempts), which can leavepush_pendingor a held claim with no job. A follow-up PR adds a periodic scan that gives such a lane a new job.FinishSync, which includes the mirror-back pull after a forward. A follow-up PR applies item 3's rule to the sync gate.txid_statusquery that fails or still reads "in progress" after 5 s, then anIdempotentCASrecheck that finds the new value.Committeddoes not run then, so the poke markspush_pendingagain, and a run that claimed the job meanwhile is followed by a second run. That run pushes nothing new, but it emits duplicaterepo.push_upstream.*events. Skipping the poke in this case could lose a forward instead, so the poke runs.Tests
Each reproduction fails on the commit before its fix:
TestPGHookForwardBeforeCachePublicationinternal/githttp, PostgreSQL lane, real serve binaryPushRunCount:1 PushSuccessCount:1), and the upstream main stayed emptyTestPGHookForwardAfterLostCASOutcomeinternal/githttp, PostgreSQL laneEnvCASDropHardlost the outcome.PushPending:0 PushRunCount:0, upstream main emptyTestServeRecordsForwardIntentWithTheCAS/may_forwardcmd/openstorageTestServeRecordsForwardIntentWithTheCAS/claimed_before_pokecmd/openstoragePushPending:1after a run claimed the new jobTestPushRunShutdownDuringFailedWaitRestoreKeepsJobinternal/syncErrShutdownTestRiverPushFailedFinishKeepsJobUntilClaimExpiresinternal/jobsplain), ff29ff5 (pre_run_read_fails,completion_fails_once): no re-run stole the held claimTestPGCASResolvesFailedCommitinternal/reflost-replyreturnedcommit: conn closedwhile the swap committed (generation 2);in-progressandstatus-query-failsreturned a definitive errorTestServeSkipsPokeAfterLostCommitReplycmd/openstorageCASRefreturnedcommit: conn closedafter the server committed the swap and a run claimed its jobOther new tests:
TestPGCASTxHookCommitsWithSwap(internal/ref, including a COMMIT that fails after the hook ran),TestRiverRecordForwardTxWaitsForJobBeforeUpstreamRow,TestRiverRecordForwardTxSkipsReposThatDoNotForward,TestRiverPushRestoredRunSnoozesForRetryandTestRiverPushDeletedRepoCompletesWithClaimHeld(internal/jobs),TestPushRunWaitsForPublicationOnRiverLane,TestPushRunFailedPublicationWaitRestoresOnRiverLane,TestPushRunShutdownDuringPublicationWaitRestoreIsBoundedandTestPushRunDeletedRepoOnRiverLane(internal/sync),TestHookRecordsNoForwardForSyncLoopbackPush(cmd/openstorage), and thewrite_only,ephemeral_ref,ephemeral_repo_keyandrecovered_twinsubtests. Twenty-one source mutations each turn at least one of these tests red: seventeen from the first pass, and four guards that a later verifier found no test caught (Committedbefore COMMIT, the ephemeral exclusion,RecordForwardTx'sforward_on_pushcheck, and the hook's sync-claim guard). Twelve mutations of the COMMIT resolution in item 5 each turnTestPGCASResolvesFailedCommitorTestServeSkipsPokeAfterLostCommitReplyred: no resolution,abortedread as a win, an unknown outcome read as definitive, the ambiguity marker madeSafeToRetry, a failed status query read asaborted, a wait with no timeout,Committedskipped after a confirmed commit, the CAS connection kept during the status query (lost-reply-one-conn), no second status query while in progress (delayed-commit), a status context that inherits the caller's cancellation (lost-reply-canceled), no pass-through for a swap that changed no row (no-row-changed), and a 50 ms budget (delayed-commit).pgfaultmarks each fault fired before it closes any connection. With the old order, a 30 ms pause between the close and the mark turnsdropped-commitandstatus-query-failsred. With the new order the same pause stays green, and 40 fresh processes ofTestPGCASResolvesFailedCommit, each stopped for 20 ms of every 30 ms (SIGSTOP and SIGCONT) while its subtests ran, all passed.The
verify-lane-schedulemodel covers only the local schedule. Five covered declarations changed (buildServeEventing,wireHookEventing,Worker.waitPublication,Worker.RunPushandErrRepoGone), each only on its PostgreSQL or River branch, so the model still describes the local code.check.shpasses, andcheck.sh --recordmoved the sync commit. The COMMIT resolution in item 5 changes no covered file. After the merge of main (#677 hashes imports),check.sh --recordpassed and recorded that merge commit as the sync commit. It is an ancestor of the PR head, sorefs/pull/679/headkeeps it reachable after a squash merge.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh