Skip to content

aggregator: slice3 registry test fails on clean main — no claude-code record via fixture path #3835

Closed

Description

@dezren39

Bug: aggregator test slice-3 routes > dns + sessions + pages routes serve fails on clean main

Reproduced 2026-11-01 on a pristine worktree of origin/main (927f383), bun install + bun test test/slice3.test.ts: 23 pass / 1 fail.

Failure: test/slice3.test.ts:506 — expect(registry.records.some((r) => r.source === "claude-code")).toBe(true) receives false.

Context: the test boots the server with PM_AGG_SOURCE="fixtures" and an empty tmp registry file, so the records come from the fixture feed. The unit-level registry tests in the same file pass (recordFromSessionEntry still produces source: "claude-code", src/registry.ts:76), so either the fixture data no longer contains a claude-code session record, or the fixture→registry path drops/renames that source. Live /sessions works (694 records), so this looks like fixture drift vs the test's expectation — but the fix should be made at whichever layer actually changed: regenerate/repair the fixture, or restore the source mapping if the server path regressed.

Found during the 2026-11-01 PM-stack page-by-page review (not caused by the quota pool change in PR for openai.alternate — the failure predates it on unmodified main).

Acceptance criteria

  • bun test test/slice3.test.ts passes in full (24/24) on a pristine worktree of current main, including slice-3 routes > dns + sessions + pages routes serve asserting a claude-code registry record via the fixture path.
  • The fix lands at the layer that actually changed — the fixture data is regenerated/repaired if the fixture drifted, or the fixture→registry source mapping is restored if the server path regressed — with the diagnosis stated on this issue.
  • The test's expectation is not weakened or deleted to make it pass without a stated justification that the claude-code source is intentionally gone from fixtures.

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Intake review

    • Related: PR feat(aggregator): /sessions recency window, search/filter, pagination (#1209) #3303 (merged 2026-11-01, /sessions recency/search/pagination — adjacent registry work, not identified as the cause; the finding states the failure predates the fix(quota): surface the alternate ChatGPT account as its own pool on /quota #3837 quota change on unmodified main 927f38307). The unit-level registry tests in the same file pass (recordFromSessionEntry still produces source: "claude-code", src/registry.ts:76), which narrows the break to fixture data or the fixture→registry path.
    • Notes: Reproduced on clean main at filing (23 pass / 1 fail) — a red test on main trains the fleet to ignore the suite, so this is worth fixing even though live /sessions works (694 records).
    • Risks: "Fixing" it by regenerating fixtures blindly could bake in a real source-mapping regression; the diagnosis step in the criteria comes first.
    • Suggested approach: Diff the fixture feed against what recordFromSessionEntry emits for a claude-code session entry; whichever side dropped the source is the fix site.
  3. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 2, 2026
  4. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-g
    • Session / ID: task 8276
    • Found via: queue claim
    • Task: triage issue aggregator: slice3 registry test fails on clean main — no claude-code record via fixture path #3835 at current main — reproduce the slice3 fixture-registry failure, diagnose fixture drift vs registry source mapping, scope or enqueue the fix
    • Expectation: effort s; done = triage findings posted with evidence and a scoped follow-up, or closed with evidence if already handled
    • Links: task 8276
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage findings — already fixed on main, diagnosis

    Reproduction attempt at current main: on a pristine laptop worktree of origin/main (37a684d), bun install + bun test test/slice3.test.ts in pm-stack/aggregator: 36 pass / 0 fail (211 expect() calls), run twice with the same result. The named test slice-3 routes > dns + sessions + pages routes serve passes, and its claude-code assertion is intact and unweakened (test/slice3.test.ts:771).

    Root cause (neither fixture drift nor a registry source-mapping regression): the fixture session records carry a fixed last-activity date, and /api/registry.json defaults to a 7-day activity window. As calendar time passed the fixture date, the records aged out of the default window, so registry.records contained no claude-code record — the failure was date-dependent, which is why it appeared on clean main on 2026-11-01.

    Fix already landed: commit 2296432 ("test(pm-stack): make dated registry + pace fixtures time-independent (#1213)", merged via PR #4011, verified an ancestor of current origin/main) changed the test to request /api/registry.json?window=all with an in-code comment stating exactly this diagnosis, and made the dated pace fixtures in src/sources/fixtures.ts relative (daysAgo(-1)) instead of fixed past dates.

    No follow-up fix task is needed: the acceptance criteria are met on current main (full slice3 file passes; the fix sits at the layer that actually changed — the test's window semantics vs fixed fixture dates; the expectation was not weakened).

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/testTest coverage, test infrastructure, or test-only fixesmeta/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 item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions