Skip to content

aggregator(aa): isAaSection still gates configs/testRuns/coverage/catalog/cai shallower than renderAa dereferences — gate-passing sections throw on /aa #4169

Closed

Description

@dezren39

Summary

isAaSection (pm-stack/aggregator/src/aa.ts:1092) — the structural gate the live source applies to the feed's AA section before /aa renders it (src/sources/live.ts:1110) — still checks several fields shallower than their consumers dereference them. #2415 deepened the gate for thresholds, sources, and testRuns[].snapshotDate; the same class remains for:

  • configs — checked only as Array.isArray(s.configs) (aa.ts:1109). renderAa passes it to aaConfigsTable (render.ts:5513), which dereferences c.modelName on every entry (render.ts:5340): a [null] entry throws.
  • testRuns[].modelVariantKey — entries are checked only for snapshotDate (aa.ts:1113-1120). aaTimingsTable calls variantLabel(r.modelVariantKey), which does modelVariantKey.split("|") (render.ts:5321-5330): an entry without it throws. (The aggregator(aa): isAaSection never checks thresholds or sources — a section missing them passes the gate and crashes the /aa render instead of degrading #2415 test's own "complete section" fixture — testRuns: [{ testRunKey, snapshotDate }] — crashes renderAa for exactly this reason.)
  • coverage (optional) — never checked. renderAa reads cov.catalogNotPooledMeasured.length and passes the four arrays to aaNameList (render.ts:5396-5402): coverage: {} or a non-array field throws.
  • catalog (optional) — never checked. renderAa calls catalog.map((e) => e.provider), catalog.filter(...) (render.ts:5406-5410): catalog: {} or a [null] entry throws.
  • cai (optional) — never checked. renderAa calls aaCaiPoints(s.cai) (render.ts:5415) and aaCaiTable(s.cai) (render.ts:5514), both of which .map over rows and dereference row fields: a non-array cai or a [null] row throws.

Verified this run

Laptop probe (verbatim aggregator src/ from f2006aa, md5-matched aa.ts 826aad6c / render.ts 2d99393c; probe dir probe-2026-11-01-laneB-aagate/ on the laptop) — a complete minimal section renders fine (control), and every variant below passes isAaSection (gate=true) while renderAa throws TypeError:

  • configs=[null] → c.modelName on null
  • testRuns=[{testRunKey, snapshotDate}] (no modelVariantKey) → modelVariantKey.split on undefined
  • coverage={} → cov.catalogNotPooledMeasured.length on undefined
  • coverage.catalogNotPooledMeasured="x" → names.map is not a function in aaNameList
  • cai="x" → rows.map is not a function in aaCaiPoints
  • cai=[null] → r.version on null
  • catalog=[null] → e.provider on null
  • catalog={} → catalog.map is not a function

Why it matters

The gate's contract (per #2415) is that a section it accepts renders, and a malformed section degrades to the not-collected banner instead of throwing in the request path. The feed is a shared document with more than one producer (#3852), so a drifted optional field currently turns /aa into a 500 rather than a degraded page — the exact failure #2415 fixed for the fields it covered.

Acceptance criteria

  • isAaSection checks configs entries (object with string modelName), testRuns[].modelVariantKey (string), and — when present — coverage (object whose four name lists are string arrays), catalog (array of objects with a string provider — gate at the depth renderAa dereferences: provider, disabled, routes, aaScore), and cai (array of row objects) at the depth their consumers dereference them.
  • A section failing any of these reads as absent/degraded, never throws in renderAa.
  • New gate tests in the style of test/aa-gate-2415.test.ts covering each variant above, plus a render-fine control with all optional fields present and well-formed.
  • Collector-built sections (aaSectionFromRaw output) still pass the gate unchanged.

Related: #2415 (same gate, thresholds/sources), #3441 (generatedAt depth), #2576 (umbrella validation contract — this is a concrete instance).

Activity

  1. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: filed
    Found via: filed this run (new-issue-creator-code-b, lane B) — isAaSection gate-depth follow-on to #2415, verified with a laptop probe over verbatim aggregator sources at f2006aa: gate-passing sections with malformed configs/testRuns/coverage/catalog/cai throw TypeError in renderAa.
    Next: triage via the enqueued repo-task packet.

  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 2, 2026
  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 2, 2026
  4. 165 remaining items

  5. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Lane code-l picked up task 14336 (issue #4169) — handed off to opencode claimant, with an escalation flag.

  6. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    agent-note: task 14336 handed off to opencode claimant (lane row 5566) by lane code-w. Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session. Fresh state (lane code-w, 2026-11-10): issue #4169 OPEN carrying user/escalated; PR #4565 OPEN carrying user/escalated + queue/blocked + status/blocked - the Drew disposition requested 2026-11-08 via task 13404 is still outstanding, so nothing on PR #4565 was touched this shift. Attempts 5/6. Parked 1200s for the claimant.

  7. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Picked up and revalidated: issue #4169 remains open; PR #4565 remains open and owns the fix. This runbook prohibits touching Drew-owned PRs or creating a competing PR. Parked task 14336 for 30 minutes; resume after the ownership restriction is resolved. Existing escalation and parked labels were preserved.

  8. added
    queue/claimedQueue 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)
    user/escalatedRequires a Drew decision or access
    on Nov 11, 2026
  9. added a commit that references this issue on Nov 11, 2026
  10. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (fixed_merged) — task 14336 (issue #4169)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions