From 6ae38c534b5417f9efabc4e13fdec7d24a50b5db Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Tue, 3 Nov 2026 10:43:31 -0600 Subject: [PATCH] fix(aggregator): clear the last Typecheck errors on main (#4848) Only three of the 27 errors listed on #4848 still reproduce on current main; intervening fixes landed the rest. - test/overview.test.ts: add the rfa facet to the HealthView fixture (required since #1203) so the fixture matches the type. - test/quota-current.test.ts: optional-chain sanitized in the two measuredAt gate assertions; parseQuotaCurrent's sanitized block is optional by type. bunx tsc --noEmit is clean; bun test is 1365 pass / 0 fail. --- pm-stack/aggregator/test/overview.test.ts | 1 + pm-stack/aggregator/test/quota-current.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pm-stack/aggregator/test/overview.test.ts b/pm-stack/aggregator/test/overview.test.ts index 99084f2f19..f18f959cdf 100644 --- a/pm-stack/aggregator/test/overview.test.ts +++ b/pm-stack/aggregator/test/overview.test.ts @@ -32,6 +32,7 @@ const health: HealthView = { facets: null, itemsCoverage: null, comments: { pendingMessages: 0, pendingGithub: 0, total: 0 }, + rfa: { state: "fixtures", detail: "fixtures mode — no live harness read", repositories: [], backends: [] }, }; const data: OverviewData = { diff --git a/pm-stack/aggregator/test/quota-current.test.ts b/pm-stack/aggregator/test/quota-current.test.ts index a45d36016b..64e01d31f1 100644 --- a/pm-stack/aggregator/test/quota-current.test.ts +++ b/pm-stack/aggregator/test/quota-current.test.ts @@ -906,7 +906,7 @@ describe("parseQuotaCurrent measuredAt gates (#4987)", () => { ), ); const parsed = parseQuotaCurrent(doc); - expect(parsed?.sanitized.droppedProviders).toBe(1); + expect(parsed?.sanitized?.droppedProviders).toBe(1); expect(parsed?.providers.map((p) => p.serviceId)).toEqual(["openai:codex"]); } }); @@ -924,7 +924,7 @@ describe("parseQuotaCurrent measuredAt gates (#4987)", () => { ), ); const parsed = parseQuotaCurrent(doc); - expect(parsed?.sanitized.droppedWindows).toBe(1); + expect(parsed?.sanitized?.droppedWindows).toBe(1); expect(parsed?.providers[0].windows.map((w) => w.name)).toEqual(["7-day"]); } });