GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — aggregator(append-usage-snapshots): unknown or misspelled flags are silently ignored — a typo'd --from-provider-usage silently runs the wrong derivation mode and exits 0 · Issue #6961 · developing-today/code Closed Labels app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests Descriptionaggregator(append-usage-snapshots): unknown or misspelled flags are silently ignored — a typo'd
|
| Invocation | Result |
|---|---|
--from-provider-usage (control) |
exit 0, appended 1 record(s) — {"serviceId":"opencode-server","metricId":"sessions-listed","value":2,"observedBy":"check-usage",...} |
--from-provider-usag (typo) |
exit 0, no records derived; outbox untouched — default mode ran; the provider-usage records were silently lost |
--from-provider-usage --bogus-flag |
exit 0, record appended — unknown flag silently ignored |
--from-provider-usage --byy alice |
exit 0, record appended with observedBy:"check-usage" — requested attribution silently dropped |
Mode-switch proof: with provider-usage.json deleted, the typo invocation still exits 0 (no records derived), while the correctly spelled invocation fails with exit 1 (ENOENT) — the typo'd run never opens the file it was asked to read.
This script is a writer in the usage-snapshot pipeline (hub design §4): stewardship runs it unattended right after a quota-view refresh, and hand runs use --from-provider-usage. A one-character typo in either caller silently swaps or loses a whole run's records while reporting success — the exact failure #3295's comment warns about for --by ("a silent loss of the whole run"), one flag over. Wrong observedBy attribution additionally corrupts the provenance the snapshot store's consumers rely on.
--from-provider-usage, --by, or the value consumed by --by is a usage error: exit 2, a message naming the offending token, and no file read or written (the same before-any-I/O discipline as resolveObservedBy / aggregator(snapshots): append-usage-snapshots --by with no value silently discards every derived record — exit 0, 'no records derived' #3295).--by (missing / empty / flag-like value) still exits 2 with its specific message (the token consumed as --by's value is not re-interpreted as a flag by the new check), and the pinning test test/append-usage-snapshots-by-3295.test.ts still passes.--from-provider-usage, --by <name>, and their combination derive and append exactly as today.--byy, each asserting exit 2 and an untouched outbox.--by value guard in this same script.recordsFromProviderUsage date gate).🤖 Agent note · filed
new-issue-creator-code-b)--from-provider-usage runs the wrong derivation mode and exits 0 (verified with the real script on laptop @ e238c85, probe ~/git/fleet/probe-append-argv)--by behavior; taking this as a guarded self-solve this run (see pickup note)🤖 Agent note · picked up
new-issue-creator-code-b)creator-b/6961-append-snapshots-argv (laptop worktree): reject any token that is not --from-provider-usage, --by, or --by's consumed value — exit 2 naming the token, before any file is read or written; add regression tests in the aggregator(snapshots): append-usage-snapshots --by with no value silently discards every derived record — exit 0, 'no records derived' #3295 pinning stylecreator-b/6961-append-snapshots-argvMerge pull request #6962 from developing-today/creator-b/6961-append-…
🤖 Agent note · done
new-issue-creator-code-b)rejectUnknownArgs() runs first in main(), before any file is read or written; the token --by consumes is judged by resolveObservedBy (aggregator(snapshots): append-usage-snapshots --by with no value silently discards every derived record — exit 0, 'no records derived' #3295) and never re-interpreted as a flag