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 saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback · Issue #2451 · developing-today/code

aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451

New issue
Copy link
New issue
Copy link
Closed
Closed
aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback#2451
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 Oct 29, 2026
Issue body actions

Problem

isFleetFeed (pm-stack/aggregator/src/feed.ts:207-219) never validates
the optional saas section at all — it checks only version,
generatedAt, quota.pools being an array, and attention being an
array. But saas is the section that gates the live source's whole
usage branch, and the services it carries are served verbatim into the
attention-flag builder and the /quota service cards, which
dereference every entry unguarded. One malformed entry in a feed that
passes the gate crashes the entire Usage & billing page — inside
usage() itself, before rendering starts.

Evidence (verified this run, main 5a34fa70)

  • feed.ts:42-43: FleetFeed.saas?: SaasService[] (shape at
    model.ts:1121-1147: string id/name/plan, metrics: UsageMetric[], conflicts: string[], paygEstimate object-or-null,
    numeric cadenceDays, etc.).
  • feed.ts:207-219: isFleetFeed contains no saas check of any
    kind — not array-ness, not entry shape.
  • sources/live.ts:808-815: usage()'s feed branch is taken whenever
    feed.saas is truthy with a non-zero length, and the section is
    passed through verbatim: services: feed.saas — no filter or
    per-entry guard, unlike the registry / projects / snapshots
    consumers in the same file, which validate or filter first.
  • sources/live.ts:832: usage() calls
    buildAttentionFlags(feed.quota, partial) while building its return
    value; derive.ts:823-848 dereferences svc.metrics and
    svc.paygEstimate.high per entry — a null entry or an entry missing
    metrics throws here, inside usage(), so every route that awaits
    usage() fails.
  • render.ts:1808-1809,1703-1720: renderQuota filters
    usage.services by s.group and each surviving card dereferences
    svc.metrics.filter(...), svc.conflicts.length,
    svc.billedUsd.toFixed(2), svc.paygEstimate.low|high.toFixed(2) —
    an entry with a valid group but missing conflicts throws in the
    render even though the flag builder passed it.
  • server.ts:486-487 (/quota), :492 (/quota/service/:id — also
    usage.services.find((s) => s.id ...)), :656-665
    (/api/quota.json): all await source.usage() with no catch, so
    the throw becomes a 500 for the whole hub page and both JSON twins.

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

saas isFleetFeed feed branch taken (live.ts:808) buildAttentionFlags (in usage()) renderQuota
valid entry (control) true yes OK OK — card renders
[null] true yes throws TypeError: null is not an object (evaluating 'svc.metrics') throws on s.group
"oops" (non-array string) true yes (.length 4) throws on svc.metrics (iterates chars) throws usage.services.filter is not a function
{...} (non-array object) true no — .length undefined, usage() silently falls back to direct extraction and the feed section is ignored n/a on the live path n/a on the live path
entry missing metrics true yes throws on svc.metrics throws on svc.metrics.filter
entry missing conflicts (valid group) true yes OK throws TypeError: undefined is not an object (evaluating 'svc.conflicts.length')
[valid, null] mixed true yes throws on svc.metrics throws — the valid card never renders

Why it matters

saas is the hub's core section (§2.3): the service cards are the
page, and this section is also the switch that selects the feed path
for the entire usage view — so a single drifted or hand-edited
collector entry doesn't just drop one card, it takes down /quota,
/quota/service/:id and /api/quota.json (and every other usage()
consumer), or — in the non-array-object case — silently discards the
feed's hub sections in favour of a stale direct read with no signal.
This is the same failure class as #2427 (attention), #2429 (quota
pools), #2439 (chargesAttention), #2445 (charges), #2446
(subscriptions) and #2450 (payg) at the same gate — the fix should
stay consistent with whatever layer those pin. This issue is the
saas field specifically, with its own consumers
(buildAttentionFlags + the service cards) and its branch-switch role.

Acceptance criteria

  • A feed passing isFleetFeed can no longer crash usage() or
    /quota via saas: either the gate validates saas (array of
    entries with string id/name/plan, array metrics/conflicts,
    well-formed paygEstimate when non-null), 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/aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445/aggregator(feed): isFleetFeed never checks subscriptions — one null row crashes /quota #2446/aggregator(feed): isFleetFeed never checks payg — one malformed line crashes usage() and /quota #2450 rulings.
  • Malformed entries are dropped individually; well-formed entries in
    the same array still render and still contribute attention flags.
  • A non-array saas value no longer silently switches the whole
    usage view to the fallback path without any provenance/diagnostic
    signal.
  • Regression tests cover: [null] entry, non-array saas (string
    and object), entry missing metrics, entry missing conflicts,
    [valid, null] mixed — 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 payg, isFleetFeed, saas feed
and isFleetFeed never checks returned no covering issue for the feed
saas gate. #1119 is a contract-test request for the
/api/quota.json saas/payg schema — related, but it does not track
this verified crash at the feed gate. Siblings at the same gate:
#2427 (attention), #2429 (quota pools), #2439 (chargesAttention),
#2445 (charges), #2446 (subscriptions), #2450 (payg — filed this run)
— each a distinct field and consumer.

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-1252

  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-code-a
    • Session / ID: new-issue-creator-code-a cron run 2026-10-29 17:35 CDT
    • Found via: filed this run
    • Task: Filed the feed saas validation gap: isFleetFeed (feed.ts:207-219) never checks saas; live.ts usage() takes its feed branch on feed.saas.length (:808) and passes services verbatim (:811) into buildAttentionFlags (derive.ts:823, throws on a null/metrics-less entry) and renderQuota's service cards (render.ts:1808/1703, throws on missing conflicts) — probe on main 5a34fa7, laptop ~/git/fleet/probe-2026-10-29-laneA-feedpayg/probe2.ts (real feed/derive/render, md5-identical).
    • Expectation: effort xs; done when triage pins the 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/aggregator(feed): isFleetFeed never checks charges — one malformed row crashes /quota, a non-array object silently empties the charges strip #2445/aggregator(feed): isFleetFeed never checks subscriptions — one null row crashes /quota #2446/aggregator(feed): isFleetFeed never checks payg — one malformed line crashes usage() and /quota #2450) and routes a small_fix packet with the named regression tests.
    • Links: aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 · sibling aggregator(feed): isFleetFeed never checks payg — one malformed line crashes usage() and /quota #2450 (payg, filed this run, same gate)
  4. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e69a9b3a4ffedFKLpoYRNjKc · queue task 3666
    • Found via: atomic queue claim
    • Task: Triage aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 — verify the saas crash at current main, pin the sanitization layer consistently with sibling rulings, and route a scoped small_fix packet.
    • Expectation: effort xs; done = current-main findings with file:line evidence posted on aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 and a follow-up fix task enqueued.
    • Links: aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451
  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  7. 31 remaining items

  8. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-d
    • Session / ID: task 8596 (pr_shepherd for PR fix(aggregator): sanitize malformed SaaS feed rows #4192)
    • Found via: queue claim
    • Task: Shepherd PR fix(aggregator): sanitize malformed SaaS feed rows #4192 to merge: it was based on a stale main, which was the source of its 2 failing aggregator tests. Merged current origin/main (75d3fe5) into branch queue/5344-2451-sanitize-optional-saas — conflicts in feed.ts/feed.test.ts were additive on both sides (saasDropped for aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 vs paygDropped for aggregator(feed): isFleetFeed never checks payg — one malformed line crashes usage() and /quota #2450; expanded quotaDropped) and were resolved keeping both. Pushed as 2a2394c.
    • Verification: Full aggregator suite on the laptop after the merge: 1418 pass, 0 fail (the 2 previously failing tests — hub service detail, slice-3 routes — now pass; a third local failure was an uninstalled web-push dependency in the fresh worktree, resolved by bun install). bunx tsc --noEmit shows one error in test/overview.test.ts (HealthView conflicts) that is identical on clean origin/main — pre-existing, not from PR fix(aggregator): sanitize malformed SaaS feed rows #4192. Codex review of the previous head reported no findings.
    • Expectation: Merge PR fix(aggregator): sanitize malformed SaaS feed rows #4192 once its CI test check goes green on 2a2394c; close issue aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 with the merge SHA.
  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up (resume)

    • Agent: queue worker (repo-worker-code), lane code-b
    • Session / ID: task 8596
    • Found via: queue claim (resume of parked shepherd)
    • Task: task 8596 — shepherd PR fix(aggregator): sanitize malformed SaaS feed rows #4192 (sanitize malformed SaaS feed rows) for issue aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451 to merge
    • Resume state verified fresh: PR fix(aggregator): sanitize malformed SaaS feed rows #4192 OPEN, head 2a2394c87 (matches checkpoint), MERGEABLE/CLEAN; branch already contains origin/main merge 75d3fe5e8; full aggregator suite on laptop 1418 pass / 0 fail (prior checkpoint); Codex code review completed on 2a2394c87 with no findings; regression tests in test/saas-feed-gate.test.ts cover null rows, non-array saas, and rows missing metrics. The Actions test check never registered on this head (only CodeRabbit) — merging under the standing verified-done merge authority rather than parking again on a stalled check.
    • Links: PR fix(aggregator): sanitize malformed SaaS feed rows #4192 · issue aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451
  11. 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-b
    • Session / ID: task 8596
    • Found via: queue claim (pr_shepherd resume)
    • Task: task 8596 — shepherd PR fix(aggregator): sanitize malformed SaaS feed rows #4192 for issue aggregator(feed): isFleetFeed never checks saas — one malformed service crashes usage() and /quota, a non-array silently switches the whole usage view to fallback #2451
    • Outcome: PR fix(aggregator): sanitize malformed SaaS feed rows #4192 merged (squash, merge commit 541c35541dabe552db540ba87cfce37b9b778b38). The sanitizer now drops malformed SaaS feed rows (null rows, non-array saas, rows missing metrics/conflicts) at the feed boundary with a drop diagnostic instead of crashing usage()//quota or silently switching the whole view to fallback; regression coverage in pm-stack/aggregator/test/saas-feed-gate.test.ts (7 tests). Verification: full aggregator suite on laptop 1418 pass / 0 fail on head 2a2394c87 after merging origin/main; Codex review completed on that head with no findings; the Actions test check never registered on the head (infra stall — only CodeRabbit ran), merge proceeded under the standing verified-done authority.
    • Links: PR fix(aggregator): sanitize malformed SaaS feed rows #4192 · merge 541c35541
  12. dezren39
    closed this as completedon Nov 3, 2026
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 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)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.