CI run 24666612657 failed on three jobs. Fixes:
quality/format:
- Prettier --check flagged 3 files after the accumulated branch work.
Ran prettier --write from repo root (CI's invocation cwd) to apply:
simple-hooks.ts, resolve-references.ts, python-hooks.test.ts.
tests/{ubuntu,macos,windows} — 9 assertion failures, all traceable to
Python landing in MIGRATED_LANGUAGES (default-on registry-primary):
- registry-primary-flag.test.ts (3 tests): the 'returns false by
default' / 'primaryLanguages empty' / 'Python mid-process
mutation' assertions were written in Ring 2 when MIGRATED_LANGUAGES
was empty. Rewrote to assert MIGRATED_LANGUAGES membership is the
default, use Java (unmigrated) for the no-stale-cache test, and
verify env overrides work in both directions (migrated-off,
unmigrated-on).
- call-processor.test.ts (6 tests in SM-10 + D2-widen blocks):
these exercise the LEGACY call-resolution DAG on .py fixtures.
processCalls now gates Python out (isRegistryPrimary === true by
default), returning 0 edges. Added REGISTRY_PRIMARY_PYTHON=false
override in the relevant beforeEach + restore in afterEach, so
the legacy DAG runs for these test-local fixtures without
affecting the production-default behavior.
Local verification: 4126/4126 unit tests pass, prettier clean.
P2:
- WASM dual-ownership invariant documented on ASTCache dispose:
a Tree must live in AT MOST ONE disposing ASTCache. Native
tree-sitter today is unaffected; WASM adoption would require
tree.copy() or a non-disposing secondary cache.
- mro-processor C3 ordering test: pins EXTENDS-before-IMPLEMENTS
parent grouping for classes with interleaved edge additions.
Asserts exact MRO ['Base', 'Iface'] — a revert to single-loop
insertion-order iteration would produce ['Iface', 'Base'] and
fail loudly.
- cached-tree parity test: emitPythonScopeCaptures(src, path, T)
returns identical CaptureMatch[] to emitPythonScopeCaptures(src,
path). Pins the cache-hit path's correctness so a regression
that silently returns stale captures would break the test.
P3:
- Dev-mode cache counters moved from captures.ts to cache-stats.ts.
Production hot-path module no longer carries the module-global
export surface; PROF gating behavior preserved.
- ParseOutput field rename astCache → scopeTreeCache. Clarifies
that the surfaced cache is the persistent cross-phase one, not
the chunk-local astCache parse-impl clears between chunks.
Single consumer (scopeResolutionPhase) updated; no other readers.
- ASTCacheReader interface extracted. scopeResolutionPhase now
reads the phase dep via a shared type instead of a hand-rolled
inline structural shape that could drift from ASTCache's contract.
- graph.ts dual-index invariant enforced through writeRel/deleteRel
private helpers instead of duplicated add/delete at 3 mutation
sites. Adding a new mutation method only needs to call the
helpers — forgetting to update one index becomes structurally
impossible.
Tests: 382/382 unit (incl. 2 new), 191/191 python integration both
flag paths. tsc clean.