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(feed): isFleetFeed never checks chargesAttention — one malformed entry crashes usage() and takes down /quota + the quota JSON twins · Issue #2439 · 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/triageQueue packet kind: verify, reproduce, and route this item DescriptionProblem
Evidence (verified this run, main
|
chargesAttention |
isFleetFeed |
verbatim map |
|---|---|---|
| valid entry (control) | true |
OK — 1 flag, $12.50 |
[null] |
true |
throws TypeError: null is not an object (evaluating 'u.merchant') |
entry missing amountUsd |
true |
throws TypeError: undefined is not an object (evaluating 'u.amountUsd.toFixed') |
amountUsd: "12.50" (string) |
true |
throws TypeError: u.amountUsd.toFixed is not a function |
"oops" (non-array) |
true |
throws TypeError: (feed.chargesAttention ?? []).map is not a function |
chargesAttention is the exactly-once surfacing channel for unmatched
SaaS/AI charges (#1057): the collector emits these entries from Plaid/Gmail
candidate data, so a single drifted or hand-edited feed entry takes down
/quota and both quota JSON twins entirely instead of dropping one flag.
This is the same failure class as #2427 (attention entries) and #2429
(quota pools) at the same gate — the fix should stay consistent with
whatever layer those two pin.
isFleetFeed can no longer crash usage(): either thechargesAttention (array of entries with stringmerchant/at and finite number amountUsd), or the live source[null] entry, entry missing amountUsd,amountUsd, non-array chargesAttention — each rendering thegh searches (open + closed) for chargesAttention and isFleetFeed charges returned no covering issue. Siblings at the same gate: #2427
(attention entries), #2429 (quota pools) — distinct fields and consumers.
#2130/#2194 cover charges-match/charges-collect internals, not the feed
gate or the live usage() consumer.
🤖 Agent note · filed
Merge pull request #3435 from developing-today/queue/5328-2439-charge…
🤖 Agent note · done
ba2e97dd1b89843a0ef47597c6303c26916bb607); aggregator(feed): isFleetFeed never checks chargesAttention — one malformed entry crashes usage() and takes down /quota + the quota JSON twins #2439 closed.🤖 Agent note · picked up
🤖 Agent note · done (triage)
Verdict: CONFIRMED at current main a17ae136 (2026-11-01).
Evidence (fresh, this run):
pm-stack/aggregator/src/feed.ts:398-414 — isFleetFeed checks version / generatedAt / quota pools+burn+choices / attention array only. chargesAttention is unchecked in any form. loadFeed (feed.ts:422+) sanitizes ONLY the quota section via sanitizeQuotaView.pm-stack/aggregator/src/sources/live.ts:893-900 — (feed?.chargesAttention ?? []).map(...) dereferences u.merchant, u.amountUsd.toFixed(2), u.at, u.source unguarded; computed before every usage() return path (fix(aggregator): live source consumes auto-matched charges only inside the saas gate, so a quota-view failure hides them all (PR #2149) #3124), so /quota, /quota/service, /api/quota.json and /api/quota/service.json all inherit the crash.[null] → TypeError on u.merchant; missing amountUsd → TypeError on u.amountUsd.toFixed; string amountUsd → toFixed is not a function; non-array chargesAttention → .map is not a function — all with isFleetFeed=true.Layer pinned — the landed #2429 pattern in the same file (gate + loadFeed sanitizer, PR #3070), NOT a live-source filter:
isFleetFeed): section-level shape only — chargesAttention present-but-non-array rejects the feed (mirrors the burn/choices treatment); absence stays valid (optional section).loadFeed): new isUnmatchedCharge element validator + arrayOf drop-and-count, count surfaced on the feed (mirroring quotaDropped). Element contract = exactly the fields live.ts dereferences: string merchant, finite number amountUsd, string at. (source/normalized are not gate-required: the consumer tolerates any source value.)Regression tests named in the fix packet: test/feed.test.ts ([null], missing amountUsd, string amountUsd, non-array, mixed valid+malformed, well-formed unchanged, collector-emitted feed still accepted) + an end-to-end live usage() case in test/charges-feed-gate.test.ts.
Sibling note: #2427 (attention entries) is a different section/consumer — its triage (task 3640) is in flight separately; this ruling does not preempt it.
🤖 Agent note · picked up