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): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0 · Issue #4663 · developing-today/code

aggregator(charges-producer): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0 #4663

New issue
Copy link
New issue
Copy link
Closed
#4670
Closed
aggregator(charges-producer): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0#4663
#4670
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/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 jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Problem

In staged mode (#4641), the charge-candidates producer takes its period from the fetcher's charge-inputs-manifest.json — and never validates it:

  • pm-stack/aggregator/scripts/produce-charge-candidates.ts main() (:371-378): start = manifest.start; end = manifest.end; straight from JSON.parse, with no presence, format, calendar, or ordering check. The same file already imports and applies isRealCalendarDate to every Plaid transaction date (:133) and every Gmail message day (:326) — the manifest period is the one date input exempt from it.
  • A manifest whose start/end are missing (e.g. a fetcher schema drift or a hand-staged directory) makes start/end undefined: the Gmail path dies on d.replaceAll inside gmailCandidates and is swallowed by main's catch ("plaid candidates only"), the Plaid path ignores the period entirely in staged mode, and the producer writes a candidates file with period: {} (undefined fields vanish in JSON.stringify), logs undefined..undefined, and exits 0.
  • The daily collector consumes the file keyed by its period; a period-less batch is indistinguishable from a successful run at the exit-code/log level the fleet monitors, so the corruption surfaces only as missing/misattributed charges downstream. A malformed date string (e.g. 2026-13-40) or an inverted window (end before start) passes the same way: nothing ever compares the staged payloads against a real window.

This is the manifest counterpart of the staged-mode contract at :66-69: staging that does not describe a real period is absent staging, and must fail visibly.

Evidence (verified this run, laptop probe at origin/main 17610f5)

Probe: ~/git/fleet/probe-2026-11-02-laneB-chargestaged/ — producer extracted verbatim from origin/main (script md5 70bff805), complete staging (both Gmail triage responses, one Plaid transaction, one Gmail receipt), manifest replaced with {"note":"no period fields"}:

  • Output: producer: wrote out-probe2.json — 1 candidates for undefined..undefined (plaid 1, gmail 0, gmail skipped 0), exit 0; stderr producer: gmail read failed (undefined is not an object (evaluating 'd.replaceAll')); plaid candidates only.
  • The written file's period is literally "period": {}.
  • Control with the good manifest ({"start":"2026-11-01","end":"2026-11-02"}) in the same probe directory: 2 candidates, correct period, exit 0.

Related: #4660 (staged triage fallback in the same feature — different mechanism: the triage loop, not the manifest read), #4641 (the staged split), #3333 (live-mode --start/--end argument handling — different input path).

Acceptance criteria

  • In staged mode, a manifest with a missing, malformed, non-calendar, or inverted (end < start) period fails the run visibly: non-zero exit and no candidates file presented as a successful batch.
  • Validation reuses the file's existing isRealCalendarDate standard for both fields.
  • With a valid manifest, staged output is unchanged (control case above).
  • Live mode (env unset) is unchanged.
  • A regression test or scripted fixture covers the missing-fields manifest case.

Activity

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

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b, run 2026-11-02 17:20 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop (probe probe-2026-11-02-laneB-chargestaged @ origin/main 17610f5): a staged manifest without start/end makes the producer write a candidates file with period: {}, log undefined..undefined, drop Gmail via a swallowed TypeError, and exit 0 — the manifest period is the one date input never passed through the file's own isRealCalendarDate checks.
    • Expectation: effort/xs — triage confirms the unvalidated manifest read and routes the fix (validate both fields as real calendar dates, end >= start, fail visibly otherwise).
    • Links: queue packet creator-b-2026-11-02-1720/packets/packet-4663-triage.json (enqueued to repo-health-code-pilot); companion staged-mode defect aggregator(charges-producer): staged mode falls back to the live Gmail CLI when gmail-triage.json is short — the whole Gmail source is silently dropped and the run exits 0 #4660
  3. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  4. 15 remaining items

  5. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 3, 2026
  6. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    Agent note — parked (CI pending)

    • Agent: queue worker (repo-worker-code), lane code-k
    • Session / ID: queue task 6627, 2026-11-03T00:45Z
    • State: parked 20 minutes on CI; claim released by park verb.
    • Work done this claim: opened PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 from the pushed branch queue/6627-4663-staged-manifest-period (head 5239c6c0d, re-verified fresh) — the prior lane was rate-limited out of PR creation. PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 is MERGEABLE, diff is exactly the producer + its test, Codex review completed with no findings. Prior-lane verification stands in task 6627 checkpoints: bun tests 29+31 pass, probe rerun correct.
    • Resume: basic guard check on PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 green → merge → complete task 6627 as fixed_merged (PR body carries Fixes aggregator(charges-producer): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0 #4663).
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-f
    • Session / ID: task 6619
    • Found via: queue claim
    • Task: Triage issue aggregator(charges-producer): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0 #4663 — confirm the staged charges producer never validates the manifest period and route the fix.
    • Expectation: effort/xs; done = confirmed verdict on current main plus a routed fix task.

    Triage verdict: CONFIRMED on current main (17610f5, verified fresh via gh raw read of pm-stack/aggregator/scripts/produce-charge-candidates.ts this shift):

    • :371-376 — staged branch: const manifest = JSON.parse(...), then start = manifest.start; end = manifest.end; with no presence, format, calendar, or ordering check anywhere in the file for the manifest period (grep: manifest occurs only at :369-376).
    • isRealCalendarDate is imported at :58 and applied to Plaid transaction dates (:133) and Gmail message days (:326) — the manifest period is the one date input exempt.
    • The Gmail failure from undefined bounds is swallowed by main's catch ("plaid candidates only"), after which the producer writes period: {start, end} — undefined fields drop in JSON.stringify, yielding the literal period: {} — and exits 0. This matches the creator's laptop probe on the same commit (field-less manifest → 1 candidates for undefined..undefined, exit 0, file period {}; good-manifest control → 2 candidates, correct period).

    Routing: fix enqueued as task 6627 (small_fix, dedupe_key repo-health:v1:fix:developing-today/code:issue:4663): validate both manifest fields with isRealCalendarDate plus end >= start in the staged branch before any candidate work; any failure exits non-zero with no successful candidates file; regression fixture for the missing-fields case; live mode unchanged. Issue #4663 stays open for task 6627.

  8. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up — PR #4670 conflicted with main, fixing forward

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 6627 (resumed at stage awaiting_ci)
    • Found via: queue claim
    • Task: validate the staged manifest period in the charges producer for issue aggregator(charges-producer): staged mode never validates the manifest period — a field-less manifest writes a candidates file with period {} and exits 0 #4663 (PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670)
    • State: revalidated fresh 2026-11-03T00:40Z: PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 open at head 5239c6c, tests verified by the prior lane (29 + 31 pass, probe rerun correct), no Codex findings. BUT the PR is now CONFLICTING/DIRTY against current main, and its basic guard run 41550668874 is QUEUED in the repo-wide runner jam (issue main-broken: developing-today/code id @bd88019 — nix flake check #2186).
    • Next: merge current main into branch queue/6627-4663-staged-manifest-period in the laptop worktree, resolve, re-run the targeted bun tests, push, then merge under the standing criteria.
    • Links: PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 · task 6627
  10. dezren39
    added a commit that references this issue on Nov 3, 2026

    Merge pull request #4670 from developing-today/queue/6627-4663-staged…

    3001d37
  11. dezren39
    closed this as completedin #4670on Nov 3, 2026
  12. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  13. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — PR #4670 merged, issue #4663 closed

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 6627
    • Result: PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 merged at 2026-11-03T00:43:36Z, merge commit 3001d37. The staged charges producer now validates the manifest period (both fields present, real calendar dates, end >= start) before any candidate work; a field-less manifest fails visibly with no candidates file.
    • Conflict fixed forward: main had landed the sibling aggregator(charges-producer): staged mode falls back to the live Gmail CLI when gmail-triage.json is short — the whole Gmail source is silently dropped and the run exits 0 #4660 fix in the same test file; merge 8f5c4c6 resolved it keeping both suites — bun test test/produce-charge-candidates.test.ts 31/31 pass at the merged head. Full aggregator suite: 1206 pass, 2 fail + 1 error, all verified pre-existing on clean origin/main (brief-surfaces render failure; web-push package missing in alerts) — unrelated to this change.
    • CI note: the basic guard never left the queue (repo-wide Actions runner jam, issue main-broken: developing-today/code id @bd88019 — nix flake check #2186 / task 6603). Merged under the standing merge authority after laptop verification; fix forward if the guard flags this on main.
    • Links: PR aggregator(charges-producer): validate the staged manifest period (#4663) #4670 · task 6627
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/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 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.