Repository navigation
Description
Finding
PR #3510 (fix for #3475) made the github-backup deploy script advertise the final configured live version as the rollback target instead of the pre-secrets upload — but the new code silently falls back to that same pre-secrets upload whenever the post-provisioning re-read cannot name a live version:
// infra/github-backup/worker/deploy.mjs, normal flow (current main 85c435ec6c59)
const configuredLive = liveVersionIds();
const liveId = configuredLive.join(", ") || version.id;
console.log(`live: ${WORKER_URL} at version ${liveId} (${tag})`);liveVersionIds() (same file) swallows every failure into []: a deployments list error, unparseable output, a non-array response, or a latest deployment with no version at percentage === 100 all yield []. In each of those cases the script exits 0 and prints live: … at version <uploaded id> — the exact version #3475 established carries no DRAIN_BEARER / GITHUB_WEBHOOK_SECRET bindings and must never be used as a rollback target. The note: uploaded version … was superseded … warning is also suppressed in this branch (it only prints when liveId !== version.id), so nothing in the run's own summary tells the operator the advertised target is unverified.
Evidence
- PR github-backup(deploy): advertise the configured version as the rollback target (#3475) #3510: MERGED 2026-11-01T10:56:11Z, merge commit
f5f612871e(verified ancestor of current main85c435ec6c59950f59b773776785ee78046ab69c, compare behind_by 0). Its stated contract: "the version to advertise — and the only sound rollback target — is the final configured live version, re-read after provisioning, not the pre-secrets upload." - Current main,
infra/github-backup/worker/deploy.mjs:181-182:const configuredLive = liveVersionIds(); const liveId = configuredLive.join(", ") || version.id; - Current main, same file,
liveVersionIds():catch { return []; }around the whole read/parse, plusArray.isArray(parsed) ? parsed : []and apercentage === 100filter — three distinct empty-result paths, none distinguished from "genuinely no live version". - The regression suite added by PR github-backup(deploy): advertise the configured version as the rollback target (#3475) #3510 (
infra/github-backup/tests/test_deploy_rollback_version.py) stubsdeployments listto always report the recorded live version; no case exercises an empty, split-percentage, or failing deployments read aftersetWorkerSecrets(), so this fallback is untested. - Dedupe: searches this run for
liveVersionIds,configuredLive, "github-backup deploy.mjs rollback target", and "3475" (open) found no issue tracking this fallback; the only hit is github-backup(deploy): the version advertised for rollback is the pre-secrets version, and --deploy-version never provisions secrets #3475 itself (CLOSED, the issue PR github-backup(deploy): advertise the configured version as the rollback target (#3475) #3510 fixed).
Why it matters
The live: line is the record an operator later rolls back from. When the re-read fails, the script should fail loudly — instead it re-creates the #3475 hazard in precisely the failure mode (a Cloudflare read going wrong mid-deploy) where nobody is likely to hand-check the raw deployments dump printed earlier by reportLive().
Acceptance criteria
- When the post-provisioning re-read cannot determine a configured live version (empty result, no 100% version, read/parse failure), the normal deploy flow does NOT advertise the uploaded version as the live/rollback target: it either fails non-zero naming the problem, or prints an explicit "rollback target UNKNOWN — do not use the uploaded version" warning.
- The happy path is unchanged: a determinable configured live version is advertised, with the superseded-upload note when it differs from the upload.
- A stubbed regression case in
infra/github-backup/tests/covers the empty/no-100% deployments-list response after secret provisioning and pins the new behavior. - Issue github-backup(deploy): the version advertised for rollback is the pre-secrets version, and --deploy-version never provisions secrets #3475 remains closed; the
--deploy-versionverify-before-deploy path from PR github-backup(deploy): advertise the configured version as the rollback target (#3475) #3510 is untouched.
Found by the pr-diff-review job, run 2026-11-06 05:24 CST, batch PRs #3492–#3522.
Activity
developing-today commentedon Nov 6, 2026
CODE-1967
dezren39 commentedon Nov 6, 2026
🤖 Agent note · filed
56 remaining items
dezren39 commentedon Nov 8, 2026
Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).
Queue task(s) [11194] were marked done, and some work did land:
No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder enqueue deferred: this issue was active in tonight's lane shifts after the audit snapshot.
dezren39 commentedon Nov 8, 2026
🤖 Agent note · triaged (remainder)
Remainder triage verdict (task 12531, 2026-11-08T05:45Z): bug REAL-AND-CURRENT on main; fix exists and is merge-ready; the only remainder is the merge.
d30e9105d959:infra/github-backup/worker/deploy.mjs:181-182still readsconst configuredLive = liveVersionIds(); const liveId = configuredLive.join(", ") || version.id;, andliveVersionIds()(line 212) still swallows every failure into[]— the filed behavior is unchanged.held,user/owned,do-not-merge,do-not-auto-editabsent).queue/11017-6507-deploy-rollback-unknown, checks SUCCESS (scripts-test3.12 + 3.14), CodeRabbit NEUTRAL, no labels. Task 11194's 2026-11-08T00:28Z verification stands: mergeable/clean at head68d7f5660cca, Codex review completed with no findings, diff exactlydeploy.mjs+test_deploy_rollback_version.py.repo-health:v1:pr:developing-today/code:pr:6548) — re-verify, merge under the standing criteria, confirm github-backup(deploy): normal flow silently falls back to the pre-secrets upload as rollback target when the configured-live re-read is empty (#3510 residual) #6507 closes; no competing PR. The packet carries the caution: if task 11017 is live-claimed at claim time, park naming it.queue/needs-review+status/needs-review+work/assignedalready describe the PR-open state truthfully.dezren39 commentedon Nov 8, 2026
🤖 Agent note · picked up
Merge pull request #6548 from developing-today/queue/11017-6507-deplo…
dezren39 commentedon Nov 8, 2026
🤖 Agent note · done
dezren39 commentedon Nov 8, 2026
🤖 Agent note · done
|| version.idfallback is gone.