GeezerVison is showing github.com — github-backup(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real deploy (upload + secret reset) · Issue #3287 · developing-today/code
github-backup(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real deploy (upload + secret reset) #3287Descriptiongithub-backup(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real deploy (upload + secret reset)
Summary
infra/github-backup/worker/deploy.mjs (landed today in #3280 / commit 307a250) parses its CLI flags by membership only and never rejects an argument it does not recognize:
deploy.mjs:40-47 — const dryRun = args.includes("--dry-run"), args.indexOf("--deploy-version"); there is no allowlist check over args anywhere in the file.
So deploy.mjs --dry-rnu (or any unknown flag, e.g. --bogus-flag) is silently treated as a plain deploy of HEAD: it uploads a new Worker version, creates the 100% deployment when the version is not already live, and (re)sets the live Worker secrets DRAIN_BEARER and GITHUB_WEBHOOK_SECRET from Bitwarden — then exits 0 reporting the Worker live. The operator who typo'd the dry-run flag gets no signal that a production deploy just happened.
This is the same defect class already filed for the sibling deploy/install scripts — #3264 (pkarr-worker deploy.mjs), #3278 (opencode-claimant install.mjs), #3281 (id-mail worker deploy.mjs) — but this script is new code merged after those filings and is not covered by any of them.
Evidence (verified this run)
Laptop probe ~/git/fleet/probe-2026-10-31-laneB-ghbdeploy/ (deploy.mjs copied verbatim; sha256 feb5ebfc3d11a9a592d444e9722b8548973e533651fa9ffdac982dac28ee2ad7, matching main cf1b243f), with bws / wrangler / git stubbed to log every invocation and return canned JSON:
- Control —
node deploy.mjs --dry-run: exit 0; the only stub call is wrangler deploy --dry-run; prints "dry run: config builds, nothing uploaded".
node deploy.mjs --dry-rnu: exit 0; stub log shows the FULL real deploy sequence — git rev-parse HEAD, wrangler versions list, wrangler versions upload --tag git-abcdef012345 …, wrangler deployments list, wrangler secret put DRAIN_BEARER, wrangler secret put GITHUB_WEBHOOK_SECRET, and the live report (live: https://developing-today-backup.developing-today.workers.dev at version …). (No versions deploy call in this run only because the stub reported the just-uploaded version as already live; against real wrangler state a fresh upload is not live, so the deployment-create step runs too.)
node deploy.mjs --bogus-flag: exit 0; identical full deploy sequence.
Why it matters
This script is the deploy path for the backup webhook receiver Worker. A one-character typo in the safety flag turns a no-op validation into a production deploy of whatever HEAD happens to be, including resetting the live Worker's secrets — with a success exit code and a normal "live:" report, so the mistake is invisible in the moment and only surfaces if the deployed code misbehaves.
Acceptance criteria
- Any argument that is not
--dry-run or --deploy-version <id> (with a present, non-flag value) makes the script exit non-zero with a usage error naming the offending argument, before any bws/wrangler/git call.
--deploy-version followed by another flag or nothing is rejected the same way.
--dry-run, bare (deploy HEAD), and --deploy-version <id> behavior is unchanged.
- A stubbed-CLI test (or equivalent) pins: unknown flag → zero stub calls + non-zero exit;
--dry-run → only the dry-run validation call.
Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) task/triageQueue packet kind: verify, reproduce, and route this item effort/sSmall: expected under 2 hours of work on Nov 1, 2026dezren39 commented on Nov 1, 2026 🤖 Agent note · filed
- Agent: new-issue-creator-code-b
- Session / ID: new-issue-creator-code-b cron run 2026-10-31 20:50 CDT
- Found via: filed this run — read the deploy script merged today in github-backup: rename to developing-today-backup + just/nix deploy standard #3280 while scouting areas Lane A had not just covered, then verified with a stubbed-CLI probe before filing.
- Task: Filed this issue:
infra/github-backup/worker/deploy.mjs (main cf1b243f, sha256 feb5ebfc…) only membership-checks --dry-run / --deploy-version (deploy.mjs:40-47) and never rejects unknown arguments. Laptop probe ~/git/fleet/probe-2026-10-31-laneB-ghbdeploy/ with stubbed bws/wrangler/git: --dry-run → validation call only; --dry-rnu and --bogus-flag → exit 0 after the full real sequence (versions upload, deployments list, secret put DRAIN_BEARER, secret put GITHUB_WEBHOOK_SECRET, live report). Same defect class as pkarr-worker(deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu or --deploy-version=<id> performs a real deploy of HEAD #3264 / opencode-claimant(install): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real install, and a typo'd --stor writes the real OpenChamber store #3278 / id-mail(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu enters the real deploy sequence and force-deletes the retired 'id-mail' Worker #3281, but a new script none of them covers.
- Expectation: effort s; done when any unrecognized argument aborts with a usage error before any side-effecting call, pinned by a stubbed-CLI test (acceptance criteria in the issue body).
- Links: pkarr-worker(deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu or --deploy-version=<id> performs a real deploy of HEAD #3264 pkarr-worker(deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu or --deploy-version=<id> performs a real deploy of HEAD #3264 · opencode-claimant(install): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real install, and a typo'd --stor writes the real OpenChamber store #3278 opencode-claimant(install): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real install, and a typo'd --stor writes the real OpenChamber store #3278 · id-mail(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu enters the real deploy sequence and force-deletes the retired 'id-mail' Worker #3281 id-mail(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu enters the real deploy sequence and force-deletes the retired 'id-mail' Worker #3281
dezren39 commented on Nov 1, 2026
Adopted as Phase 1 of design #3352. The design records the contract this issue's fix must follow: every argument is accounted for before any side effect; unknown/typo'd arguments are a usage error naming the argument (exit non-zero, 2 where no usage code is established) before any subprocess/network/file/lock/deploy step. Triage: do NOT re-file, re-scope or split this issue — record the phase structure and verdict, and keep this issue's own acceptance criteria as the phase's acceptance. Design doc: files/designs/code-operator-argument-contract.md (keep-the-four-repos-healthy goal workspace). dezren39 commented on Nov 2, 2026
🤖 Agent note · parked — CI pending on PR #4475
dezren39 commented on Nov 2, 2026 dezren39 commented on Nov 2, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|