Skip to content

fix(tests): carry the runtime's required detail field in status mocks - #53

Open
jerelvelarde wants to merge 2 commits into
mainfrom
jerel/fix-status-detail-drift
Open

fix(tests): carry the runtime's required detail field in status mocks#53
jerelvelarde wants to merge 2 commits into
mainfrom
jerel/fix-status-detail-drift

Conversation

@jerelvelarde

Copy link
Copy Markdown
Collaborator

A fresh clone of main fails pnpm check-types (exit 2, four errors) and pnpm test (161/162 passing). Both trace to the detail field @copilotkit/channels@0.8.1 added to status(), which the bump in 356b6f6 did not carry into the test doubles.

app/server.test.ts(36,5): error TS2322: Property 'detail' is missing in type
  '{ overall: "online"; channels: { opentag: "online"; }; }' but required in type
  '{ overall: ChannelStatus; channels: Record<string, ChannelStatus>; detail: Record<string, ChannelLegs>; }'

makeControls is the source of all four type errors, so one detail: {} clears them. app/runtime-host.test.ts:55 then needed the real payload the runtime now returns.

Verified on a clean --depth 1 clone: red before (check-types exit 2, 1 failed | 161 passed), check-types exit 0 and 162/162 after.

Kept toEqual rather than relaxing to toMatchObject — its strictness about extra keys is what surfaced this drift, and it is worth keeping for the next one.

Found while verifying a review blocker on CopilotKit/website#467, which recommends cloning this repo as the fast path to a first Channel.

The 0.8.1 channels bump made status() return a required detail field.
Four type errors in server.test.ts and one failing runtime-host
assertion were left behind, so a fresh clone failed both check-types
and test.
@jerelvelarde

Copy link
Copy Markdown
Collaborator Author

Context for whoever picks this up: main is currently red, and this is a two-file fix that restores it.

356b6f6 bumped @copilotkit/channels to 0.8.1, which made status() return a required detail field. The repo's own status doubles were not updated with it, so a fresh clone fails pnpm check-types (exit 2) and pnpm test (161/162) before anyone touches anything.

Surfaced while verifying a review blocker on CopilotKit/website#467, which is making a clone of this repo the recommended fast path to a first Channel — so a red main here is the first thing a new user hits.

@jerelvelarde jerelvelarde added the bug Something isn't working label Aug 13, 2026
@jerelvelarde
jerelvelarde requested a review from samjulien August 13, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant