Repository navigation
Description
Description
The cross-repo smoke gate's promote lane races the sync-issues commit that
release.yml's finalize job pushes, so the listener can dispatch
promote-release.yml while the release PR's CI is re-running. Promote then
refuses at Validate promote prerequisites with ERROR: PR #<n> has checks still in progress, failing the gate on a timing artifact rather than on
content.
Observed live on the 1.17.0 train (incident record: #1735):
devkit-smoke-testfinalize triggeredSync Issues and PRsat06:57:29- that push re-triggered the release PR's CI at
06:58:32 - the listener's
Wait for release PR required checksjob had already
passed against the pre-push check set, so it proceeded Promote Releasevalidated at07:02:09, found the new CI still running,
and refused (run36389373270)
Re-dispatching the same workflow over the same content once CI settled passed
cleanly (run 36392110808), which is what identifies this as a race and not a
defect in the promoted content.
Why this is systemic, not a one-off
finalize pushes the sync-issues commit on every train, and that push
always re-triggers the release PR's pull_request CI. So the ordering hazard
is structural: Wait for release PR required checks can observe a green,
complete check set that a push moments later invalidates. Whether the gate
passes is decided by how the finalize push, the CI queue and the promote
dispatch happen to interleave — it held for the 1.16.0 train and lost for
1.17.0.
The guard itself behaved correctly and should not be loosened: it refuses
before the irreversible undraft, which is exactly what stops a published
release that then fails to merge. The bug is upstream of it, in when promote is
dispatched.
Expected behaviour
The listener does not dispatch promote until the release PR's checks are green
for the head commit it is about to promote — i.e. the check-wait is
anchored to a SHA, rather than asking "are checks green now" against whatever
head exists at poll time. A check set that is green for a superseded SHA must
not satisfy the wait.
Suggested direction (not prescriptive)
Resolve the release-branch head first, then require the green check set to
belong to that SHA, so a later push demotes the wait instead of leaving a stale
pass standing. Related prior art: #1516 (a prepare-time snapshot replayed by a
rerun) and #1487 (validate counting superseded runs) are the same family of
"the signal we checked is not the signal we are about to act on".
Notes
- Affects the
devkit-smoke-testlistener lane; the equivalent wait in
devkit's own promote path deserves the same audit, sincefinalizepushes
sync-issuesthere too. - Recovery in the meantime is a plain re-dispatch of
promote-release.ymlonce the PR's CI settles — no content change needed.
Activity
test: add SHA-anchored release-PR check-wait coverage
fix: anchor release-PR check-wait to a SHA in the smoke gate
docs: document the SHA-anchored release-PR check-wait contract
fix(smoke-gate): anchor release-PR check-wait to a SHA (#1741)
c-vigo commentedon Sep 28, 2026
Fixed on
devin #1741 (merge9bab3bbe).The
wait-release-pr-cijob now holds on two independent conditions per poll iteration:queued/in_progressrun on the PR's own head branch (resolved viagh pr view --json headRefName, not reconstructed from the version). This is what spans thefinalize→sync-issues→ push chain, since theSync Issues and PRsrun is in progress on the branch for its whole life.headRefOidsampled immediately before and aftergh pr checks; a mismatch discards the observation with no pass and no fail/cancel verdict, so a push landing inside the query window cannot be misread either way.The confirmed SHA is exposed as
wait-release-pr-ci.outputs.head_sha, andtrigger-promote-releasecarries a last-mile guard that re-reads the head before dispatch and refuses with both SHAs named.promote-release.yml's ownCI_PENDINGrefusal was deliberately left untouched — it behaved correctly and is the control that stops a published release that then fails to merge.Devkit's own promote path was audited and needs no change (issue Notes):
finalizewaits synchronously onsync-issueswithin the same job, and promote is human-dispatched viajust promote-releaseafter the single human approval, so there is no unattended wait-then-dispatch chain to race.Still owed before the next final train:
repository_dispatchexecutes the listener fromdevkit-smoke-test's default branch, so this devkit asset is the source of truth but is not live until it reaches smoke-testmain(precedent: devkit-smoke-test#345, #353). Until then the race can still reproduce.Residual narrowness, not a defect today: the quiescence gate matches
queued/in_progressbut notwaiting(a run parked for environment approval).devkit-smoke-test's.vig-oshasDEVKIT_COMMIT_APP_ENVIRONMENT=empty, so no run there can enter that state; it would only matter if that key were set.chore: release 1.18.0 (#1819)