Skip to content

Commit cfcfe62

Browse files
committed
fix(plugin-sdk): cast inner status fields through unknown in re-export type test
CI check-test-types flagged an overlap mismatch on the StatusSummary['tasks'] shape — the inner TaskRegistrySummary requires { active, terminal, failures, byStatus, byRuntime } and the test's { total, byScope } literal does not overlap with that. The point of this test is type-portability of the OUTER StatusSummary re-export, not the host-internal nested types (which are locked by their own tests in src/tasks/* and src/status/*). Cast through unknown for both host-internal nested fields so the test asserts the public surface without binding to host-internal shape.
1 parent 7013dd3 commit cfcfe62

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/plugin-sdk/command-status.types.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ describe("command-status type re-exports (#76759)", () => {
3030
heartbeat: { defaultAgentId: "main", agents: [heartbeat] },
3131
channelSummary: [],
3232
queuedSystemEvents: [],
33-
tasks: { total: 0, byScope: {} } as StatusSummary["tasks"],
34-
taskAudit: {} as StatusSummary["taskAudit"],
33+
// The exact `tasks` and `taskAudit` field shapes are host-internal (the
34+
// value of this re-export is the OUTER `StatusSummary` shape itself,
35+
// which plugins use to type the gateway status response). Cast through
36+
// `unknown` so the test asserts type-portability of the public surface
37+
// without binding the test to host-internal nested types — those are
38+
// already locked by their own tests in `src/tasks/*` and `src/status/*`.
39+
tasks: {} as unknown as StatusSummary["tasks"],
40+
taskAudit: {} as unknown as StatusSummary["taskAudit"],
3541
sessions: {
3642
paths: [],
3743
count: 1,

0 commit comments

Comments
 (0)