resolve: walk supertypes in the kernel once its db holds every inheritance edge (Phase 6 leg 6a)
When a method was missing on a receiver's own type, the kernel handed the ref back to TypeScript (btm-supers, rmot-supers). TypeScript then walks implements/extends edges from the live database, and the resolution loop writes those edges as it goes, so a kernel snapshot might lack them.
But only the prerequisite phase writes those edges: imports, extends and implements, drained before any call ref. A connection that sees the database after that phase sees all of them.
What changed:
- Kernel: both walks are ported, gated by a new
supertypesCompleteconfig flag.matchBoundTypeMember's node-anchored BFS followsgetSupertypeNodes(any target kind, each node visited once).resolveMethodOnType'sgetSupertypesname-union recursion goes to depth 4. Both read edges with the sameWHERE source = ? AND kind IN (…)scan TypeScript runs, so the order matches. - Main-thread kernels read the live database and always set the flag.
- Pool workers set it once their snapshot postdates the prerequisite phase. At the first idle boundary after that phase, the loop takes a fresh snapshot copy with a new generation and hands it over through the existing
recyclemessage. If no prerequisite batch ran, there's no new copy; the workers just switch the walks on. A newpool-timinglog line records the refresh.
| Corpus | Native before | Native after | Dump, kernel vs CODEGRAPH_KERNEL_RESOLVE=0 |
|---|---|---|---|
| ktor (worker pool) | 96.5% (btm 2,313, rmot 616) | 98.2% | identical |
| celery | 99.0% | 99.6% | identical |
| Ocelot | 95.0% (rmot 373) | 96.2% | identical |
| vitest (worker pool) | 92.7% | 93.0% | identical |
| svelte | 98.9% | 99.0% | identical |
On ktor and vitest the pool's first snapshot was taken during the prerequisite phase, so the walks could only run after the boundary refresh.
Checks:
- New parity pin: with the flag,
svc.callresolves toBaseSvc::callthrough anextendsedge. The existing pin, without the flag, still punts. - Parity, golden, resolution and pool suites pass. The kernel lib clippy gate (
build:kernel) andcheck:kernel-rulesare clean. - Full suite: 316 files, 5241 passed, 11 skipped.
Ledger: docs/design/metrics-ledger.md §5.67. Plan: Phase 6 leg 6a marked done; via-src and the tree-based receiver arms remain.