chore(gates): typecheck every scripts/ TypeScript file
Summary
pnpm typecheck covered only 45 of the 403 scripts/**/*.ts files, so the gate, lane-selection and layering tooling ran under strip-types with about 190 hidden errors (audit TOOL-1). The root tsconfig now includes scripts/**/*.ts, and each error is fixed where it originates:
- 13
.d.mtstype surfaces for.mjsmodules, plus a stale sample declaration - test calls with the wrong arity or missing fields
- an
architecture-ownershipentry withoutforbiddenTargetRoots, which would crashforbidsDaemonPackage - an unsound lane-map cast and an unchecked gate
CheckId - incorrect type imports in ios-snapshot-benchmark
The third-party declarations needed three changes: the @types/convert-source-map package, a one-line pnpm patch that adds the NodeNext JSON import attribute to mutation-testing-report-schema, and vite's Rolldown.Plugin type in place of tsdown's, which does not compile under TS 7. The PR adds no @ts-ignore, any or skipLibCheck. 76 files are touched.
Validation
Tested at 247eb6e1b.
check:affected --run(receiptexactCommit=true) passed format, lint, typecheck, layering, di-seams, fallow, native-dupes, mcp-metadata, build and package.integration-nodestopped at 2smoke-daemon-cleantests. Those 2 also fail on base093341ain this container, where PID 1 does not reap zombies.pnpm test:unithad 15 failures: the 7 known root/chmod tests and 8 timeouts under host load. The 8 pass when their files run alone.- 48 focused test files pass.
CI must run the full unit and integration lanes. The risk is low because most changes are type-level.
Generated by Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.