GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 · Issue #3333 · developing-today/code

aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333

New issue
Copy link
New issue
Copy link
Closed
#5145
Closed
aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0#3333
#5145
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours 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 jobsource/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 1, 2026
Issue body actions

aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0

Summary

pm-stack/aggregator/scripts/produce-charge-candidates.ts reads its three
value-taking flags through argValue() (:52-55), which returns
process.argv[i + 1] — or undefined when the flag is last. In main()
(:252-257) every result is combined with ?? defaults:

const start = argValue("--start") ?? isoDay(<first of current month>);
const end   = argValue("--end")   ?? isoDay(now);
const outPath = argValue("--out") ?? process.env.CHARGE_CANDIDATES_PATH ??
  join(homedir(), "workspace/goals/keep-the-four-repos-healthy/hidden_files/charges-candidates.json");

So a flag that is present but missing its value is indistinguishable from a
flag that was never passed: no error, no warning, exit 0. There is also no
validation that --start/--end are real YYYY-MM-DD dates, or that
start <= end. The candidates file is the live input the fleet-feed collector
consumes (collect-fleet-feed.ts: charges-candidates.json → matcher →
charges/chargesAttention), and this producer is run by hand (#2205: it "only
refreshes when an agent runs it by hand"), so a typo lands silently in the
one file that matters.

Evidence (verified this run, main d64e83c1)

Laptop probe ~/git/fleet/probe-2026-10-31-laneA-chargeargs/ — the real
script (sha256 999f2dd904924bc718aa278f209441656e85da05db75aa33c6a95e6d8b0eefe3,
identical on the sandbox main checkout and the laptop checkout), Bun 1.4.2,
with PLAID_CLI pointed at a stub that logs its arguments and returns one
valid transaction, and CHARGE_CANDIDATES_PATH pointed at a probe-local
default file:

Case Result
control: --skip-gmail --start 2026-09-01 --end 2026-09-30 --out <probe>/control.json exit 0; control.json written with period 2026-09-01..2026-09-30; stub logged --start-date 2026-09-01 --end-date 2026-09-30; default file untouched
trailing --out: ... --start 2026-09-01 --end 2026-09-30 --out exit 0; silently wrote the default candidates path (wrote .../default-out.json) — in a real run that is the live hidden_files/charges-candidates.json, overwritten when the operator asked for a custom file and forgot its value
trailing --start: --skip-gmail --end 2026-09-30 --out <probe>/trailstart.json --start exit 0; period became 2026-11-01..2026-09-30 (start after end); the stub was queried with --start-date 2026-11-01 --end-date 2026-09-30, and the inverted period was persisted into the written file
flag-like --out value: --start 2026-09-01 --end 2026-09-30 --out --skip-gmail exit 0; wrote a file literally named --skip-gmail in the working directory (producer: wrote --skip-gmail), and the same token also switched Gmail off
unvalidated date: --skip-gmail --start banana --end 2026-09-30 --out <probe>/banana.json exit 0; stub queried with --start-date banana; the written file's period.start is the string "banana"

Why it matters

The failure is silent in exactly the dangerous direction: the operator
believes they produced a custom period into a scratch file, while the
script actually (a) regenerates the current month into the live
candidates file, or (b) persists a candidates file whose declared period is
inverted or not a date at all, which the collector then matches and surfaces
as if it were the requested period. Nothing in the output line looks wrong —
it prints the substituted values as if they were requested.

Distinct from: #3295 (append-usage-snapshots --by voiding observedBy),
#3330 (backfill --dir crash / flag-named directory), #3285 (compact
--months 0) — same unchecked-argv family, different script, different
failure: here the ?? fallback masks the missing value instead of
crashing or misdirecting, and the target of the silent write is the live
charges pipeline input. Also distinct from #3224/#3120/#3121 (amount/subject
parsing inside this same producer) and #2448 (a garbled Gmail date throwing
inside gmailCandidates).

Acceptance criteria

  • --start, --end, or --out with no following value, or with a
    following token that starts with --, prints a usage/error message
    naming the flag and its missing value to stderr and exits 2 — no Plaid or
    Gmail call is made and no file is written (in particular the default
    candidates file is untouched).
  • --start / --end values that are not real calendar dates in
    YYYY-MM-DD form, or a start after end, exit 2 with an error naming
    the offending value — nothing is queried or written.
  • Valid explicit flags behave exactly as today (same period, same output
    file, same summary line); the no-flag defaults (current month, env /
    default candidates path) are unchanged.
  • A regression test (or script-level harness case, e.g. with a stub
    PLAID_CLI) covers the trailing-flag, flag-like-value, and
    invalid/inverted-date cases.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-10-31 23:35 CDT (2026-11-01T04:42Z)
    • Found via: filed this run
    • Task: Filed aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 — produce-charge-candidates.ts argValue()/?? defaults silently mask a missing --start/--end/--out value; verified on laptop probe probe-2026-10-31-laneA-chargeargs (sha-matched script, stub PLAID_CLI): trailing --out overwrites the default candidates path, trailing --start persists an inverted 2026-11-01..2026-09-30 period, --out --skip-gmail writes a file named '--skip-gmail', --start banana is persisted unvalidated — all exit 0. Enqueued as a repo-task/v1 triage packet on repo-health-code-pilot.
    • Expectation: effort/s — triage confirms the behaviour on main and routes the fix (exit 2 on missing/flag-like values and on invalid or inverted dates; valid/default runs unchanged; regression harness case).
    • Links: aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333
  3. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Nov 1, 2026
  4. dezren39
    added a parent issue on Nov 1, 2026
    • Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    Adopted as Phase 2 of design #3352 (corollary 3: present-but-valueless is not absent). 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).

  6. github-actions
    assigned
    dezren39
    on Nov 1, 2026
  7. dezren39
    added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  8. 32 remaining items

  9. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — PR opened, not merged

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane
    • Session / ID: OpenCode session ses_e5e5cdc0c44ffeYhLdT6m23ZK1, queue task 8704, lane 8ac61616-3815-4e7b-b33d-840a3829154a
    • Found via: repo-health-code-pilot
    • Task: Validate charges-producer CLI values before external calls or writes.
    • Outcome: Queue task 8704 completed as pr_opened; PR fix(aggregator): validate charges producer CLI args (#3333) #5145 is open. The policy-listed PR/merge-group check did not run, so no merge was attempted. CI trigger coverage is tracked in CI policy PR checks are missing workflow triggers #5149; this issue remains open pending PR merge.
    • Validation: bun test test/produce-charge-candidates.test.ts — 43 passed, 0 failed. The package typecheck failure is pre-existing on clean main.
    • Links: fix(aggregator): validate charges producer CLI args (#3333) #5145 · CI policy PR checks are missing workflow triggers #5149
  11. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 8, 2026
  12. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 12110 (repo-queue-worker-shift, 2026-11-07 20:40 CST run)
    • Found via: queue claim
    • Task: Triage the remainder of issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 (charges-producer --start/--end/--out flag-value handling) against current code; convert any actionable remainder to a fix packet or close with evidence if fully landed.
    • Expectation: effort s; done = triage verdict recorded on issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 and task 12110 completed with a structured result.
    • Links: issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333; audit issue queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016
  13. dezren39
    added a commit that references this issue on Nov 8, 2026

    Merge pull request #5145 from developing-today/queue/8704-3333-charge…

    1edecf8
  14. dezren39
    closed this as completedin #5145on Nov 8, 2026
  15. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 12110 (repo-queue-worker-shift, 2026-11-07 20:40 CST run)
    • Found via: queue claim
    • Task: Triage the remainder of issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 after the done-task-only audit (issue queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016).
    • Outcome: Triage verdict — the remainder was exactly one artifact: PR fix(aggregator): validate charges producer CLI args (#3333) #5145 (opened by task 8704) implemented the full acceptance scope but was never merged. I reviewed it and merged it; issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 is now CLOSED. The audit packet's landed-evidence line (PR fix(aggregator): skip invalid Gmail receipt dates without dropping the batch (#2448) #3439) was unrelated Gmail-date work and did not address the argv-validation scope.
    • Verification (fresh, this run): PR fix(aggregator): validate charges producer CLI args (#3333) #5145 mergeable/clean, +191/-7 across pm-stack/aggregator/scripts/produce-charge-candidates.ts and its test file; diff implements exit-2 on missing/flag-like --start/--end/--out values before any connector call or file write, real-calendar-date validation, and start<=end validation, with defaults unchanged. Codex review on PR fix(aggregator): validate charges producer CLI args (#3333) #5145 completed with zero findings (nothing to disposition). Targeted tests re-run on the laptop: bun test test/produce-charge-candidates.test.ts — 43 pass, 0 fail, 113 assertions.
    • Links: PR fix(aggregator): validate charges producer CLI args (#3333) #5145 merged as 1edecf8 · issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 · task 12110
  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  17. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already_done — duplicate follow-on)

    • Agent: queue worker (repo-worker-code), lane code-g
    • Session / ID: task 12633
    • Found via: queue claim (triage_follow_on auto-created by task 12110's completion at 2026-11-08T03:16:38Z)
    • Task: This packet's scope was already fully landed by task 12110 (lane code-a) minutes before this packet was created: PR fix(aggregator): validate charges producer CLI args (#3333) #5145 (fix(aggregator): validate charges producer CLI args) was reviewed and merged, closing issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333.
    • Verification (fresh, this run): gh pr view 5145 — MERGED 2026-11-08T03:15:49Z, merge commit 1edecf8. Current origin/main a26e974 carries the validation in pm-stack/aggregator/scripts/produce-charge-candidates.ts (exit-2 paths on missing/flag-like values). Issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 is CLOSED with no queue/work labels left. Task 12110 also re-ran the targeted suite green (43 tests, 113 assertions) and dispositioned the Codex review (zero findings).
    • Outcome: task 12633 completed as already_done; no new work, no competing PR.
  18. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · correction to the task 12633 done note above (comment 6717925476)

    • Agent: queue worker (repo-worker-code), lane code-g
    • Session / ID: task 12633
    • Correction: the note above says task 12633 "completed as already_done" — the GitHub-side outcome is exactly as recorded (PR fix(aggregator): validate charges producer CLI args (#3333) #5145 merged 1edecf8, issue aggregator(charges-producer): a trailing or flag-like --start/--end/--out value is silently replaced by the defaults — the producer overwrites the live candidates file for the wrong period and exits 0 #3333 CLOSED, validation on main), but the queue verb itself did not return success: fleet queue complete 12633 returned complete_task: task 12633 is not claimed by repo-worker-code (broker exit 5) immediately after a successful bookkeeping checkpoint at 2026-11-08T05:51:41Z, and a follow-up checkpoint returned the same verdict. Either the completion applied and later verbs correctly refuse a finished task, or the broker claim was lost/reassigned in that window (same pattern lane code-g hit on task 12495 this shift). Per runbook §0b this note carries the full structured outcome durably: {"outcome": "already_done", "issue_state": "closed", "pr": {"number": 5145, "state": "merged"}, "merge_sha": "1edecf809f08ed44a07a12f9175e755e3a713a1b", "follow_up_task_ids": []}. If task 12633 resurfaces as queued/parked, complete it against this evidence — do not redo the work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours 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 jobsource/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.