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
fix(pm-stack): strict argv for the quota exporters + projector CLI — the lenient opt() idiom left from the #3352 inventory #8650
Follow-up from the Phase 3 closing inventory of #3352 (posted on #3353): these argv consumers sit outside #3353's named scopes (the pm-stack quota exporters live at pm-stack/<name>/*.mjs, not pm-stack/*/scripts/; the projector is a service CLI), so they were dispositioned (b) there with this issue as the named follow-up. Each parses by membership test (args.indexOf(name) opt() idiom / process.argv.includes) with no unknown-argument rejection — the #3352 costume-1 pattern: a typo'd flag is silently ignored and the run proceeds with defaults.
pm-stack/projector/src/cli.ts — subcommand from process.argv[2], values via indexOf, --no-ack via includes; unknown flags ignored on a CLI whose reconcile path acks work.
Work
Apply the #3352 contract per tool (per-tool strict parsing, no shared library): declare each tool's whole command line, reject anything unaccounted for with a usage error naming the offending argument, exit 2, before any fetch/write/ack side effect. Value options follow corollary 3 (present-but-valueless is not absent). Check callers (systemd units, timers, stewardship invocations, docs) for arguments that were previously ignored, per #3353 step 5, and name any caller fix in the closing evidence.
Acceptance
Each of the four tools refuses an unknown/typo'd flag with a named usage error and zero side effects, verified by probe (stub or dry invocation) per tool.
Previously valid invocations (including the timer/stewardship call sites) are unchanged.
State: triaged (inline, 2026-11-17). Work kind: small-fix (task/small-fix already on the issue). Priority: priority/normal (bulk-intake default band; not fleet-stalling, not in Drew's expedite set). Effort: effort/s for the remaining scope. Kind: kind/refactor.
Remaining scope (one file): pm-stack/projector/src/cli.ts still parses leniently — subcommand from process.argv[2], values via an indexOf-based arg(), --no-ack via process.argv.includes, unknown flags silently ignored, and the DB is opened/migrated before argument validation, on a CLI whose queue-view path acks work.
First concrete step for the fix: declare the projector's whole command line per subcommand (reconcile, queue-view), validate argv before opening the DB, reject anything unaccounted for with a usage error naming the offending argument and exit 2; treat present-but-valueless value options as usage errors.
Acceptance check: probe per subcommand — an unknown/typo'd flag and a present-but-valueless value option each refuse with a named usage error, exit 2, zero side effects (no migration, no ack); previously valid invocations (including timer/stewardship call sites) unchanged; probe evidence posted here and linked from the Phase 3 (audit) of #3352 — closing argv-parser inventory + argument contract statement #3353 inventory table.
Routing: follow-on fix packet enqueued as task 20204 (dedupe-verified: repo-health:v1:fix:developing-today/code:issue:8650, status queued). No duplicate packet.
Implementation / probe evidence for PR #11278: pm-stack/projector/src/cli.ts now validates full argv before opening/migrating the DB. Subprocess probes: 9 passed; invalid reconcile and queue-view invocations (unknown flags, unknown command, positional args, missing/flag-shaped values, invalid format) all exit 2, name the offending token, emit no stdout, and do not create the configured SQLite DB file. This proves no DB migration or queue-view ack occurs. Full projector suite: 171 passed. Valid manual queue-view invocation with --tasks / --window-hours 24 / --consumer queue-view / --no-ack / --format json returned JSON successfully. Caller audit: package wrapper invokes CLI with no args (default reconcile); systemd timer triggers wrapper; queue-view is documented manual invocation; no previously-ignored caller args found.
Done: PR #11278 merged at a6635cc30b9885269c7f108e12e522608d9a4a13; #8650 closed by the merge. Targeted probes 9/9 and full projector suite 171/171 passed. Evidence also linked on #3353.
Activity
developing-today commentedon Nov 11, 2026
CODE-2589
docs(agents): state the operator script argument contract (#3352 phas…
dezren39 commentedon Nov 17, 2026
Agent note — triaged, task 18717 for issue #8650 (lane any-e)
dezren39 commentedon Nov 17, 2026
Picked up by
repo-worker-code/ lanecode-f(scheduled OpenChamber lane). Queue task 20204. Revalidated issue open; implementing strict argv for projector CLI only.dezren39 commentedon Nov 17, 2026
Implementation / probe evidence for PR #11278:
pm-stack/projector/src/cli.tsnow validates full argv before opening/migrating the DB. Subprocess probes: 9 passed; invalid reconcile and queue-view invocations (unknown flags, unknown command, positional args, missing/flag-shaped values, invalid format) all exit 2, name the offending token, emit no stdout, and do not create the configured SQLite DB file. This proves no DB migration or queue-view ack occurs. Full projector suite: 171 passed. Valid manual queue-view invocation with--tasks/--window-hours 24/--consumer queue-view/--no-ack/--format jsonreturned JSON successfully. Caller audit: package wrapper invokes CLI with no args (default reconcile); systemd timer triggers wrapper; queue-view is documented manual invocation; no previously-ignored caller args found.dezren39 commentedon Nov 17, 2026
Done: PR #11278 merged at
a6635cc30b9885269c7f108e12e522608d9a4a13; #8650 closed by the merge. Targeted probes 9/9 and full projector suite 171/171 passed. Evidence also linked on #3353.