Skip to content

fix(release): tolerate pulls API lag after the fence's acknowledged push (3.2.x backport of #8397) - #8959

Merged
bokelley merged 1 commit into
3.2.xfrom
backport/3.2.x-8397-fence-pr-lag
Nov 12, 2026
Merged

bokelley merged 1 commit into
3.2.xfrom
backport/3.2.x-8397-fence-pr-lag

Conversation

@bokelley

@bokelley bokelley commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This backports #8397 (8f4ab4a88c) to 3.2.x as a clean cherry-pick. Since then, the Changesets fence on main has tolerated the pulls API lag after its acknowledged push. 3.2.x still 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 on 3.2.x (43253981396) quarantined on both attempts. In each case the pre-push verifyPR(prior) passed, and the post-push verifyPR(candidate) read the PR before GitHub had updated its head:

Attempt Push acknowledged (candidate observed) verifyPR(candidate) PR head reads the candidate
1 17:39:32.73Z, 3175211792 17:39:33.41Z: "Release PR changed or left Draft" 17:39:35Z, Draft
2 (re-run) 20:15:10.29Z, 4652e12a32 20:15:10.86Z: "Release PR changed or left Draft". A read at 20:15:11.55Z still shows f0cea8231c 20:15:18Z, Draft

Each time the fence did what it is designed to do: it restored changeset-release/3.2.x to f0cea8231c, 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). On main, 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 a pr-head-lag state 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-workflow passes, including the fence test.
  • check-changeset-protocol-scope finds 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 Build roll-up of that build worker. The cause is outside this PR. @adcp/sdk 16.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's static/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 copies scripts/fence-changesets.cjs from the pushed commit, so that run uses the fixed fence. It should regenerate #8942 to list #8938 and #8864 under adcontextprotocol@3.2.11. #8942 stays Draft and unapproved until its contents are verified.

Brian merges. No auto-merge.

🤖 Generated with Claude Code

…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
bokelley marked this pull request as ready for review November 12, 2026 20:48

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean 3.2.x backport of already-merged #8397.

Checked:

  • scripts/fence-changesets.cjs is 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 to verifyPR → quarantine.
  • RELEASING.md and tests/changesets-fence.test.cjs match.
  • No changeset is correct: fence-changesets.cjs is operational tooling, absent from check-changeset-protocol-scope's PROTOCOL_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.

@bokelley
bokelley merged commit 7d8dcb6 into 3.2.x Nov 12, 2026
26 of 28 checks passed
@bokelley
bokelley deleted the backport/3.2.x-8397-fence-pr-lag branch November 12, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant