Repository navigation
fix(release): tolerate pulls API lag after the fence's acknowledged push (3.2.x backport of #8397) - #8959
Merged
Conversation
…ush (#8397) * fix(release): tolerate pulls API lag after the fence's acknowledged push Two of four release runs on main quarantined the 3.3.0-beta.0 Version Packages transaction (#7897) because the PR read ~0.6s after an acknowledged push still showed the prior head; the API reported the pushed head seconds later. The post-push check now polls (10 x 1s) only while the same PR, still Draft, reports the prior head. Any other mismatch, or a longer lag, fails and quarantines exactly as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(release): record fence PR-head lag as a state event; test Ready during lag Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(release): lagging pulls stub reads without a check-then-use race Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 8f4ab4a)
bokelley
marked this pull request as ready for review
November 12, 2026 20:48
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean 3.2.x backport of already-merged #8397.
Checked:
scripts/fence-changesets.cjsis byte-identical to main's version (awaitPushedPR+verifyPR(expected, pr=openPR())); post-push polling is bounded (10×1s), reads keep the existing 60s API bound, and exhaustion/null-read/Ready-transition/mismatch all fail-closed toverifyPR→ quarantine.RELEASING.mdandtests/changesets-fence.test.cjsmatch.- No changeset is correct:
fence-changesets.cjsis operational tooling, absent fromcheck-changeset-protocol-scope'sPROTOCOL_SCOPED_PATHS— not protocol surface, not patch-ineligible under 3.2.x stable rules, not Breaking-class.
No high-risk paths, no gated paths, no author team gate, no prior decision. No blocking or medium findings. Falls through to row 9 → approve.
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.
Summary
This backports #8397 (
8f4ab4a88c) to3.2.xas a clean cherry-pick. Since then, the Changesets fence onmainhas tolerated the pulls API lag after its acknowledged push.3.2.xstill has the pre-#8397 fence (last changed in #7860), and that blocks the 3.2.11 release: the Version Packages PR #8942 cannot regenerate to include #8864.Evidence
After #8864 merged (
a07826a449), the Release run on3.2.x(43253981396) quarantined on both attempts. In each case the pre-pushverifyPR(prior)passed, and the post-pushverifyPR(candidate)read the PR before GitHub had updated its head:verifyPR(candidate)31752117924652e12a32f0cea8231cEach time the fence did what it is designed to do: it restored
changeset-release/3.2.xtof0cea8231c, kept #8942 Draft, and failed with "Changesets transaction remains quarantined". #8942 therefore still lists only #8938.The signature matches the one #8397 fixed on
main. Its message says the PR read about 0.6 s after an acknowledged push "still showed the prior head; the API reported the pushed head seconds later" (#7897). Onmain, 2 of 4 release runs had quarantined this way.Change
These are the same three files as #8397, with no conflicts:
scripts/fence-changesets.cjs:awaitPushedPR()polls the post-push PR read up to 10 × 1 s, but only while it is the same PR, still Draft, still at the prior head. Each wait is recorded as apr-head-lagstate event. Any other mismatch, or a lag longer than the bound, fails and quarantines exactly as before.tests/changesets-fence.test.cjs: lagging-pulls coverage, including a Ready transition during the lag.RELEASING.md: a three-line note.Verification (on
3.2.x+ this commit)tests/changesets-fence.test.cjs: 75/75 pass.npm run test:release-workflowpasses, including the fence test.check-changeset-protocol-scopefinds no protocol-scoped changes, so the PR has no changeset and adds nothing to the 3.2.11 notes.Known unrelated red check
Build Check's "Check hosted compliance publication manifest" step fails on this PR, and so does the
TypeScript Buildroll-up of that build worker. The cause is outside this PR.@adcp/sdk16.7.1 (latest/adcp-3.2) was published at 2026-11-12 18:07Z and ships compliance bundle 3.1.33. 3.1.33 is not yet registered in 3.2.x'sstatic/compliance/published-versions.json, so every 3.2.x PR and push has failed this step since then. The 3.2.x push run for #8864 at 16:00Z passed because it predates the publish.#8825 fixed the same situation for 3.1.32. A matching "integrate published 3.1.33 records on 3.2.x" PR is being prepared. Every other check on this PR passes, including the canonical shards (which run the fence test) and server unit.
After merge
The merge push runs Release on
3.2.x. The workflow copiesscripts/fence-changesets.cjsfrom the pushed commit, so that run uses the fixed fence. It should regenerate #8942 to list #8938 and #8864 underadcontextprotocol@3.2.11. #8942 stays Draft and unapproved until its contents are verified.Brian merges. No auto-merge.
🤖 Generated with Claude Code