You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deploy(deploy.py): arguments after list are silently ignored and a duplicate --registry silently overrides the first — the typo-flag class, in the parser the activation slices will build on #6376
pkgs/deploy/deploy.py (the deployment-architecture CLI, #5766 slice 1) silently ignores two classes of malformed arguments in main() (deploy.py:168-186):
Anything after list is ignored. After the --registry extraction loop (deploy.py:172-178), main() checks only args[0] != "list" (deploy.py:186) and never inspects the rest. deploy --registry A list extra-junk and deploy --registry A list --dry-rnu both print the list and exit 0.
A duplicate --registry silently overrides the first. The while "--registry" in args loop (deploy.py:172) assigns registry_path unconditionally on each pass, so the last occurrence wins with no error — the operator can be shown (and, in later slices, act on) a different registry than the one they named first.
Evidence (verified this run, laptop @ origin/main 03d1a21, probe ~/git/fleet/probe-deploy-argv)
Two one-service registries: A = svc-a (target laptop), B = svc-b (target sandbox).
Control python3 deploy.py --registry regA.json list → lists svc-a, exit 0.
... list --dry-rnu → lists svc-a, exit 0 (typo'd flag ignored).
--registry regA.json --registry regB.json list → lists svc-b, exit 0; reversed order → lists svc-a, exit 0 (last --registry wins, silently, either way).
Controls that do fail: unknown subcommand → exit 2; --registry=regA.json list (equals form) → exit 2 with the misleading message that --registry=regA.json "is not implemented in slice 1", because the token is treated as the subcommand name.
Why it matters
Slice 1 is read-only, so today the harm is a wrong-registry listing believed to be the requested one. But this parser is the foundation the later #5766 slices build on — the usage line already reserves deploy <target> [rollback|status] [--dry-run] — and this repo's standing lesson from that exact grammar is that silently ignored flags become dangerous the moment the verb gains effects: #3278 (claimant install: a typo'd --dry-rnu performed a real install) and #3287 (github-backup deploy: a typo'd flag performed a real deploy) were both this shape. The fleet CLI family has the same rule for its own parsers (#6139 duplicate scalar flags, #6134 argv ignored entirely). Fixing the parser now, while list is its only verb, is the cheap moment.
Acceptance criteria
deploy ... list <anything> exits 2 with a usage error naming the unexpected argument (after --registry extraction, list accepts no further arguments).
A second --registry occurrence exits 2 with an error naming the duplication, instead of last-wins.
The documented forms keep working: --registry before or after the subcommand, $DEPLOY_REGISTRY fallback, unknown subcommand still exit 2.
Tests pin all of the above (there is currently no test file for deploy.py; add one where the flake/other CLI suites keep theirs, or note the chosen home in the PR).
Nice-to-have, triage's call: --registry=PATH either works or its error stops calling the token a subcommand.
Session / ID: cron job new-issue-creator-code-b, run 2026-11-05 14:50 CST
Found via: filed this run
Task: Filed after verifying on the laptop @ origin/main 03d1a21 (probe ~/git/fleet/probe-deploy-argv): arguments after list are silently ignored and a duplicate --registry silently overrides the first in pkgs/deploy/deploy.py's parser.
Expectation: effort s — triage confirms the fix shape (reject trailing args after list; reject duplicate --registry), then route the small parser fix.
Activity
developing-today commentedon Nov 5, 2026
CODE-1892
dezren39 commentedon Nov 5, 2026
🤖 Agent note · filed
listare silently ignored and a duplicate--registrysilently overrides the first in pkgs/deploy/deploy.py's parser.dezren39 commentedon Nov 5, 2026
🤖 Agent note · picked up
75 remaining items
fix(deploy): reject trailing args and duplicate --registry (#6376)
test(deploy): property coverage for the argv parser (#6376)
developing-today commentedon Nov 8, 2026
🤖 Agent note · parked
Merge pull request #6550 from developing-today/queue/10768-6376-deplo…
dezren39 commentedon Nov 9, 2026
🤖 Agent note · done (already done)