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): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota · Issue #3921 · developing-today/code

aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921

New issue
Copy link
New issue
Copy link
Closed
Closed
aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota#3921
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/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

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

Finding

isQuotaPool (pm-stack/aggregator/src/feed.ts:321-334) — the gate whose doc comment promises "One quota pool whose own shape is safe to hand to the renderers (#2429)" — validates a pool's credential rows only as records holding a windows array, and never checks activeSessions at all. sanitizeQuotaView (feed.ts:392-408) filters credential-row windows and pool windows, but passes credential label/freshness and every activeSessions entry through untouched. renderQuota then dereferences both unguarded, so one malformed row or session entry that no producer emits crashes the whole /quota render instead of dropping at the boundary like its sibling fields do (#2429's drop-and-count pattern).

The QuotaCredentialRow contract (model.ts:269-282) requires label: string, providerId: string, and a required freshness: PoolFreshness (measuredAt/source/state). The only producer, credentialRows (quota-current.ts:195-214), always emits all three. activeSessions (model.ts:256) is { session: string; model: string; tokens: number }[]; the collector (scripts/collect-fleet-feed.ts:580-587) always emits that shape.

Evidence (main 33aefa7, verified this run)

  • feed.ts:326-331 — credentials check is only isRecord(row) && Array.isArray(row.windows); no label, providerId, or freshness check. activeSessions is never mentioned in the gate.
  • feed.ts:399-406 — sanitizeQuotaView maps credential rows replacing only windows; a row's missing/null freshness survives sanitization.
  • render.ts:2045-2048 — c.freshness.state === "ok", esc(c.freshness.state), c.freshness.error dereferenced unguarded on every credential row.
  • render.ts:2035-2040 — (p.activeSessions ?? []).map((s) => … s.tokens.toLocaleString()): a non-array value, a null element, or an element without tokens all throw.
  • Laptop Bun probe (~/git/fleet/probe-2026-11-01-laneB-credrows/, real feed.ts/render.ts/model.ts copied from the laptop primary at 33aefa7; sha256 feed.ts d62b3096…, render.ts 061fc8ad…, model.ts f987be93… — identical to sandbox main; control pool with a well-formed credential row + active session renders OK, 25,787 bytes):
    • credentials: [{ windows: [] }] (no label/providerId/freshness) → gate true, droppedPools=0, renderQuota throws TypeError: undefined is not an object (evaluating 'c.freshness.state')
    • credentials: [{ …, freshness: null }] → gate true, throws TypeError: null is not an object (evaluating 'c.freshness.state')
    • credentials: [{ …, freshness: "ok" }] (string) → gate true, renders — the row's state silently renders blank (falsified, no crash)
    • activeSessions: [null] → gate true, throws TypeError: null is not an object (evaluating 's.session')
    • activeSessions: "s1" → gate true, throws TypeError: (p.activeSessions ?? []).map is not a function
    • activeSessions: [{ session: "s1", model: "gpt" }] (no tokens) → gate true, throws TypeError: undefined is not an object (evaluating 's.tokens.toLocaleString')
    • activeSessions: [{ …, tokens: "5000" }] → gate true, renders the string verbatim (no crash; type falsified)

Why it matters

/quota is the fleet's quota page; its feed is a hand-/script-produced JSON document, exactly the input the #2429 gate-and-sanitize boundary exists to fail soft against. Every sibling surface in the same pool — windows, burn segments, charges, subscriptions — drops malformed elements individually and counts the drops. Credential rows and active sessions are the two remaining unguarded dereferences in the same renderer: one bad row takes the whole page down (and the unsanitized shape is also served verbatim by /api/quota.json) instead of losing one row.

Acceptance criteria

  • A pool whose credential rows lack a string label/providerId or a record freshness with a valid state, or whose activeSessions is not an array of { session: string, model: string, tokens: finite number }, no longer crashes renderQuota; the owning layer is pinned (extend isQuotaPool vs drop-and-count in sanitizeQuotaView, following the aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429 pattern) and applied consistently to both surfaces, with drops counted/surfaced where the sanitizer owns them.
  • A well-formed pool with credential rows and active sessions (existing fixtures/tests) renders unchanged.
  • Regression tests cover at least: credential row without freshness, freshness: null, activeSessions: [null], a non-array activeSessions, and a session entry without tokens.

Dedup: #2429 (closed) built the pool/window gate and sanitizer — its credential check stopped at record+windows and it never touched activeSessions. #3427/#3428 cover quota window/burn fields, #3513/#3458 subscriptions/charges, #3897/#2417 the orchestration section — different fields in different gates. Searches for "isQuotaPool" and "activeSessions" across open and closed issues return no covering issue.

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/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    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 job (new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run 2026-11-01 12:20 CST
    • Found via: filed this run
    • Task: Filed this issue after verifying the gap on main 33aefa7 with a laptop Bun probe over the real feed.ts/render.ts (probe-2026-11-01-laneB-credrows); enqueuing a triage packet for the queue worker.
    • Expectation: effort/s — triage confirms on current main and routes the fix (gate vs sanitize layer pinned, regression tests).
    • Links: aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921
  3. dezren39
    added
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  4. github-actions
    assigned
    dezren39
    on Nov 1, 2026
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  6. 51 remaining items

  7. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [5876, 6237, 8295] were marked done, and some work did land:

    • Direct commits referencing this issue: 02a3b95

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11683.

  8. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Handed off to opencode claimant: task 12132 claimed by lane code-e, execution lane assigned opencode. The claimant launches the bound opencode session for issue #3921; this lane does not work it directly.

  9. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code, lane code-d)
    • Session / ID: task 12132
    • Found via: queue claim
    • Task: Triage the remainder of issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 (aggregator(feed) isQuotaPool credential-row / activeSessions) — handed off to the opencode claimant per the execution-lane assignment (§1b); this worker does not work it directly.
    • Expectation: claimant launches the bound opencode session; triage verdict recorded on issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921, remainder converted to a fix packet if actionable. Note: task 12132 is at attempt 3/3 — claimant launch before lease expiry (2026-11-08T05:40:34Z) is time-critical.
    • Links: task 12132 · issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921
  10. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-p
    • Session / ID: task 12132
    • Found via: queue claim
    • Task: Triage remainder of issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 on current state. Execution lane assigned opencode per §1b — handing off to the laptop opencode claimant; this worker does not work the task directly.
    • Expectation: effort s; done = triage verdict recorded on issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 and any actionable remainder converted to a fix packet, per task 12132 acceptance.
    • Links: issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921; task 12132 parked 1200s for the claimant window.
  11. developing-today
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 8, 2026
  12. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: repo queue worker, lane code-b (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-b run 2026-11-07; task 12132
    • Found via: claimed task 12132 this shift; execution-lane assignment returned opencode
    • Task: task 12132 for issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 (triage). Fresh check via REST: issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 is OPEN, labels kind/bug, task/small-fix, status/parked, source/creator, priority/low, queue/parked, work/assigned, effort/s, app/aggregator, app/pm-stack — no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit). Handed off to the opencode claimant — the claimant launches the bound opencode session; this lane does not work it directly.
    • Expectation: claimant session drives task 12132 to a terminal state.
    • Links: task 12132 · issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: repo-worker-code (openchamber-scheduled-lane)
    • Session / ID: OpenCode scheduled lane 9aca43b4-5439-4939-9f71-323f5d32521b; queue task 12132
    • Found via: repo-queue claim in repo-health-code-pilot (triage: remainder after partial verification)
    • Task: Re-triage the remainder of aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 on current state. Verdict: already landed, nothing left — no fix packet needed.
    • Evidence (origin/main a26e974): PR fix(aggregator): sanitize quota credential/session rows (#3921) #4508 (merged 2026-11-02, 02a3b9559b3c) landed exactly the scope the issue asked for:
      • feed.ts isQuotaCredentialRow now requires string label, string providerId, array windows, and a valid freshness (isQuotaFreshness: ISO measuredAt, string source, state in ok/stale/error, optional string error).
      • isQuotaActiveSession requires string session, string model, non-negative tokens; a non-array activeSessions becomes [] and counts once.
      • sanitizeQuotaView drops malformed credential rows and session entries individually, preserving valid siblings, and reports droppedCredentialRows / droppedActiveSessions in quota provenance.
      • Pool-level freshness is validated too (invalid → dropped and counted, windows/siblings kept).
    • Tests: bun test test/feed.test.ts test/render.test.ts test/quota-current.test.ts on current main — 152 pass, 0 fail, including the aggregator(feed): isFleetFeed checks only that quota.pools is an array — burn/choices, pool entries and windows unvalidated, one malformed pool crashes /quota #2429 gate/sanitization suite covering missing/null credential freshness, invalid ISO dates, and malformed activeSessions (dropped-count assertions).
    • Note on the queue history: earlier tasks [5876, 6237, 8295] were marked done without landing evidence, but the merged PR does close the full scope. The only gap was a closing keyword, so this issue is closed here with evidence rather than re-queued.
    • Links: issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921; PR fix(aggregator): sanitize quota credential/session rows (#3921) #4508; task 12132
  14. dezren39
    closed this as completedon Nov 8, 2026
  15. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  16. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked_up

    • Agent: repo-worker-code (openchamber-scheduled-lane)
    • Session / ID: OpenCode scheduled lane 9aca43b4-5439-4939-9f71-323f5d32521b; queue task 12132; attempt 3
    • Found via: repo-queue claim in repo-health-code-pilot
    • Task: Revalidate the claimed remainder of issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921 against current main and merged PR evidence.
    • Next: Determine whether any issue scope remains; if fully landed, close with evidence, otherwise enqueue only the remainder.
    • Links: issue aggregator(feed): isQuotaPool never checks credential-row label/freshness or activeSessions — a windows-only credential row or a null session crashes renderQuota #3921; task 12132
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/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.