GeezerVison is showing github.com — ci(id-mail): deploy.test.mjs (4 tests pinning the #3281 typo'd-flag deploy guard) run by no workflow — the deploy script can force-delete the live Worker · Issue #6082 · developing-today/code
ci(id-mail): deploy.test.mjs (4 tests pinning the #3281 typo'd-flag deploy guard) run by no workflow — the deploy script can force-delete the live Worker #6082DescriptionProblem
nixos/services/id-mail/worker/deploy.test.mjs — the only test suite for the id-mail worker deploy script — is run by no workflow, flake check, or Nix build. Its package's own npm test exists, but nothing invokes it.
Evidence (verified this run, laptop primary @ aee78ac, HEAD == origin/main)
nixos/services/id-mail/worker/package.json:6 declares "test": "node --test deploy.test.mjs", and deploy.test.mjs:1-9 documents what it pins: it drives the real deploy.mjs in a temp dir with stubbed bws/wrangler binaries and pins the three 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 cases — --dry-run validates only and exits 0, a typo'd --dry-rnu is a usage error with zero external calls, and a bare run performs the real deploy sequence against the stubs.
- Grep across
.github/workflows/, nixos/ (including nixos/services/id-mail/default.nix and the worker's deploy.nix), home/, infra/, scripts/, and the flake finds no reference to deploy.test outside the test file and its package.json. The deploy tests comment in github-backup-tests.yml:21 concerns infra/github-backup, a different deploy script.
- Hand run on the laptop this run:
node --test nixos/services/id-mail/worker/deploy.test.mjs → 4 tests, 4 pass, 0 fail (~0.25 s). Green, fast, never run.
- What it guards is destructive: 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 (closed) was
deploy.mjs silently ignoring unrecognized arguments, so a typo'd --dry-rnu entered the real deploy sequence and force-deleted the retired id-mail Worker. The sibling github-backup deploy script got the same defect (github-backup(worker deploy): unrecognized arguments are silently ignored — a typo'd --dry-rnu performs a real deploy (upload + secret reset) #3287) and its suite is wired (github-backup-tests.yml); this one is not.
Why it matters
The pin for a deploy script that can delete a live Worker exists but is decorative: a regression in deploy.mjs argument handling (or in the stubbed deploy sequence) merges with no signal, and the next typo'd flag re-runs the #3281 failure against production.
Acceptance criteria
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · state: filed
developing-today commented on Nov 8, 2026 🤖 Agent note · handed off
developing-today commented on Nov 8, 2026 🤖 Agent note · handed off
developing-today commented on Nov 9, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 9, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 9, 2026 🤖 Agent note · done (closed — wired and verified)
Acceptance check
- An automated check runs
deploy.test.mjs on changes to that directory — yes. The workflow triggers on nixos/services/id-mail/worker/** (and its own file), sets up Node 24, and runs npm test = node --test deploy.test.mjs runtime.test.mjs. Before running it fails closed unless deploy.test.mjs, runtime.test.mjs and package.json all exist, so deleting or renaming the suite fails the job instead of silently unwiring it. Actions API reports the workflow active (id 411620923) and dispatchable.
- The check passes on the current main tree — yes, on a clean worktree at main
0e7a326d81 (the merge commit): npm test in nixos/services/id-mail/worker → 14 tests, 14 pass, 0 fail (deploy 6 + runtime 8; the four 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 cases are intact, plus the two id-mail(deploy): validate() crashes on null config entries instead of reporting them, and a config without retire passes validation then crashes the real deploy #6947 deploy cases and three id-mail(worker): runtime MAIL_CONFIG/CALLERS JSON is shape-trusted — malformed config throws raw errors out of fetch(), string transports/from are substring-accepted #6970 runtime cases added since filing).
- Reintroducing the 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 behaviour makes the check fail — yes, verified as a negative control: replacing
const unknownArgs = args.filter((arg) => arg !== "--dry-run"); with const unknownArgs = []; (the old ignore-unknown-args behaviour) makes --dry-rnu and --bogus-flag fail → 2 failing tests; the file was restored and git status clean afterwards.
One external caveat (not a defect in this wiring)
The first main-tier run on the merge commit, run 42549387455, was created with the correct job (full (main tier): id-mail worker suites, ubuntu-latest) but is queued with no runner assigned. The whole repository's hosted-runner queue has been stalled since 2026-11-08T03:09Z — every workflow created after that time is queued, and no hosted job has succeeded since then — so no CI-observed green exists yet for any workflow, not just this one. Under the #6185 coverage contract that means these suites are wired and locally proven but not yet observed to run; the registry's id-mail.deploy / id-mail.runtime rows therefore stay uncovered until the audit in #6187/#6188 sees a successful run. The wiring itself, which is what this issue asked for, is complete.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|