middleware/tsconfig.json has include: ["src/**/*.ts"], so the test/ tree is outside the
project and npm run typecheck never sees it. A type error in a test file passes every gate and only
surfaces when tsx hits it at runtime — or does not surface at all, for a branch the test never
takes.
Noticed during PR #550, where an edited test file had to be typechecked by hand with the repo's own
compiler options to get any coverage at all.
Worth deciding deliberately rather than by omission: either add test/**/*.ts to the project, or add
a second tsconfig.test.json and a typecheck:test script wired into CI. The first is simpler; the
second avoids test types leaking into the shipped build's project graph.
Filed as a follow-up from PR #550 (MCP 2026-07-28 cluster, wave 4-6).
middleware/tsconfig.jsonhasinclude: ["src/**/*.ts"], so thetest/tree is outside theproject and
npm run typechecknever sees it. A type error in a test file passes every gate and onlysurfaces when
tsxhits it at runtime — or does not surface at all, for a branch the test nevertakes.
Noticed during PR #550, where an edited test file had to be typechecked by hand with the repo's own
compiler options to get any coverage at all.
Worth deciding deliberately rather than by omission: either add
test/**/*.tsto the project, or adda second
tsconfig.test.jsonand atypecheck:testscript wired into CI. The first is simpler; thesecond avoids test types leaking into the shipped build's project graph.
Filed as a follow-up from PR #550 (MCP 2026-07-28 cluster, wave 4-6).