chore(gates): typecheck every scripts/ TypeScript file

Merged
TH
12h ago
+575-225

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.mts type surfaces for .mjs modules, plus a stale sample declaration
  • test calls with the wrong arity or missing fields
  • an architecture-ownership entry without forbiddenTargetRoots, which would crash forbidsDaemonPackage
  • 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 (receipt exactCommit=true) passed format, lint, typecheck, layering, di-seams, fallow, native-dupes, mcp-metadata, build and package.
  • integration-node stopped at 2 smoke-daemon-clean tests. Those 2 also fail on base 093341a in this container, where PID 1 does not reap zombies.
  • pnpm test:unit had 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
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.