Repository navigation
fix(release): tolerate pulls API lag after the fence's acknowledged push - #8397
Conversation
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) <[email protected]>
…uring lag Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean fix to the changeset fence script.
Checked:
verifyPR(candidate)→awaitPushedPR(candidate)tolerates only the specific benign pulls-API lag documented on adcp#7897 (same PR number+node_id, still Draft, head still atstate.prior, bounded to 10 one-second polls) — scripts/fence-changesets.cjs:40-63. Any other shape or lag past the bound falls through toverifyPRand quarantines as before; fail-closed preserved.- openPR reads stay bounded (60s each); the push's 10-min mutation bound covers the added ~10s poll; lag-forever quarantines and restores the prior ref (test at tests/changesets-fence.test.cjs:132).
fence-changesets.cjsis not in PROTOCOL_SCOPED_PATHS, so no changeset is required. No schema/docs/dist surface touched.
No Critical/High/Medium findings. Not a protocol/breaking-class change. gated_paths is false; high_risk is false; no author-team gate. Falls through to row 9.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — tooling/release-script refinement, no blocking or medium findings.
This is a subsequent pass on a 2-file refinement. scripts/fence-changesets.cjs:12 swaps the pr-head-lag console.log for save({ event: "pr-head-lag", attempt }), moving the lag event into the durable state artifact; save still logs to stdout so the existing stdout assertion holds. Tests add a pr-head-lag-ready fault and a case asserting a Ready transition during pulls-API lag quarantines immediately with zero pr-head-lag events — traced and correct (awaitPushedPR requires pr.draft to keep polling, so a Ready flip falls through to verifyPR and throws). Bounded polling (10×1s) sits inside the already-bounded push path.
Changed files are release/CI tooling and tests only — no static/schemas/source/**, docs/reference/**, dist/**, migrations, or protocol surface touched; schema↔docs, changeset-scope, oneOf, and artifact-immutability gates are not implicated. high_risk false, gated_paths false, no no-auto-approve team match. Prior decision was approve; current run surfaces no critical/high/medium findings. Falls through to row 9.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ush (#8397) (#8959) * 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. * fix(release): record fence PR-head lag as a state event; test Ready during lag * test(release): lagging pulls stub reads without a check-then-use race --------- (cherry picked from commit 8f4ab4a) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
Two of the last four release runs on
mainquarantined the3.3.0-beta.0Version Packages transaction (#7897) with "Release PR changed or left Draft", although nothing had changed it. Run 39711033914 shows the race:Run 39644947514 (17:34 UTC Oct 21) failed the same way.
Fix: the post-push
verifyPR(candidate)becomesawaitPushedPR(candidate). It re-reads only while the PR is the same one (number and node id), still Draft, and still reporting the prior head. It reads at most 10 times, one second apart. Any other mismatch (another head, left Draft, a different PR), or a lag past the bound, goes throughverifyPRand quarantines exactly as before. The pre-push check and the finalize checks are unchanged.Tests:
pr-head-lag: the API serves the prior head for 2 reads. The push now completes and finalizes ascomplete. This test fails without the fence change.pr-head-lag-forever: the transaction still quarantines and the prior ref is restored.tests/changesets-fence.test.cjstests pass.RELEASING.mddocuments the bounded poll. There's no changeset, because the changeset scope check doesn't treat the fence as protocol surface.Merging this also triggers the next release run for
3.3.0-beta.0.🤖 Generated with Claude Code
Open workspace in Conductor