test(code-graph-incremental): run the YAML suites through the incremental engine
What does this MR do and why?
Seventh slice of code-graph-incremental, stacked on !2638 (merged). The YAML suites that already check the production code graph now also run through the incremental engine: same fixture format, same Cypher assertions, a second fixture root. Python's 46 suites and the containment suite land now and pass; each remaining language's suites arrive with its rule file. Two known gaps are skipped with the reason written next to them. From here, every rule-file and phase change is checked by the suites on main.
Related Issues
Relates to #1284. Reference implementation: !2454 (closed).
Testing
cargo nextest run -p integration-tests-codegraph: incremental_suites 47/47, suites 247/247 unchanged. CI already runs this crate (integration-tests-codegraph job), so the new target is covered without a pipeline change.
Performance Analysis
Test-only change.
- This merge request does not introduce any performance regression. If a performance regression is expected, explain why.
Agent context: long-form analysis, file-by-file walkthroughs, profiler output, alternatives considered
What lands
crates/integration-tests-codegraph/
src/incremental.rs run_incremental_suite: fixtures -> walk -> index -> Display -> Export -> Emit(DuckDB) -> run_suite
src/assertions.rs suite types become pub (shared by both runners)
src/{runner,validator}.rs create_test_db, run_suite, Failure become pub
build.rs generates one test per YAML for both fixture roots
tests/incremental_suites.rs
fixtures_incremental/python/*.yaml (46)
fixtures_incremental/cross_language/containment.yaml
README.mdThe fixtures are the reference branch's fixtures_new/, written in the current compiler dialect ([:CALLS|DEFINES|EXTENDS], ImportedSymbol.import_path/identifier_name/identifier_alias). The two skipped tests, both in imported_symbol_fallback_matrix.yaml, fail in the reference too: a dotted package import produces an extra CALLS row and drops the alias; Python declares no link.builtins, so an unresolved print/len falls back to the wildcard import. Both are rule-file follow-ups tracked on !2629 (merged).
Not in this MR: fixture_dir: (no incremental suite uses it), incremental steps: (they need reindex, MR 8), the typescript-pipeline file_reasons suite and the range/structural cross-language suites (their languages and a spans fix come later).
Base branch is michaelusa/code-graph-incremental-export (!2638 (merged)); retarget to main once that merges.
MR stack
| MR | Contents |
|---|---|
| !2620 (merged) | runner, budgets, errors, canonical alphabet, artifact and graph types |
| !2627 (merged) | Tree, Interner, tree-sitter languages, Env, inventory, Prepare + Each + Parse |
| !2629 (merged) | DSL engine, Rewrite + Canonicalize, Env.rules, Python rules |
| !2631 (merged) | SSA, linker, Link + Insert |
| !2633 (merged) | resolver, project tree, Resolve |
| !2638 (merged) | export engine, Display + Export + Emit, index template |
| 7 (this) | YAML suites through integration-tests-codegraph with a second runner |
| 8 | State save/load, Remap, reindex template, incremental suites |
| 9 | remaining language rule files and their suites |
| 10 | orbit index --engine incremental, full index through the existing DuckDB sink |
| 11 | snapshot next to the DuckDB file, changed paths from git, incremental CLI |
| 12 | default flip per language; old pipeline and its fixtures retire |
%{all_commits}