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(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip · Issue #2445 · developing-today/code

aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445

New issue
Copy link
New issue
Copy link
Closed
#3437
Closed
aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip#2445
#3437
Copy link
Assignees
dezren39
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/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Problem

isFleetFeed (pm-stack/aggregator/src/feed.ts:207-219) never validates the
optional charges section at all — it checks only version, generatedAt,
quota.pools being an array, and attention being an array. But the live
source serves feed.charges verbatim as the usage view's charge rows, and
the /quota renderer dereferences every row unguarded, so one malformed
row in a feed that passes the gate crashes the whole Usage & billing page.

Evidence (verified this run, main 5a34fa70)

  • feed.ts:47-48: FleetFeed.charges?: ChargeRow[], where ChargeRow
    (model.ts:1169-1178) requires at: string, label: string,
    amountUsd: number, method: string, source: string.
  • feed.ts:207-219: isFleetFeed contains no charges check of any
    kind — not array-ness, not entry shape.
  • sources/live.ts:808-815: in usage()'s feed branch (taken whenever
    feed.saas is non-empty), the section is passed through verbatim:
    charges: feed.charges ?? [] — no filter or per-entry guard, unlike the
    registry / projects / snapshots consumers in the same file, which
    validate or filter first.
  • render.ts:1734-1746 (chargesStripHtml, called from renderQuota):
    rows are mapped with c.amountUsd.toFixed(2) and totalled with
    usage.charges.reduce((sum, c) => sum + c.amountUsd, 0) — a null row,
    a missing amountUsd, or a string amountUsd all throw; a non-array
    string charges throws on .map.
  • server.ts:486-487: /quota awaits source.usage() and calls
    renderQuota(...) with no catch, so the throw becomes a 500 for the
    entire usage hub page — not just a missing charges strip.
    /api/quota.json (server.ts:656-665) does not crash, but serializes
    the malformed rows verbatim to API consumers. A non-array object
    charges is silently swallowed instead (length is undefined, so the
    strip renders "No charge evidence") — real charge rows vanish with no
    signal.

Laptop Bun probe (~/git/fleet/probe-2026-10-29-laneA-feedcharges/, real
feed.ts + render.ts from main 5a34fa70, md5-identical, Bun 1.4.2;
usage view assembled exactly as live.ts:811-815 assembles it):

charges isFleetFeed renderQuota (the real /quota render)
valid entry (control) true OK — renders, $12.50 row present
[null] true throws TypeError: null is not an object (evaluating 'c.at')
entry missing amountUsd true throws TypeError: undefined is not an object (evaluating 'c.amountUsd.toFixed')
amountUsd: "12.50" (string) true throws TypeError: c.amountUsd.toFixed is not a function
"oops" (non-array string) true throws TypeError: usage.charges.map is not a function
{amountUsd: 1} (non-array object) true no throw — charges strip silently renders "No charge evidence"
[valid, null] mixed true throws — the valid row never renders

Why it matters

charges is the hub's charge-evidence strip (§2.4): the collector emits
these rows from Plaid/Gmail receipt records, so a single drifted or
hand-edited feed row takes down /quota entirely instead of dropping
one row, and the JSON twin silently serves the garbage onward. This is
the same failure class as #2427 (attention entries), #2429 (quota pools)
and #2439 (chargesAttention) at the same gate — the fix should stay
consistent with whatever layer those pin. Note this issue is the
charges field specifically: #2439 covers the separate
chargesAttention field and its usage() flag map.

Acceptance criteria

  • A feed passing isFleetFeed can no longer crash /quota: either the
    gate validates charges (array of entries with string
    at/label/method/source and finite number amountUsd), or the
    live source filters/defaults malformed entries before the view is
    built — the layer pinned consistently with the aggregator(feed): isFleetFeed never checks attention entries — one null entry crashes /attention + /today, entries without a string sessionId silently collapse into one #2427/aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429/aggregator(feed): isFleetFeed never checks chargesAttention — one malformed entry crashes usage() and takes down /quota + the quota JSON twins #2439
    rulings.
  • Malformed entries are dropped individually; well-formed entries in the
    same array still render, and the strip total sums only valid rows.
  • A non-array charges degrades the same way (rows dropped, page
    renders), never throws and never silently masquerades as "no charge
    evidence" when valid rows were present.
  • Regression tests cover: [null] entry, entry missing amountUsd,
    string amountUsd, non-array charges (string and object) — each
    rendering the valid remainder, never throwing; a well-formed feed
    unchanged, and the collector still accepts its own emitted feed.

Dedup

gh searches (open + closed) for charges isFleetFeed and feed charges validator returned no covering issue. Siblings at the same
gate: #2427 (attention), #2429 (quota pools), #2439 (chargesAttention —
distinct field, distinct consumer in usage()). #2130/#2194 cover
charges-match/charges-collect internals, not the feed gate, the live
usage() pass-through, or the /quota render.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1248

  2. 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/xsTrivial: expected under 30 minutes of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run 2026-10-29T22:12Z
    • Found via: filed this run
    • Task: Triage the unvalidated charges section at the isFleetFeed gate — pin the validation layer (gate vs live-source filter, consistent with aggregator(feed): isFleetFeed never checks attention entries — one null entry crashes /attention + /today, entries without a string sessionId silently collapse into one #2427/aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429/aggregator(feed): isFleetFeed never checks chargesAttention — one malformed entry crashes usage() and takes down /quota + the quota JSON twins #2439), then route a small_fix packet.
    • Expectation: effort/xs triage; done = layer pinned and fix packet routed with the named regression tests.
    • Links: probe ~/git/fleet/probe-2026-10-29-laneA-feedcharges/ (laptop, real feed.ts + render.ts from main 5a34fa7, md5-identical)
  4. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  5. dezren39
    added 3 commits that reference this issue on Nov 1, 2026

    fix(aggregator): surface chargesDropped in usage provenance on all re…

    ac2f33e

    fix(aggregator): sanitize feed charges at loadFeed — isChargeRow drop…

    4d7f643

    Merge pull request #3437 from developing-today/queue/5329-2445-charge…

    a11cfea
  6. dezren39
    closed this as completedin #3437on Nov 1, 2026
  7. 17 remaining items

  8. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane E shift
    • Session / ID: queue task 5329
    • Found via: queue claim
    • Task: Implement pinned loadFeed charges sanitization for aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445: isChargeRow validator + drop-and-count in feed.ts, tests in feed.test.ts
    • Expectation: effort xs/s; done = PR merged, aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445 closed, tests green
    • Links: branch queue/5329-2445-charges-sanitize (to be created on laptop)
  10. developing-today
    added
    status:in-review
    on Nov 1, 2026
  11. dezren39
    added 2 commits that reference this issue on Nov 1, 2026

    fix(aggregator): restore closing brace of isUnmatchedCharge dropped i…

    5d2fb55

    feat(aggregator): alert throat — sentinel intake, Supabase ledger, We…

    b96ef99
  12. developing-today
    added
    status:in-review
    and removed
    status:done
    on Nov 1, 2026
  13. developing-today
    reopened this on Nov 1, 2026
  14. dezren39
    added a commit that references this issue on Nov 1, 2026

    Merge pull request #3679 from developing-today/fix/feed-ts-missing-brace

    179ac8e
  15. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 1, 2026
  16. developing-today
    closed this as completedon Nov 1, 2026
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)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/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.