Skip to content

aggregator: tsc --noEmit red on main — 12-error baseline (11 in tests, web-push types missing) #4023

Closed

Description

@dezren39

Problem

bunx tsc --noEmit in pm-stack/aggregator is red on current main with 12 errors, so the package's typecheck script cannot pass and the new aggregator CI (#1579) reports a pre-existing red typecheck step on every aggregator PR until these are fixed.

Verified 2026-11-01 on pristine main eb226be58 (fresh worktree, bun install --frozen-lockfile first) by queue worker lane C (task 5023). This matches the baseline other fleet work has repeatedly measured on clean main (12 errors); it is not caused by any single recent PR.

The 12 errors

src/push.ts(9,21): error TS7016: Could not find a declaration file for module 'web-push'.
test/charges-collect.test.ts(53,28): error TS2345: Argument of type '{ at: string; label: string; amountUsd: number; }[]' is not assignable to parameter of type 'ChargeRow[]'.
test/charges-collect.test.ts(53,52): error TS2769: No overload matches this call.
test/charges-collect.test.ts(59,28): error TS2345: Argument of type '{ at: string; label: string; amountUsd: number; }[]' is not assignable to parameter of type 'ChargeRow[]'.
test/feed.test.ts(16,10): error TS2300: Duplicate identifier 'renderQuota'.
test/feed.test.ts(17,10): error TS2300: Duplicate identifier 'renderQuota'.
test/feed.test.ts(470,38): error TS2769: No overload matches this call. (UnmatchedCharge 'source' string not assignable to ChargeSourceKind)
test/feed.test.ts(480,38): error TS2769: No overload matches this call. (same)
test/github-billing.test.ts(161,33): error TS2365: Operator '>' cannot be applied to types 'number | { low: number; high: number; }' and 'number'.
test/overview.test.ts(19,3): error TS2741: Property 'checkout' is missing in type ... but required in type ... CheckoutDrift ...
test/quota-current.test.ts(541,78): error TS18048: 'a' is possibly 'undefined'.
test/quota-current.test.ts(541,82): error TS18048: 'b' is possibly 'undefined'.

11 of 12 are in test files (stale fixtures/shapes after source type changes); 1 is src/push.ts missing web-push type declarations.

Acceptance

Acceptance criteria

  • bunx tsc --noEmit in pm-stack/aggregator passes with zero errors on the PR branch (the 12-error baseline measured on main eb226be is gone).
  • The web-push TS7016 error is resolved by a real declaration (types package or local declaration), not a blanket // @ts-ignore or skipLibCheck change.
  • Test-file type errors are fixed by aligning test fixtures with the production types (e.g. ChargeRow[]), not by loosening the production types or casting through any.
  • The aggregator test suite still passes and no runtime behavior changes.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    area/ciCI/CD pipelines, workflows, and build automation (area)
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    effort/sSmall: expected under 2 hours of work
    source/queue-workerFiled or worked by the queue/worker pilot
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Intake review

    • Related: aggregator CI tracking issue ci: no workflow runs the pm-stack aggregator test suite — aggregator PRs merge with no test signal #1579 (the typecheck step this unblocks); measured baseline first recorded by queue worker lane C (task 5023) on pristine main eb226be58.
    • Notes: Verified live this run — no open PR references this issue, and the filing evidence is a fresh measurement on current main, so this is not solved. The error set splits cleanly into two independent halves: one missing declaration (web-push in src/push.ts) and test-fixture type drift (11 errors, mostly test/). They can land as one PR or two; neither needs the other.
    • Risks: Low. Test-only fixes risk masking a real production type mismatch — the acceptance criteria require fixtures to move toward the production types, not the reverse. Adding @types/web-push (or equivalent) touches the lockfile only.
    • Suggested approach: Fix the web-push declaration first (one line of dependency/declaration), then walk the 11 test errors file by file; each is a fixture shape that drifted from its row type. Verify with bunx tsc --noEmit in pm-stack/aggregator on the branch and the package test suite.
    • Labels: priority/normal (already set — CI noise on every aggregator PR, not a user-facing break), effort/s, status/needs-triage.
  3. added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 1, 2026
  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  5. 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

  6. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Status note (new-issue-creator-code-a, 2026-11-03): re-measured bunx tsc --noEmit in pm-stack/aggregator at origin/main 4ab80c4 (clean laptop worktree, frozen-lockfile install). Result: exactly ONE error remains — a new regression not in this issue's 12-error baseline: test/overview.test.ts(12,7) TS2741, the HealthView fixture missing the conflicts field that PR #5032 (#1282) made required today. That error is tracked as #5043. The 12 baseline errors listed here no longer reproduce (cleared via #4848 and follow-ups), so once #5043 lands this issue's condition should be fully resolved.

  7. 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
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (already_done)
    task: 8347 (repo-health-code-pilot, lane code-m)

    Triage — the 12-error baseline is GONE at current main; closing with evidence (2026-11-03)

    Fresh verification on main bb4624b2a04078b845b03b50aeaa54a60dd97dca (laptop primary, clean, at origin/main; SHA confirmed via two independent gh api reads):

    So this issue's own scope is complete. The typecheck is still red on main for exactly one reason — #5043 — and that issue owns the remaining fix; keeping #4023 open would double-track it.

    Closing as completed. Found via: queue task 8347 triage, lane code-m, 2026-11-03.

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)app/pm-stackpm-stack (Pad/Grist) in developing-today/codearea/ciCI/CD pipelines, workflows, and build automation (area)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/queue-workerFiled or worked by the queue/worker pilottask/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