Repository navigation
Description
Found while running the 1.9.0 train (rc1). Not a blocker for that train — a transient recovered — but the recovery path documented in CROSS_REPO_RELEASE_GATE.md did not work unassisted, and the reason is structural.
What happened
The deploy job's Create deploy PR step failed on a transient GitHub GraphQL 500:
pull request update failed: GraphQL: Something went wrong while executing your query
on 2026-08-13T14:36:50Z ... BC41:387E8A:D18436:2C6E32A:6A7DD680
The structural part
Read the error wording: pull request update failed, not create failed. gh pr create --label creates the PR and then applies the label as a follow-up mutation. The create succeeded — devkit-smoke-test#367 exists, opened 14:36:47 — and the labeling is what hit the 500. The step then exited 1, so:
pr_urlwas never written toGITHUB_OUTPUT, so every downstream job skipped, and- an unlabeled deploy PR was left open on
chore/deploy-<tag>.
Close stale deploy PRs selects candidates with gh pr list --base dev --state open --label deploy. An unlabeled PR is invisible to it. So the documented recovery — re-run the failed jobs — re-enters Create deploy PR, which fails with "a pull request already exists", and keeps failing until a human adds the label or closes the PR by hand.
The failure mode is: the one step whose partial success is most likely is also the one the cleanup cannot reclaim.
Recovery used
Added the deploy label to #367 by hand, then gh run rerun <id> --failed. The workflow's own cleanup then closed and recreated it correctly.
Options
- Select stale deploy PRs by head-branch pattern (
chore/deploy-*) as well as by label — the branch name is deterministic and is written before the PR exists, so it cannot be lost to a partial failure. Probably the smallest correct fix. - Or make
Create deploy PRidempotent: look for an existing open PR on${BRANCH_NAME}first and adopt it (recording its URL) instead of creating. - Or apply the label in its own step, so a labeling failure does not fail the create.
The first and second compose well: reclaim by branch, adopt if present.
Secondary observation
The Notify upstream on smoke-test dispatch failure job also failed, on the same class of transient (4451:2C13C:44BF2C:EA17E4:6A7DD694, 20 s later), so no upstream incident issue was auto-filed for this failure — hence this hand-written one. Worth considering whether the notify path deserves a retry, since it is the thing that is supposed to work when everything else did not.
The SSoT for the asset is assets/smoke-test/.github/workflows/repository-dispatch.yml; note the listener runs from the smoke repo's default branch, so any fix needs the redeploy dance recorded in CROSS_REPO_RELEASE_GATE.md §Contract dependencies.
Activity
test(smoke): cover partial deploy-PR creation recovery
fix(smoke): reclaim deploy PRs by branch and split labelling
docs: record the deploy-PR reclaim invariant and its recovery
fix(smoke): reclaim deploy PRs by branch so a partial create stays re…
c-vigo commentedon Aug 14, 2026
Fixed in #1505 (merged to
devasdc3acf12), milestone 1.9.1.What shipped
All in
assets/smoke-test/.github/workflows/repository-dispatch.yml, taking all three options from the issue plus the secondary observation — they compose into one unit:Close stale deploy PRsnow selects every open PR onchore/deploy-*or carrying thedeploylabel, in onegh pr list --json number,headRefName,labels --limit 100call. The branch name is deterministic and pushed before the PR exists, so it cannot be lost to a partial failure.Create or adopt deploy PRlooks for an open PR on${BRANCH_NAME}and adopts it instead of dying on "a pull request already exists", and writespr_urltoGITHUB_OUTPUTbefore anything else can fail.Label deploy PRretries three times with backoff and is non-fatal — now that the cleanup reclaims by branch, an unlabelled PR stays recoverable, so a label transient must not strandpr_url.notify-failureretries itsgh issue create(three attempts, then fails loudly). That path 500'd 20 s after the deploy did, which is why this issue had to be written by hand.Tests
New
tests/test_smoke_deploy_pr_reclaim.py(12 tests), following the harness pattern from #1477. Shape assertions parse the YAML; behaviour assertions execute each step's real bash against a stubbedghwith--jqhanded to realjq, replaying the rc1 timeline:chore/deploy-1-9-0-rc1is closed, a labelled legacy deploy PR is still closed, an unrelatedfeature/*PR is never touchedpr_urlstill reachesGITHUB_OUTPUTand the job stays greengh pr createis never called and the adopted url is recordedDocs
docs/CROSS_REPO_RELEASE_GATE.mdrecords the reclaim invariant under Receiver Responsibilities and adds a Failure Signals entry forpull request update failed, including what to do on a listener version predating this fix (add thedeploylabel by hand before re-running).Not live yet
repository_dispatchruns the listener from the smoke repo's default branch, so this merge alone does not protect the next train. The mirror hotfix is open at devkit-smoke-test#373 — a byte-exact copy of the fixed asset, awaiting the human approval that smokemainrequires.devthere is intentionally not patched: the next train's deploy PR carries the same content from the release tag and converges it.fix(ci): reclaim deploy PRs by branch so a partial create stays recov…
chore: release 1.10.0 (#1515)