Migrate owned compiler tools to the TypeScript 7.1 API

SO
13h ago
+246-14

The runtime-manifest privacy test and handler-lifetime harness still use the legacy compiler API. Move them to the TypeScript 7.1 Beta synchronous client and AST entry point, with explicit disposal of compiler processes and retained source files.

Add the native compiler under a development-only typescript-api alias. Keep TypeScript 6 explicitly selected for package typechecking, the legacy VFS resolver proof, and lint compatibility. Production dependencies and request processing are unchanged.

Validation:

  • 59 targeted adapter privacy/VFS tests passed.
  • Adapter and next-matrix package typechecks passed.
  • Local handler-lifetime proof passed all five lanes with zero failures and zero external requests.
  • Changed-file formatting and git diff --check passed.
  • Two independent source reviews found no actionable issues.
  • The handler-lifetime file's targeted ESLint check passed after the CI correction.

Full gates run in CI. No benchmarks or deployed Cloudflare tests were run.

Reference: TypeScript 7.1 Beta API.

Review status:

  • Initial CI found unicorn/no-unnecessary-parameters in the handler-lifetime helpers. The helpers now capture the same single module-scoped compiler. Targeted ESLint, typecheck, the five-lane local proof, formatting and independent review passed after this correction.
  • Final head (643e7f8a): all CI gates passed. Sentry and Greptile completed with no findings. Independent review of the final compiler-lifetime change found no issues.
  • Codex completed review of the final head with no findings after a manual retry. No inline findings or review submissions remain.
  • CodeRabbit's manual retry completed full analysis of the final head successfully, with no actionable or nitpick findings. All inline comments, submitted reviews and conversation comments were checked.
  • cubic could not analyze this change because its monthly review line allowance is exhausted; its check is neutral and reports that reviews resume on November 1, 2026.

Summary by cubic

Migrates the runtime-manifest privacy test and handler-lifetime harness from the legacy TypeScript compiler API to the TypeScript 7.1 Beta synchronous client and AST entry point.

  • Adds the native 7.1 compiler as a development-only typescript-api alias; TypeScript 6 remains selected for package typechecking, legacy VFS proof, and lint.
  • A single module-scoped compiler instance and parsed source files are now explicitly disposed via using declarations.
  • Production dependencies, request processing, and the handler-lifetime proof behavior are unchanged; the proof still passes all five lanes with zero external requests.

Summary by CodeRabbit

  • Chores
    • Updated TypeScript tooling configuration across internal packages and tools.
    • No end-user-visible changes were reported.