resolve: delete the TypeScript resolver spine (leg 7f, part 3b, step 2)

Merged
BO
1mo ago
+249-8942

Step 2 of leg 7f part 3b in docs/design/resolution-binding-model-plan.md. After #191 every resolution path runs through the kernel, so the TypeScript strategies were unreachable. This deletes them. Leg 7 is complete.

What changed

  • Deleted: resolveOne/resolveOneInner, every name-matcher.ts strategy, resolveViaImport and the other TypeScript import strategies, receiver-iteration.ts, js-builtins.ts, and five ResolutionContext members (getMethodMatches, getSupertypes, getSupertypeNodes, getReExports, getNodesByLowerName) with their caches. About 7,500 lines of src/.
  • Kept:
    • name-matcher.ts (4,721 lines) becomes gates.ts (134): the language-family gates applied to framework results, the ambiguity ceiling handed to the kernel, and binding helpers.
    • import-resolver.ts (2,547 → 1,021) keeps the import-path helpers the synthesizers and framework resolvers use.
  • expo-modules called resolveViaImport directly. It now goes through context.resolveImport, backed by a new kernel napi method, resolveViaImportRef.
  • Resolver warm-up no longer builds the known-names set. Only the TypeScript prefilter read it, and its SELECT DISTINCT name scan was measured at up to 28s during codegraph sync on the Linux kernel index.
  • Tests: 54 unit tests that called deleted functions directly are removed. The end-to-end tests stay. Stale punt/passthrough comments in the kernel are rewritten.

The dead code was found mechanically: a TypeScript-checker reference graph rooted at every use outside the spine files, then noUnusedLocals pruning to a fixed point.

Verification

  • tsc --noEmit, check:kernel-rules and cargo clippy clean.
  • Full suite: 316 files / 5,179 tests pass, golden dumps included.
  • Dump gate against the 9cc255a7 build, default and with the pool forced on: all 28 corpora identical (56/56). pasdoc init 61.2 → 51.7s; the rest are flat within noise.
  • Incremental sync gate: identical on ktor, celery, Ocelot.

Ledger §5.92.