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(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading · Issue #2415 · developing-today/code

aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415

New issue
Copy link
New issue
Copy link
Closed
#3429
Closed
aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading#2415
#3429
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

The AA (Cost Explorer) section's only structural gate never checks two required arrays that the renderer dereferences unconditionally, so a section missing them passes validation and crashes the /aa page instead of degrading to "not collected yet".

  • AaSection (pm-stack/aggregator/src/model.ts:937-960) declares sources: AaSourceInfo[] (:943) and thresholds: AaThreshold[] (:945) as required, non-optional fields.
  • isAaSection (pm-stack/aggregator/src/aa.ts:1070-1085) — described at :1069 as the "structural check shared by the collector and the live source" — checks only generatedAt, batch, rankings (non-empty, entries have string testRunKey/family), configs (array) and testRuns (array). It never checks sources or thresholds at all, and testRuns/configs entries are not checked for null.
  • Consumers dereference them bare: summarizeAa iterates section.thresholds (aa.ts:1101) and maps section.testRuns[].snapshotDate (aa.ts:1096-1099); the /aa renderer does s.sources.map(...) (render.ts:4213) immediately after calling summarizeAa(s) (render.ts:4212).
  • The live source (src/sources/live.ts:961-971) is built to fail soft: a section that fails isAaSection returns null and the page renders the "has not reached the dashboard yet" banner. A section that passes the gate but lacks thresholds/sources bypasses that degradation and throws inside the render instead.

Evidence (verified this run on main 5a34fa70)

Sandbox Bun probe importing the real aa.ts (probe at /tmp/probe-laneB-aa/probe.ts):

  • {status:"ok", generatedAt, batch, rankings:[{testRunKey:"k1",family:"Fam"}], configs:[], testRuns:[]} (no thresholds, no sources) → isAaSection returns true; summarizeAa throws TypeError: undefined is not an object (evaluating 't of section.thresholds'); section.sources.map(...) throws the same class of TypeError.
  • Same section with testRuns:[null] → passes the gate; summarizeAa throws TypeError: null is not an object (evaluating 'r.snapshotDate').
  • Control: the same section with thresholds:[] and sources:[] added passes and summarizeAa returns normally.

Why it matters

The fleet feed is produced by a separate collector on another host and ages through absent/degraded forms by design; the gate is the one place that decides "renderable" vs "degrade". Every other section validator in this codebase that feeds a renderer was held to the rule that whatever the renderer dereferences must be gated (see feed.ts's per-goal gate comment, #949). Here a single malformed or older-format feed write takes down the whole Cost Explorer page with a 500-class throw rather than the designed banner — and the failure mode is invisible until someone opens /aa.

Acceptance criteria

  • isAaSection rejects an "ok" section whose thresholds or sources is missing or not an array (entries checked to the same depth the renderer/summarize uses them: at minimum non-null objects for testRuns entries, whose snapshotDate is read).
  • A section failing the strengthened gate degrades through the existing live-source path: aa() returns null and /aa renders the "not collected yet" banner, never a throw.
  • A regression test (aggregator test suite, aa coverage) pins: missing-thresholds, missing-sources, and null-testRuns-entry sections all fail isAaSection; a complete minimal section still passes.
  • Sections the current collector actually emits still pass unchanged (no producer change required, or it is named in the fix).

Dedup

  • aggregator(health): dns/aa section stamps are never validated — a garbage dns generatedAt renders ageMs NaN/null, a future aa generatedAt renders age 0 (maximally fresh) for as long as the skew lasts #2242 (OPEN) is about aa/dns generatedAt stamps never being validated for health age rendering — different fields, different failure. This issue is the missing/invalid thresholds/sources arrays crashing the /aa render.
  • aggregator(dns): isDnsSection never checks totalAnnualListUsd or entry priceUsd — a feed section that passes validation crashes /dns and the usage view on .toFixed #2412/aggregator(registry): non-array taskRefs passes isSessionRecord and crashes mergeRecords' spread — a string one silently splits into single-character refs #2408/aggregator(registry): non-string lastSeenAt passes isSessionRecord and crashes mergeRecords sort — /sessions and /api/registry.json fail once the registry grows #2376 are other aggregator section/record validators (dns, registry) with different fields and consumers.
  • isAaSection / thresholds-gate searches over open+closed issues returned no match for this defect.

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
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

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

    CODE-1233

  3. dezren39
    added
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job (new-issue-creator-code-b, lane B)
    • Session / ID: cron job new-issue-creator-code-b, run 2026-10-29 14:50 CDT
    • Found via: filed this run
    • Task: Filed after verifying on main 5a34fa7 that isAaSection (aa.ts:1070) passes an ok section missing thresholds/sources, and summarizeAa (aa.ts:1101) + the /aa renderer (render.ts:4213) then throw on those exact fields; a triage packet is being enqueued to repo-health-code-pilot.
    • Expectation: effort/xs triage — pin the gate-strengthening shape, then route a small_fix.
    • Links: evidence body in goal hidden_files/issue-code-aa-gate-thresholds-body.md; probe /tmp/probe-laneB-aa/probe.ts (sandbox Bun, real aa.ts)
  5. github-actions
    assigned
    dezren39
    on Oct 29, 2026
  6. 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 1, 2026
  7. 34 remaining items

  8. 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/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    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 F shift
    • Session / ID: queue task 5313 (resumed from park, stage pr_opened)
    • Found via: queue claim
    • Task: Verify and merge PR fix(aggregator): strengthen isAaSection gate — thresholds, sources, testRuns entries (#2415) #3429 — strengthen isAaSection gate for aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415. Re-verified fresh this shift: PR is this task's own queue branch (queue/5313-2415-aa-gate) with no held/user-owned/do-not-merge labels; Codex review completed with no findings at head eedf15e; CodeRabbit pass; MERGEABLE/CLEAN; laptop targeted tests aa-gate-2415 8/8 and aa.test.ts 24/24 pass at head. The earlier ownership park rested on the PR's account authorship, which is the fleet's own credential — the branch, worktree, and checkpoints are this queue task's.
    • Expectation: xs — merge PR fix(aggregator): strengthen isAaSection gate — thresholds, sources, testRuns entries (#2415) #3429, close aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415, complete task 5313.
    • Links: PR fix(aggregator): strengthen isAaSection gate — thresholds, sources, testRuns entries (#2415) #3429 · branch queue/5313-2415-aa-gate
  10. dezren39
    added a commit that references this issue on Nov 1, 2026

    Merge pull request #3429 from developing-today/queue/5313-2415-aa-gate

    12440ac
  11. dezren39
    closed this as completedin #3429on Nov 1, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 1, 2026
  13. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane F shift
    • Session / ID: queue task 5313
    • Found via: queue claim
    • Task: PR fix(aggregator): strengthen isAaSection gate — thresholds, sources, testRuns entries (#2415) #3429 merged (merge commit 12440ac); aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415 closed by the merge. Verified pre-merge: Codex review completed with no findings at head eedf15e, CodeRabbit pass, MERGEABLE/CLEAN, laptop tests aa-gate-2415 8/8 + aa.test.ts 24/24.
    • Expectation: done — isAaSection now gates thresholds, sources, and testRuns entries at consumer depth.
    • Links: PR fix(aggregator): strengthen isAaSection gate — thresholds, sources, testRuns entries (#2415) #3429
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on 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.