Skip to content

feat: framework resolvers, synthesis and codegraph context - #338

Merged
sunerpy merged 134 commits into
mainfrom
feat/v0.56-followups
Nov 26, 2026
Merged

sunerpy merged 134 commits into
mainfrom
feat/v0.56-followups

Conversation

@sunerpy

@sunerpy sunerpy commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Squash title: feat: framework resolvers, synthesis and codegraph context (OD-1).

The second pull request of the codegraph-rs v0.55 program (owner decision
OD-18, 2026-10-16), released as v0.56.0. It carries what the split moved out of
v0.55: the framework families and synthesis stage (W7), codegraph context and
custom Lua module loaders (W9-01, W9-02), the 26 deferred v1.5.0 performance
strategies (W9-00), and OD-19's refusal of an index a newer schema wrote. It
also takes the 21 DEFER rows of the 2026-10-22 upstream audit with their
prerequisites. The extraction version moves once, 22 → 23, in the first commit.

VB.NET (W8) is not in it. Its trial of tree-sitter-vb-dotnet =0.1.0 parsed
59.7% of upstream's VB.NET test sources without an error, against a 95% bar, so
VB.NET and its upstream rows are OWNER-EXCLUDED (OD-3, pre-authorized
2026-10-10). The trial commit never joined this branch.

The problem and its evidence

v0.55 resolved what a reference names and nothing more, so structure that a
framework or a dispatch convention creates was missing from the graph:

  • Dynamic dispatch reached nothing past the static hop. triggerUpdate()
    calls each of this.callbacks, and nothing there names the triggerRender
    that scene.onUpdate(this.triggerRender) stored; repo.save() on a Repo
    stopped at Repo::save and never reached the JpaRepo that implements it; a
    C call through a struct's function-pointer field reached no registered
    function. Upstream draws these as synthesized edges (callback-synthesizer.ts
    and its sibling passes).
  • Routes and navigation had no edges. A client router's routes, a
    navigate('/login'), a server framework's GET /users/:id and the handler
    behind it, and a test's request to a route were invisible to impact,
    callers and the viewer. The 2026-10-10 audit planned F1–F12 and the
    framework resolvers for this pull request (PLANNED (follow-up PR)); the
    2026-10-22 audit's 21 DEFER rows change the same code.
  • The viewer had no Steps or Screens, the explore Flow had no
    dynamic-dispatch links, and explore ranked files without graph relevance.
  • codegraph context and #1617's Lua loaders were deferred since the
    1.5.0 → 1.6.0 sync.
  • An older binary wrote to a newer index. run_pending_migrations passed a
    schema newer than the binary and ANALYZE then wrote to it (OD-19, recorded
    by the 2026-10-10 audit).

Each item's probes are upstream's own test fixtures where upstream has them,
run through the real pipeline (crates/codegraph-cli/tests/probes/), and each
graph change was read against precision corpora before landing (the
precision.md of each item's evidence directory).

Behaviour boundary

What changes:

  • Graph meaning (hence extraction version 23): framework route and screen
    nodes; navigates edges; edges a framework resolver made name it in
    metadata.framework; synthesized edges marked by metadata.synthesizedBy
    (with via, registeredAt and the like), written by a synthesis stage after
    resolution on every path that publishes an index and at the end of a sync.
    Extraction: every Go var and const spec is a node; Vue store collections
    and RTK Query endpoints and hooks are nodes; Play routes files, .escript,
    .app and .app.src files are indexed; JSX tags in .js files render their
    component; C++ calls through a local function pointer reach the bound
    functions. KEEP-RUST choices are in docs/upstream-sync/KNOWN_DIFFS.md, item
    by item.
  • Sync: new lanes keep a sync equal to a fresh index for what the new
    passes read across files: route modules and navigation (#2422, #2425),
    Angular's angular.json and nx.json, files that are added, removed or cross
    indexing.max_file_size (#2392's resolved counterpart, C macro visibility),
    calls through an imported value (W7-31), Terraform module wiring, the
    non-indexed #include files and Angular templates the stage reads, and each
    framework's own lane. The sync-convergence matrix grew from 550 to more than
    1,200 cases, none ignored.
  • Watcher: a directory that arrives whole is walked and its files go to the
    incremental sync; past 500 files it escalates like a lost event (W7-29).
  • MCP and CLI output: codegraph_explore opens with the Flow, lists
    dynamic-dispatch links among the named symbols, gathers and ranks the
    subgraph as upstream does (three-hop walk, Random-Walk-with-Restart
    relevance) and collapses off-spine polymorphic siblings to signatures; its
    MCP golden was re-captured (OD-4). New command codegraph context (CLI only,
    OD-10). New [lua] configuration (OD-11). CODEGRAPH_PHASE_TIMINGS=1 prints
    per-phase timings to stderr. status reports a newer schema.
  • Viewer (preview): Steps, Screens, effects, branch conditions on the
    Symbol and Flow rails, and their layout fixes.
  • Bench: --gen-go-std-methods, and --ab phase timings, a load guard,
    more candidates and sync runs.

What does not change:

  • The node-id formula (AGENTS.md invariant 3), the schema (10), the MCP tool
    list and its schemas, stdout purity, project containment (every read beside
    the index, #include files and Angular templates included, passes the scan's
    rules and a lexical containment check first), and the no-AI dependency
    boundary (scripts/guardrail.sh).
  • A project without [lua] settings gets a byte-identical Lua graph (OD-B83).

Performance (W9-00)

W9-00 decided the 26 deferred v1.5.0 strategies by rule (OD-9) and added row 27
(OD-B89). The dispositions, with each campaign's builds and verdicts, are in
docs/upstream-sync/V1_5_PERF_DISPOSITIONS_2026-11-26.md. Four are ADOPTED;
the numbers are release builds against 2d56231, at 32 and 4 threads:

  • Row 2, resolve the next batch while the current one is written
    (305e07d): typescript-large's reference resolution 11589.8 → 8379.7 ms
    (−27.70%) and 27897.8 → 23619.8 ms (−15.33%). Its cost on other corpora (peak
    RSS +2.3–5.8% in five of six cells) is accepted (OD-B97, OD-B98).
  • Row 24, read each scope's receiver declarations once per file
    (1b8e42f): reference resolution −14.29% and −29.11% on kong-medium, −6.02%
    and −14.68% on typescript-large.
  • Row 7, sync one or two saved files after a short quiet window
    (4412d1b): from saving tokio-medium's lib.rs to the server's
    auto-synced line 2097.2 → 385.4 ms and 2094.5 → 384.7 ms.
  • Row 27, a sync reruns only the synthesis passes whose inputs changed
    (7c0cb28, e9d5d65, 941561e): the one-file sync wall on the whole
    TypeScript checkout 4267.9 → 2859.1 ms and 4313.4 → 2912.4 ms, ×0.742–0.837
    on nix-darwin, erl-cowboy and erl-rebar3, peak RSS ×1.0011–1.0185
    (W9/w927/timing2/report.txt). synthesis_version moves to 24, so an
    existing index runs the whole stage once on its first sync.

Row 9 (parallel synthesis passes) passed its pre-screen and is deferred to the
next round (OD-B93); the others are ALREADY-HAVE, N/A or
REJECTED_BY_PROFILE.

Index upgrade: extraction version 22 → 23

c5514d8 moves the extraction version before any graph change, so users
rebuild once. An index v0.55 built reads as outdated and is rebuilt by
codegraph sync, a daemon's catch-up or the first MCP access;
upgrade_from_v055 replays a real v0.55.2 index (official musl binary, sha256
in its fixture README) through those paths and compares the result with a
fresh init. The schema stays 10. A schema newer than the binary is refused by
reads, status, sync, MCP, the daemon, init and index --force without a
changed byte; uninit --force can still discard it (OD-B2).

Golden impact

Every golden change has a row in the v0.56.0 regeneration log of
docs/equivalence.md, 45 rows, one per commit that changed a golden, in commit
order, each with its command (scripts/regen-goldens.sh --write <corpus>, or
the OD-4 re-capture for MCP). By corpus:

Corpus Rows Changed by
routers 15 resolver names, React, Nuxt, Next.js, Expo, React Router, TanStack, Vue Router, SvelteKit, Angular, JSX render, link, SvelteKit and Angular template passes
synthesis 14 React, the stage, render and override, JSX, Go owners and implements, gRPC and gin, Go func fields, the dispatch synthesizers, C fn-pointers (two), stores (two), GoFrame, Go servers
servers 9 NestJS prefixes, then eight of the nine server-framework commits (axum and actix changed none)
arkts 2 ArkTS import channel; ArkUI chains and decorators
cpp, csharp, java, rust 1 each render/override (cpp); interface dispatch (csharp, java, rust)
go 1 every Go var and const spec a node
godot 1 resolver names
mobile 1 React Native, Expo modules, Fabric and Swift–ObjC bridges
nix, terraform, erlang 1 each the three language bridges
vue 1 Vue template synthesis
mcp 1 codegraph_explore.json re-captured with the gathered subgraph (W7-25a, OD-4)

The other 17 of the 32 extraction corpora did not change, and a commit that
changed no golden has no row. scripts/regen-goldens.sh --check was
identical on all 32 corpora at each sub-wave's gate and at each W9 item
(W9/w901/w901b-regen-goldens-check.log).

On the final head, regen-goldens.sh --check with its release build is identical
on all 32 corpora (final/pre-ci.log). The OD-4 parity run against upstream
e8ddc4e2 (5.2) found nothing that is a defect of this pull request: on mini
the nodes, files and unresolved references are identical, 11 edges differ only
by upstream's refName/refKind stamp, and the schema differs by the v0.55
KEEP-RUST items plus #2630's index (final/golden52/parity.md, the v0.56.0
parity paragraph of docs/equivalence.md).

Validation actually run

Sub-wave Local gate Review CI on the pushed head
W0 make check on 98b7052 (239 suites, 6130 passed, 0 failed, 1 ignored; tracker :51); quick A/B fd-small and tokio-medium at 32 and 4 threads, graphs identical (:51); pre-push make pre-ci on 5cb5f32 (6135 passed; :60) goal gate r3 PASS (blocking 2 → 2 → 0; :59) fda96ed: every check SUCCESS (:63)
W7a make check on e69a778 (6251 passed, 0 failed, 1 ignored; tracker :76); make ui-check (:76) goal gate r2 PASS (2 → 0; :83) run 40047774710 on ca35060: every check SUCCESS (:86, :87)
W7b make check (6534 passed, 0 failed, 1 ignored; W7b-gate/make-check-r2.log); make ui-check; quick A/B (W7b-gate/ab-quick.md) goal gate r2 PASS (3 → 0, W7b-gate/goal-r2.log) run 41406816925 on fec4fbb: every check SUCCESS (W7b-gate/ci-run.log)
W7c make check (7061 passed, 0 failed, 1 ignored; W7c-gate/make-check*.log); full A/B (W7c-gate/ab-full.md); local firlab site build for the v-pre fix goal gate r1 PASS (W7c-gate/goal-r1.log) and two CI-fix rounds PASS run 42374174443 on 6841a6d: green, Windows Tests included
W7d make check (8138 passed, 0 failed, 3 ignored; W7d-gate/make-check.log); full A/B with the OD-B32 cost revision (W7d-gate/ab-full.md) goal gate r2 PASS (W7d-gate/goal-r2.log); CI-fix gate r2 PASS (W7d-ci-fix/goal-r2.log) run 44467411030 on 654c438: every check SUCCESS, Security Audit included (W7d-ci-fix/ci-watch.log)
W7e make check on 0059b2d (252 test binaries, 8784 passed, 0 failed, 1 ignored; W7e-gate/make-check.log); make ui-check (599 vitest, viewer bundle byte-identical); two full A/B reports against 8c18a34 plus express-medium against the W7d head (W7e-gate/ab2-full.md, ab2-express-w7d.md); three-way sync checks on GitHub runners (W7e-gate/perf/) integration review r2 PASS (W7e-gate/goal-w7e-r2.log) run 45656298953 on 0059b2d (attempt 3: macOS runner capacity) and run 45671032839 on 5b9d797: every check SUCCESS; Docs site 45671032864 (W7e-gate/ci/ci-5b9d797.txt)
W9-01 workspace tests (253 binaries, 8831 passed, 1 timing assertion failed under load and passed alone; W9/w901/w901b-workspace-tests.log, w901b-rerun-highlight.log); red-green variants (W9/w901/variants/); goldens 32 identical; explore output byte-identical on the 12 frozen queries; OD-B82 timings (W9/w901/perf/) — (OD-B96) with the final head
W9-00a/b, row 26 workspace tests (254 binaries, 8829 passed, 0 failed; W9/w900/final-workspace-tests.log) — (OD-B96) with the final head
W9-00 rows 2, 24, 7 campaigns K0–K6 with release builds and the load guard (W9/w9c/campaigns/out/, verdicts in W9/bc9cc95/, W9/330166d/, W9/1be277d/); workspace clippy and focused tests at the land (W9/w9c/land/validate.log) — (OD-B96) with the final head
W9-00 row 27 touched crates and the matrix (6278 passed, 0 failed, 1 ignored) and the workspace (8963 passed, 0 failed, 1 ignored) on bf2b314 (W9/w927/logs/); red-green variants (W9/w927/redgreen/, redgreen2/); goldens 32 identical; the ten precision corpora identical; the final re-measurement (W9/w927/timing2/) — (OD-B96) with the final head
W9-02 workspace tests (253 binaries, 8885 passed, 0 failed; W9/w902/logs/final-workspace-tests.log); 19 red-green variants (W9/w902/redgreen/); goldens 32 identical; graph-diff identical on kong, redis and this repository; CPU-time A/B on kong-medium (W9/w902/perf/) — (OD-B96) with the final head
W10 python3 scripts/docs-check.py, make fmt-oxfmt-check (oxfmt 0.64.0), bash scripts/guardrail.sh, rustfmt --edition 2024 --check on the edited Rust files, git diff --check; the docs check table W10/docs-check.md (185 requirements, 9 gaps fixed, the ninth after verification, none needing code) — (OD-B96) with the final head
Section 5 make pre-ci on f8e90e9 (final/pre-ci.log: all checks, 10388 passed with sync_convergence 1345/0/0 ignored and the three upgrade tests, 0 failed, 1 ignored) and again by the pre-push hook on f501aa6 and a1a3b7e; git diff --check clean after f501aa6; regen-goldens --check 32 identical; a Windows-target clippy through cargo-xwin for a1a3b7e (final/xwin-clippy-green.log); the two full 2.7 A/B reports (final/ab-final-{1,2}.md, retest final/ab-retest-*.md, OD-B98). the three-way sync check on GitHub runners: typescript-large one-file sync 1.115 against fec4fbb (line 1.5), 0.700 against 5b9d797 (W9-gate/perf/run-45825362291/). 5.3: 24 of 24 cells within against the official v0.55.2 musl build (final/bench53/combined.md, guard OD-B100) combined goal gate (OD-B96) PASS in round 1, no blocking item (final/gate/goal-r1.log) run 45832059154 on a1a3b7e, attempt 1: every check SUCCESS, CI Success included; Docs site 45832059157 (final/ci/ci-a1a3b7e.json); on f501aa6 run 45825372799 failed Windows Clippy, fixed by a1a3b7e (OD-B99)

W0's and W7a's gate logs (W0-gate, W7a-gate) were
lost with /tmp (plan 2.1). Their rows cite, as :N, the lines of the progress
tracker (the program's progress log, line
numbers as of 2026-11-26) that recorded each result when it ran.

Every sub-wave's precision reads, red-green variant runs and per-item
performance runs are in the item directories the commit index names.

The final head is a1a3b7e. f501aa6 differs from f8e90e9 only by
.gitattributes, and a1a3b7e from f501aa6 only by two use lines of
codegraph-bench, which the codegraph binary does not link, so the release
and musl builds of f8e90e9 are the final head's binaries for every
measurement.

Documentation

  • docs/architecture.md: the framework registry in registration order, the
    synthesis stage (its passes, gates, inputs read beside the index, recompute
    rule), every new sync lane and control input, the watcher's arriving
    directories, codegraph context.
  • docs/data-model.md: edge metadata (framework, synthesizedBy and its
    keys), framework node ids, synthesis_version,
    synthesis_unindexed_inputs, every lane's rows and markers, the control-input
    rows, the newer-schema refusal and its snapshot read.
  • docs/upstream-sync/KNOWN_DIFFS.md: the ported resolver and pass lists, each
    KEEP-RUST and DEFER of the program, the explore and codegraph context
    Tier-2 differences, OD-A4's mechanism.
  • docs/cli.md (context, [lua], phase timings, Live file watch, newer
    schema), docs/mcp.md (Flow, dynamic links, ranking, skeletons, dynamic
    boundaries), docs/ui.md and ui/README.md (Steps, Screens, conditions,
    Direction D as built), docs/languages.md, docs/grammar-manifest.md
    (tree-sitter-swift held at =0.7.3, OD-B4), docs/equivalence.md (the
    v0.56.0 regeneration log, the framework, synthesis and language-bridge
    corpora), docs/benchmark.md (the Go standard-library table, the --ab
    changes).
  • README and the Chinese README name codegraph context, the Lua loaders and
    the framework-aware relationships; the website (both languages) covers the
    viewer's Screens and Steps, codegraph context and [lua].
  • The ledger: both dated audits gain a "Follow-up pull request status
    (2026-11-26)" section, and UPSTREAM.md gets its Current alignment update
    and a Sync log entry (W10-02). The release entry follows after the release.

The viewer home screenshots were retaken with the local Chrome for Testing
(e7be312, OD-B94) and re-checked with the final head's build: byte-identical
(W10/screens/final-check.md). The W9-00 dispositions are in
docs/upstream-sync/V1_5_PERF_DISPOSITIONS_2026-11-26.md; UPSTREAM.md and
the 2026-10-10 audit point at it and name the landed commits (68ab3ad,
f8e90e9).

Owner decisions

Decision Result
OD-1 squash merge; title feat: framework resolvers, synthesis and codegraph context (VB.NET dropped after W8-00)
OD-3 VB.NET trial failed the 95% error-free bar (74/124, 59.7%); VB.NET and its rows OWNER-EXCLUDED; trial kept off the branch, no revert
OD-4 mini's edges and refs and the MCP goldens follow Rust output; codegraph_explore.json re-captured at W7-25a; 5.2's parity run against e8ddc4e2 found no defect of this pull request
OD-9 W9-00 decides each strategy by rule: rows 2, 7, 24 and the added row 27 ADOPTED, row 9 deferred (OD-B93), the rest ALREADY-HAVE, N/A or REJECTED_BY_PROFILE (docs/upstream-sync/V1_5_PERF_DISPOSITIONS_2026-11-26.md)
OD-10, OD-11 codegraph context CLI-only with #2428's wording (W9-01); [lua] contract as frozen (W9-02)
OD-14 budgets of 2.7 and 5.3; the exceptions below were each brought to the owner
OD-15 Windows Tests timeout 40 → 60 minutes (7d5db3b, OD-B76)
OD-A1, OD-A2 only the 21 DEFER rows and their prerequisites; 180 PORT/PARTIAL rows and G19–G25 for the next program
OD-A3 C's lone-macro rule follows upstream in the next round (#2709)
OD-A4 the jsx-render pass is built on the static JSX references edges (W7-14e)
OD-B1 #2420 whole, before #2563
OD-B2 a newer schema is refused everywhere but uninit --force
OD-B3 every 5.3 cell within budget, or fixed: all 24 within against the official v0.55.2 musl build, express-medium's wall also against the W7d head
OD-B100 5.3 on the shared host with W9-00's load-guard values (void above 3.0 other cores at 32 threads, 6.0 otherwise)
OD-B4, OD-B5 tree-sitter-swift stays =0.7.3; #2683's probe ignored on Windows, not required on macOS
OD-B6 draft PR after W0; a push per sub-wave
OD-B7 G18's Go part in: A 56, A 57, #693's Go walk, B 84's Go half (W7-15d0)
OD-B8 own cost lines for W7-17a on C/C++; per-file C facts for the next round (OD-B89)
OD-B9, OD-B11, OD-B18 non-indexed #include files and Angular templateUrl templates read with containment, recorded in synthesis_unindexed_inputs
OD-B10 an external <Link href> is skipped (KEEP-RUST)
OD-B12 RTK Query, Pinia options and Vuex inline-collection extraction in (W7-16b1)
OD-B13 GoFrame's resolver with its synthesizer (W7-16c)
OD-B14 an ambiguous thunk or Sidekiq target links nothing (W7-16d)
OD-B15 three older differences for the next round
OD-B16 GoFrame's bare-name fallback is KEEP-RUST
OD-B17 the default addons skip unchanged; a Godot-only skip later
OD-B19, OD-B20 performance on GitHub runners when the host is loaded; the 1.5 cumulative line re-measured on CI
OD-B21 the stage keeps unchanged synthesized edges (W7-18c0)
OD-B22 Angular template pass speedups; ghostfolio judged by absolute delta
OD-B23 explore's low-value files are b635dd46's isLowValue; #2557 next round
OD-B24 the name retry is skipped when the framework passes restore their nodes (W7-19a0)
OD-B25, OD-B26 Play routes-file syncs judged against a controller sync; the PHP fold query starts from its targets
OD-B27, OD-B30, OD-B32, OD-B53, OD-B70 accepted feature costs: Rails routes files, Objective-C bridges, Express init (base moved to the W7d head), Angular route files, .js JSX
OD-B28, OD-B29 two bridge guards (KEEP-RUST); the single-candidate shortcut for the next round
OD-B31, OD-B34, OD-B35, OD-B36, OD-B37 import candidates only from indexed files; path imports, C macro visibility and size-cap crossings re-resolve on sync (W7-27); the util.rs/util/mod.rs residue recorded, not fixed
OD-B33, OD-B74 security updates: rusqlite 0.41, rmcp 3.11.0, quinn-udp 0.5.16; cookie 0.18.3, url 2.5.9
OD-B38–OD-B41, OD-B66, OD-B94 viewer and website screenshots with the local Chrome for Testing; the Angular RealWorld corpus (MIT, logo excluded); OD-B94's retake, byte-identical on the final head
OD-B42–OD-B44 navigation reopen uncapped; five shapes upstream does not converge fixed (KEEP-RUST); angular.json/nx.json always JavaScript control inputs
OD-B45, OD-B78 the 1.5 cumulative line judged at checkpoints; W7e's 1.597/1.511 accepted, re-judged at W9's end: 1.115 against fec4fbb on the final head (run 45825362291)
OD-B46, OD-B61 .js JSX tags render (W7-28); two React .js corpora added
OD-B47 #1174, #1168, #1169, the ArkTS import channel and its MCP dynamic boundary in; Nix's MCP option-path lookup next round
OD-B48, OD-B96 integration reviews only; one combined goal gate for W9, W10 and section 5's acceptance: PASS in round 1
OD-B49 tree-sitter-hcl 1.1.0's binary-operator attribute chains corrected in extraction
OD-B50, OD-B63 W7-29: arriving directories walked; past 500 files a full reconcile
OD-B51 the npm mirror lockfile stays (integrity hashes)
OD-B52, OD-B64, OD-B65 W7-30's viewer layout fixes
OD-B54, OD-B56 explore: depth-3 walk, RWR and skeletons; Found counts what renders; two environment switches
OD-B55 #2575 and #2785 (the dominant-file boost) for the next round
OD-B57, OD-B58, OD-B59 #2644 ported; an Erlang ?X binds only a -define; .fire member calls as upstream
OD-B60 CG-27 (shrinkCluster) for the next round
OD-B62, OD-B75 explore cost: fixed by 1d2f851 and 0059b2d; the six whole-table scans for the next round
OD-B67, OD-B68 React Pattern 1's own-file preference and .jsx value references for the next round
OD-B69, OD-B71, OD-B72 the imported-value sync lane (W7-31), gated on each module's binding facts
OD-B73 Terraform wiring gate, parse-side fixes, Nix and Erlang prefilters; the rest accepted
OD-B77 Windows CI time accepted (about 9–12 minutes more); a shorter matrix next round
OD-B79–OD-B82 codegraph context: upstream's walk at context's limits, the low-confidence note, four contract details, explore-relative timing lines (all within)
OD-B83 a Lua literal is a file path only with [lua] settings
OD-B84–OD-B88 W9-00's rules: ALREADY-HAVE/N/A rows, profile-only rejections, schema-order rejections, 32-thread cells locally with a load guard, release-build verdicts
OD-B89, OD-B90, OD-B95 row 27 (per-pass synthesis reuse on sync) designed and given one more fix round; ADOPTED at the final re-measurement
OD-B91, OD-B92, OD-B93 the read-only open's whole-database read, a rebuild fallback for large re-extractions, and row 9 for the next round; the first sync after [lua] re-extracts every Lua file (accepted)
OD-B97, OD-B98 row 2 ADOPTED on typescript-large, its cost on other corpora judged at the final A/B; express-medium's peak RSS at 4 threads (×1.165 against 8c18a34, ×1.043–1.066 against the W7d head) accepted as a known cost
OD-B99 the Windows Clippy failure on f501aa6 fixed by a1a3b7e

Remaining risks and known limits

  • Accepted costs (each with the owner's decision above): routes-file syncs
    in Rails apps; Objective-C bridges; Express init; Angular route files;
    .js JSX in React apps; Windows CI time; the first sync after adding [lua]
    re-extracts every Lua file; express-medium's peak RSS at 4 threads (OD-B98).
    typescript-large's one-file sync, over the cumulative 1.5 line against
    fec4fbb at W7e (1.597 and 1.511, OD-B78), is 1.115 on the final head after
    row 27.
  • Left for the next round, listed in UPSTREAM.md's Current alignment with
    their decisions: 180 audit rows and G19–G25, OD-A3, OD-B4 (#2683),
    OD-B8/OD-B89, OD-B15, OD-B17, OD-B23, OD-B29, OD-B47, OD-B55, OD-B60, OD-B67,
    OD-B68, OD-B75, OD-B77, OD-B91, OD-B92, OD-B93.
  • VB.NET stays out until a VB.NET grammar the manifest accepts exists on
    crates.io.
  • Known flakes, observed and not changed (2.8): the daemon's
    control_shutdown refused-frame test (BrokenPipe after the hello), a
    Windows catch-up latency assertion, the viewer's highlight timing assertion
    under load, and GitHub's macOS arm64 runner capacity.
  • Swift on Windows: a call after try! is misparsed by
    tree-sitter-swift 0.7.3's scanner on MSVC (documented in
    docs/languages.md).
  • G16 and G17 (C++ namespace-scope variables, function-local structs) remain
    OWNER-EXCLUDED from the v0.55 program.

Commit index

Generated by W10/tools/commit_index.py <repo> 8c18a34 a1a3b7e.
"Evidence" is relative to the evidence root; W0 and W7a's evidence was lost
with /tmp between 2026-10-24 and 2026-10-31 (plan 2.1), and the plan's
as-built entries and the progress tracker record it.

# Commit Subject Item Evidence
1 c5514d8 chore(store): move the extraction version to 23 W0-01 lost with /tmp (plan 2.1); the plan's as-built
2 2a3dfde fix(store): refuse an index a newer schema wrote W0-02 lost with /tmp (plan 2.1); the plan's as-built
3 e5a8695 test(mcp): give every engine test its own directory and remove it W0-03 lost with /tmp (plan 2.1); the plan's as-built
4 301a172 test(probes): std-typed Rust receivers stay unresolved W0-05 lost with /tmp (plan 2.1); the plan's as-built
5 98b7052 build(deps): bump the grammar crates held back from #334 W0-04 lost with /tmp (plan 2.1); the plan's as-built
6 fc6b6d0 fix(store): uninit discards a current index beside its tombstone W0 gate lost with /tmp (plan 2.1); the plan's as-built
7 b80a14f fix(store): report a newer schema before the uninit tombstone W0 gate lost with /tmp (plan 2.1); the plan's as-built
8 7160d9a fix(store): offer uninit only where it would discard the index W0 gate lost with /tmp (plan 2.1); the plan's as-built
9 5cb5f32 fix(cli): status offers uninit for a newer schema only where it works W0 gate lost with /tmp (plan 2.1); the plan's as-built
10 fda96ed test(cli): import the unix-only upgrade test types on unix only W0 gate (CI) lost with /tmp (plan 2.1); the plan's as-built
11 f699c78 feat(resolve): framework-edge infrastructure W7-05 lost with /tmp (plan 2.1); the plan's as-built
12 9ef9f69 feat(resolve): framework edges name their resolver W7-04 lost with /tmp (plan 2.1); the plan's as-built
13 9c84ead fix(watch): any file that comes or goes re-reads the JS detection inputs W7-05 (sync) lost with /tmp (plan 2.1); the plan's as-built
14 80a5384 fix(react): hooks and contexts prefer own-file declarations and imports; typed styled components W7-01 W7-01/
15 86c3386 fix(nestjs): conventions stay in their feature; global prefix and versioning W7-02 lost with /tmp (plan 2.1); the plan's as-built
16 64b4f95 fix(vue): Nuxt routes only in Nuxt apps; a page route references its component W7-03 lost with /tmp (plan 2.1); the plan's as-built
17 e69a778 feat(explore): Flow section and branch guards W7-06 lost with /tmp (plan 2.1); the plan's as-built
18 608d5fd fix(nestjs): a test's bootstrap configures only its own app W7-02b lost with /tmp (plan 2.1); the plan's as-built
19 ca35060 test(sync): framework edges keep their resolver's name under sync W7-04b lost with /tmp (plan 2.1); the plan's as-built
20 b1ee323 feat(resolve): Next.js file routes split from React W7-07 lost with /tmp (plan 2.1); the plan's as-built
21 6b74cae feat(resolve): Expo Router W7-08 lost with /tmp (plan 2.1); the plan's as-built
22 d0b744f fix(resolve): an import alias is the nearest tsconfig's W7-09a W7-09/, W7-09a/
23 85c4898 feat(resolve): React Router routes and navigation W7-09b W7-09b/
24 820c102 feat(resolve): React Router lazy loaders pick their page W7-09c W7-09c/
25 7046a9f feat(resolve): route tables another file hands React Router W7-09d W7-09d/
26 5301bf3 feat(resolve): imported JSX tags render what their module exports W7-09e W7-09e/
27 655c1db feat(resolve): TanStack Router routes and navigation W7-10 W7-10/, W7-10a/
28 dda60ca feat(resolve): Vue Router routes and navigation W7-11 W7-11/
29 69902a9 feat(resolve): Svelte resolver and SvelteKit routing W7-12 W7-12/
30 5ad11e9 feat(resolve): Angular routes and the components they render W7-13a W7-13/
31 112e048 feat(resolve): Angular navigation W7-13b W7-13/
32 b3c03bc test(resolve): cover the React Router pieces no test caught W7b gate W7b-gate/
33 fec4fbb docs: complete the regeneration log and name the rows left for later W7b gate W7b-gate/
34 c7696e0 feat(resolve): synthesis stage with incremental refresh W7-14a W7-14/
35 2a600ed fix(resolve): walk synthesis inputs in upstream's order W7-14a W7-14/
36 3cb90d9 feat(resolve): render, override and expect/actual synthesis W7-14b W7-14/b/
37 f317880 fix(extract): read each type of a Java heritage list W7-14c W7-14/
38 f1237a1 feat(resolve): interface dispatch synthesis W7-14c W7-14/
39 c31a8f7 feat(resolve): object registry synthesis W7-14d W7-14/
40 080ec64 feat(resolve): JSX render synthesis W7-14e W7-14/
41 2b97b52 feat(bench): generate the Go standard-library method table W7-15a W7-15/
42 6b5ffb6 feat(resolve): Go method owners and implicit implements W7-15b W7-15/b/
43 2cb1b7d perf(resolve): read the synthesis stage's file texts once, in parallel W7-15b W7-15/b/
44 a3ae027 feat(resolve): gRPC stub and gin middleware synthesis W7-15c W7-15/c/
45 180259f feat(extract): every Go var and const spec is a node W7-15d0 W7-15/d0/
46 77c32d6 fix(watch): a go.mod change re-resolves the project's Go files W7-15d1 W7-15/
47 2e419f9 feat(resolve): Go func-field synthesis W7-15d W7-15/d/
48 062c7a0 feat(resolve): redux-thunk, Celery, Spring, MediatR, Sidekiq and Laravel dispatch synthesis W7-16a W7-16/a/
49 6a3d2c2 feat(resolve): C and C++ function-pointer dispatch W7-17a W7-17/a/
50 f9c795d feat(resolve): C function-pointer tables in non-indexed includes W7-17b W7-17/b/
51 ca3accf fix(resolve): leave ambiguous redux-thunk and Sidekiq targets unlinked W7-16d W7-16/d/
52 cd56729 feat(extract): Vue store collections and RTK Query endpoints and hooks W7-16b1 W7-16/b/
53 701a06b feat(resolve): RTK Query, Pinia and Vuex dispatch synthesis W7-16b2 W7-16/b/
54 ddf97bc feat(resolve): GoFrame routes and their controller methods W7-16c W7-16/c/
55 9498108 feat(resolve): navigation-link synthesis W7-18a W7-18/a/
56 22e415c feat(resolve): SvelteKit page and loader synthesis W7-18b W7-18/b/
57 a11026a perf(store): keep unchanged synthesized edges when the stage replaces them W7-18c0 W7-18/
58 7bb0ec3 feat(resolve): Vue template synthesis W7-18c W7-18/c/
59 0d2e96a feat(resolve): Angular template synthesis W7-18d W7-18/d/
60 5b2b6d2 feat(explore): dynamic-dispatch links among the named symbols W7-26 W7-26/
61 64b64cb test(resolve): close the index before deleting the C fn-pointer test directories W7c gate (CI) W7c-gate/
62 97a9e19 docs: show double-brace code literally on the website W7c gate (site) W7c-gate/
63 6841a6d test(cli): open the migrated index through a file URI Windows accepts W7c gate (CI) W7c-gate/
64 6e68314 perf(watch): skip the name retry when the framework passes restore what re-extraction left out W7-19a0 W7-19/
65 ab937ff feat(resolve): Express and Astro server frameworks and route naming W7-19a W7-19/a/
66 9a6a45d feat(resolve): Django, Flask and FastAPI server frameworks and route naming W7-19b W7-19/b/
67 268df19 feat(resolve): Spring and Play server frameworks and Play routes files W7-19c W7-19/c/
68 97d5b2e feat(resolve): Laravel and Drupal server frameworks and route naming W7-19d W7-19/d/
69 dd95fdf feat(resolve): Rails server framework and scoped routes W7-19e W7-19/e/
70 2845975 feat(resolve): ASP.NET server framework, FastEndpoints and endpoint groups W7-19f W7-19/f/
71 7b2134a feat(resolve): Vapor server framework, SwiftUI and UIKit conventions W7-19g W7-19/g/
72 8256f7b feat(resolve): axum and actix server frameworks and Cargo workspace crates W7-19h W7-19/h/
73 6a58caa feat(resolve): Go server frameworks and URL-shaped routes W7-19i W7-19/i/
74 a6e58d6 feat(resolve): cross-tier channels and test requests W7-20 W7-20/
75 b316d65 feat(resolve): React Native, Expo modules, Fabric and Swift-ObjC bridges W7-21 W7-21/
76 654c438 build(deps): take the security fixes of rusqlite, rmcp and quinn-udp W7d CI fix (OD-B33) W7d-ci-fix/
77 9445d69 fix(resolve): take import candidates only from the indexed files W7-27a W7-27/
78 28c2e90 fix(sync): re-resolve what an added, removed or resized file moves W7-27b W7-27/
79 dd2102a feat(ui): branch conditions on the Symbol and Flow rails W7-22a W7-22/
80 5a8d229 feat(graph): read call sites, triggers, loops and definitions for the viewer W7-22b W7-22/
81 b3ff9ac feat(ui): Screens and the transitions between them W7-22c W7-22/
82 e16226f feat(ui): Steps, effects and the reading in the code's order W7-22d W7-22/
83 cee9a13 fix(sync): a route follows the module it lazily loads when the module appears or changes W7-23a W7-23/
84 9e1dafe fix(sync): a navigation call relinks when a route appears, goes or moves W7-23b W7-23/
85 421c13d fix(sync): angular.json and nx.json are JavaScript control inputs W7-23c W7-23/
86 8803eec feat(resolve): ArkTS modules join the JavaScript import channel and ohpm packages W7-24a1 W7-24/
87 7c49c61 feat(resolve): ArkUI attribute chains, decorators and state, emitter and router bridges W7-24a2 W7-24/
88 b6d35ea feat(resolve): Nix lexical scope, module imports and option paths W7-24b W7-24/
89 beea106 feat(resolve): Terraform module boundaries, remote state and provider aliases W7-24c W7-24/
90 48867df feat(resolve): Erlang behaviours, macros, escripts and application resource files W7-24d W7-24/
91 9a7768c fix(resolve): an imported value's call reaches the class its file means W7-24 (OD-B57) W7-24/
92 25dcf4e fix(resolve): an Erlang macro use binds only a -define of its name W7-24 (OD-B58) W7-24/
93 32b9c30 feat(explore): gather the subgraph the way upstream walks it W7-25a W7-25/
94 c369d72 feat(explore): rank files by graph relevance W7-25b W7-25/
95 c10e457 feat(explore): weigh the flow spine in clusters and windows W7-25c W7-25/
96 a960b97 feat(explore): skeletons for off-spine polymorphic siblings W7-25d W7-25/
97 4349c0e fix(watch): a directory moved into the project indexes its files W7-29 W7-29/
98 e89c1c8 fix(extract): a JSX tag in a .js file renders its component, as in .jsx W7-28 W7-28/
99 05cc19a fix(ui): the Key, wide effect rows and condition labels fit the canvas W7-30 W7-30/
100 cea1c73 test(sync): cover the imported-value call and Erlang macro rules W7-24 sync cases W7-24/sync-supp/
101 0e6586b fix(sync): a call through an imported value follows its module's edits W7-31 W7-31/
102 e6db340 perf(resolve): stop compiling patterns and splitting files per reference W7-24 cost (OD-B73) W7-24/cost/
103 08d1114 perf(synthesis): read only what the Nix and Erlang passes use W7-24 cost (OD-B73) W7-24/cost/
104 fcdd9fc perf(sync): rewire Terraform modules only when their wiring changes W7-24 cost (OD-B73) W7-24/cost/
105 97cee04 test(probes): read the Terraform wiring rows through the portable URI W7e CI fix W7e-gate/ci-fix/
106 278acd2 build(deps): update cookie and url for two new RustSec advisories W7e CI fix (OD-B74) W7e-gate/ci-fix/
107 7d5db3b ci: give the Windows tests 60 minutes W7e CI (OD-B76) W7e-gate/
108 1d2f851 perf(explore): look up each symbol and walk each node once per request W7-25 cost (OD-B75) W7-25/cost/
109 0059b2d perf(store): cache the edge and node lookups' statements W7-25 cost (OD-B75) W7-25/cost/
110 5b9d797 docs(equivalence): log the explore golden W7-25a re-captured W7e gate W7e-gate/
111 fa8c7c4 refactor(explore): share the seed search and let the walk take its limits W9-01a W9/w901/
112 2a18fb7 feat(cli): add codegraph context W9-01b W9/w901/
113 08b5514 feat(cli): print per-phase timings to stderr under CODEGRAPH_PHASE_TIMINGS W9-00a W9/w900/
114 9c465bd feat(bench): phase timings, a load guard, more candidates and sync runs in --ab W9-00b W9/w900/
115 2d56231 test(store): pin the WAL fold truncating the sidecar to zero W9-00 row 26 W9/w9c/
116 3344187 feat(config): read the Lua loader settings W9-02a W9/w902/
117 55eede8 feat(extract): custom Lua module loaders W9-02b W9/w902/
118 cc63b9e feat(resolve): look up Lua modules under the configured roots first W9-02c W9/w902/
119 305e07d perf(resolve): resolve the next batch while the current one is written W9-00 row 2 W9/w9c/, W9/bc9cc95/
120 1b8e42f perf(resolve): read each scope's receiver declarations once per file W9-00 row 24 W9/w9c/, W9/330166d/
121 4412d1b perf(watch): sync one or two saved files after a short quiet window W9-00 row 7 W9/w9c/, W9/1be277d/
122 68ab3ad docs(upstream): record the W9-00 performance dispositions W9-00 dispositions W9/w9c/
123 323f634 docs: name codegraph context and the Lua loaders in the READMEs and on the website W10-01 W10/
124 82f21ee docs: close the v0.56 documentation gaps W10-01 W10/
125 f6ad441 docs: stop pointing VB.NET comments at W8 W10-01 (VB.NET comments) W10/
126 28bb16d docs(upstream): record the follow-up pull request's status W10-02 W10/
127 7744126 docs(equivalence): record the v0.56.0 parity run against upstream e8ddc4e2 5.2 (OD-4 parity) final/golden52/
128 e7be312 docs(site): retake the viewer home screenshots W10-01 (OD-B94 screenshots) W10/screens/
129 7c0cb28 perf(store): log the base-graph rows a sync changes W9-00 row 27a W9/w927/
130 e9d5d65 perf(resolve): record what each synthesis pass reads W9-00 row 27b W9/w927/
131 941561e perf(sync): rerun only the synthesis passes whose inputs changed W9-00 row 27c W9/w927/
132 f8e90e9 docs(upstream): record W9-00's adopted strategies and row 27 W9-00 dispositions W9/w927/, W10/land/
133 f501aa6 test(cli): exempt the stdout snapshots from whitespace checks 5.1 (snapshot whitespace) final/pre-ci.log
134 a1a3b7e fix(bench): build the load guard's /proc imports only on Linux CI fix (OD-B99) final/ci/

Changelog entries

One line per family; W7-22 lists four, W7-23 three, W7-25 as landed, W7-28 and
W7-30 one each. The two RustSec updates are typed fix(deps) so the changelog
shows them, as #322 did; the grammar update stays build(deps). Commits that
fix another commit of this branch (the W0 gate's b80a14f, 7160d9a and
5cb5f32, 9c84ead, 2a600ed) and W9-02a's settings reader (3344187)
fold into their family's line; test, docs, ci and refactor commits have none
except W0's.

BEGIN_COMMIT_OVERRIDE
chore(store): move the extraction version to 23
fix(store): refuse an index a newer schema wrote, offering uninit only where it would discard the index
fix(store): uninit discards a current index beside its tombstone
test(mcp): give every engine test its own directory and remove it
build(deps): bump the grammar crates held back from #334
test(probes): std-typed Rust receivers stay unresolved
feat(resolve): framework-edge infrastructure
feat(resolve): framework edges name their resolver
fix(react): hooks and contexts prefer own-file declarations and imports; typed styled components
fix(nestjs): conventions stay in their feature; global prefix and versioning
fix(nestjs): a test's bootstrap configures only its own app
fix(vue): Nuxt routes only in Nuxt apps; a page route references its component
feat(explore): Flow section and branch guards
feat(resolve): Next.js file routes split from React
feat(resolve): Expo Router
fix(resolve): an import alias is the nearest tsconfig's
feat(resolve): React Router routes and navigation
feat(resolve): React Router lazy loaders pick their page
feat(resolve): route tables another file hands React Router
feat(resolve): imported JSX tags render what their module exports
feat(resolve): TanStack Router routes and navigation
feat(resolve): Vue Router routes and navigation
feat(resolve): Svelte resolver and SvelteKit routing
feat(resolve): Angular routes and the components they render
feat(resolve): Angular navigation
feat(resolve): synthesis stage with incremental refresh
feat(resolve): render, override and expect/actual synthesis
fix(extract): read each type of a Java heritage list
feat(resolve): interface dispatch synthesis
feat(resolve): object registry synthesis
feat(resolve): JSX render synthesis
feat(bench): generate the Go standard-library method table
feat(resolve): Go method owners and implicit implements
perf(resolve): read the synthesis stage's file texts once, in parallel
feat(resolve): gRPC stub and gin middleware synthesis
feat(extract): every Go var and const spec is a node
fix(watch): a go.mod change re-resolves the project's Go files
feat(resolve): Go func-field synthesis
feat(resolve): redux-thunk, Celery, Spring, MediatR, Sidekiq and Laravel dispatch synthesis
feat(resolve): C and C++ function-pointer dispatch
feat(resolve): C function-pointer tables in non-indexed includes
fix(resolve): leave ambiguous redux-thunk and Sidekiq targets unlinked
feat(extract): Vue store collections and RTK Query endpoints and hooks
feat(resolve): RTK Query, Pinia and Vuex dispatch synthesis
feat(resolve): GoFrame routes and their controller methods
feat(resolve): navigation-link synthesis
feat(resolve): SvelteKit page and loader synthesis
perf(store): keep unchanged synthesized edges when the stage replaces them
feat(resolve): Vue template synthesis
feat(resolve): Angular template synthesis
feat(explore): dynamic-dispatch links among the named symbols
perf(watch): skip the name retry when the framework passes restore what re-extraction left out
feat(resolve): Express and Astro server frameworks and route naming
feat(resolve): Django, Flask and FastAPI server frameworks and route naming
feat(resolve): Spring and Play server frameworks and Play routes files
feat(resolve): Laravel and Drupal server frameworks and route naming
feat(resolve): Rails server framework and scoped routes
feat(resolve): ASP.NET server framework, FastEndpoints and endpoint groups
feat(resolve): Vapor server framework, SwiftUI and UIKit conventions
feat(resolve): axum and actix server frameworks and Cargo workspace crates
feat(resolve): Go server frameworks and URL-shaped routes
feat(resolve): cross-tier channels and test requests
feat(resolve): React Native, Expo modules, Fabric and Swift-ObjC bridges
fix(deps): take the security fixes of rusqlite, rmcp and quinn-udp
fix(resolve): take import candidates only from the indexed files
fix(sync): re-resolve what an added, removed or resized file moves
feat(ui): branch conditions on the Symbol and Flow rails
feat(graph): read call sites, triggers, loops and definitions for the viewer
feat(ui): Screens and the transitions between them
feat(ui): Steps, effects and the reading in the code's order
fix(sync): a route follows the module it lazily loads when the module appears or changes
fix(sync): a navigation call relinks when a route appears, goes or moves
fix(sync): angular.json and nx.json are JavaScript control inputs
feat(resolve): ArkTS modules join the JavaScript import channel and ohpm packages
feat(resolve): ArkUI attribute chains, decorators and state, emitter and router bridges
feat(resolve): Nix lexical scope, module imports and option paths
feat(resolve): Terraform module boundaries, remote state and provider aliases
feat(resolve): Erlang behaviours, macros, escripts and application resource files
fix(resolve): an imported value's call reaches the class its file means
fix(resolve): an Erlang macro use binds only a -define of its name
feat(explore): gather the subgraph the way upstream walks it
feat(explore): rank files by graph relevance
Left for the next round: #2557 (the engine-wide test predicate), #2655, #2750 and #2789.
feat(explore): weigh the flow spine in clusters and windows
feat(explore): skeletons for off-spine polymorphic siblings
perf(explore): look up each symbol and walk each node once per request
perf(store): cache the edge and node lookups' statements
fix(watch): a directory moved into the project indexes its files
fix(extract): a JSX tag in a .js file renders its component, as in .jsx
fix(ui): the Key, wide effect rows and condition labels fit the canvas
fix(sync): a call through an imported value follows its module's edits
perf(resolve): stop compiling patterns and splitting files per reference
perf(synthesis): read only what the Nix and Erlang passes use
perf(sync): rewire Terraform modules only when their wiring changes
fix(deps): update cookie and url for two new RustSec advisories
feat(cli): add codegraph context
feat(cli): print per-phase timings to stderr under CODEGRAPH_PHASE_TIMINGS
feat(bench): phase timings, a load guard, more candidates and sync runs in --ab
feat(extract): custom Lua module loaders
feat(resolve): look up Lua modules under the configured roots first
perf(resolve): resolve the next batch while the current one is written
perf(resolve): read each scope's receiver declarations once per file
perf(watch): sync one or two saved files after a short quiet window
perf(sync): rerun only the synthesis passes whose inputs changed
END_COMMIT_OVERRIDE

v0.56 changes graph meaning (framework resolvers, synthesis, VB.NET,
grammar bumps), so the extraction version moves once, first, to 23. A
v0.55 index (schema 10, extraction version 22) is Outdated and upgrades
through the existing full migration; v0.55 reports a version-23 index as
Future and writes nothing.

- upgrade_from_v055 covers the paths upgrade_from_v054 covers (CLI sync,
  catch-up, the cold MCP session's daemon upgrade, an older uninit stays
  Uninitialized, a failed upgrade still refuses, interrupted builds,
  tombstones and missing databases are skipped) over a fixture the
  official v0.55.2 linux-musl binary wrote; checksum, attestation and
  commands are in its README. The shared helpers move to
  tests/upgrade_support unchanged.
- upgrade_from_schema_9 downgrades a fresh init of the mini corpus to
  schema 9 instead of planting rows from 3878d52, so its comparison with
  a fresh init checks only the migration. The release fixture keeps a
  third test that checks the in-place migration alone.
A database whose schema_versions records a version above this binary's
was written by a newer codegraph (OD-19). Reads, status, sync, MCP, the
daemon, init and index --force now refuse it before they change a byte,
and the error names both versions. ensure_schema_and_migrations returns
MigrationError::NewerSchema before it creates a table, migrates or
analyzes.

The newer version may sit only in an un-checkpointed write-ahead log.
The writers that tolerate a live log (an incremental sync, the daemon's
recovery of a dead owner's log) and every rebuild entry (before an
explicit init removes a copied project's state slots, before a lockless
root gets its lock, before building is published) decide from
schema_probe: the main file plus the log's committed frames, applied in
memory the way SQLite's recovery does, so no -wal or -shm is created or
folded. A file that is not SQLite is still replaced; a database whose
version cannot be read is refused, and the error says nothing changed.

uninit --force skips the check and stays the way to discard such an
index; the refusal offers it only for the states uninit accepts. status
reports the index as current with initialized false and both versions.
test_engine() returned an engine over /tmp/cg-mcp-engine-{pid}-{seq} and
never removed the directory, so a reused pid opened a stale index and
engine tests failed locally. TestEngine derefs to the engine, removes a
stale directory before it creates one, and on drop closes the engine
before removing its directory.
The member-path std gate deferred on 2026-10-03 needs no code: the v0.55
port of upstream #2169 already keeps a receiver whose declared type the
project does not declare (PathBuf, &Path, std::path::PathBuf) from
binding a project method by name. The probe pins it: index_root.join,
base.join, p.join and q.join stay unresolved and reach no
LineIndex::join, while env.set() still reaches EnvGuard::set.
Takes dependabot #334 except tree-sitter-swift: tree-sitter 0.27.1,
tree-sitter-language 0.1.9, erlang 0.21.0, php 0.25.1, scala =0.26.3,
cfml 0.26.43, and the windows-sys reselection. Every golden, the four
precision corpora and this repository index identically before and after.

tree-sitter-swift stays at =0.7.3 (OD-B4). 0.7.4 fixes the scanner line
behind upstream #2683 (`1UL << 32`, which MSVC folds to 0, so the Windows
build reads `try! Foo()` as a call of `! Foo`), but it also regenerates
the grammar: a call after an infix or prefix operator (`a + b.c()`,
`!a.b()`) comes out as another tree, which the walker does not read as a
member call. Upgrading it lost an exact-match edge in the swift golden and
turned two Alamofire callees into whole expressions; the upgrade waits for
that walker change.

The #2683 probe pins calls after try!, try? and try. It is ignored on
Windows until the upgrade; with the scanner line changed to what MSVC
compiles it to, it fails on Linux the way upstream observed on Windows.
No real Windows host was used. The grammar manifest records the held
version, and languages.md the Windows limitation.
A Current index beside the uninit tombstone (an init that published
Current but could not remove it) refused uninit --force with
CurrentTombstoned. With a schema a newer codegraph wrote, init refuses
that index and names uninit --force, so the refusal pointed at a command
that then failed.

Uninit's corroboration now accepts the tombstone: it discards the index
like any other Current one and keeps the tombstone, so only init
rebuilds it. Covered with and without a newer schema, in the store and
through the CLI.
A Current index beside the uninit tombstone was reported as tombstoned
before its schema was read, so status named `codegraph init` as the
recovery even when a newer codegraph wrote the database, and init then
refused it.

When the tombstone is present, the corroboration now reads the schema
version first (the write-ahead-log-aware probe, which touches no file);
a positively newer version is FutureSchema, which offers uninit --force.
Any other outcome is still CurrentTombstoned, so the same-version
contract and its init recovery are unchanged.
A refusal of a newer codegraph's index offered `uninit --force` for every
state uninit accepts, but on a Current namespace uninit first corroborates
the database's extraction stamp. With the stamp missing, malformed or not
this binary's, the offered command then failed.

The offer now runs the same read-only corroboration uninit runs before
its first change, for the tombstone precedence in the read gate and for
the rebuild prologue. A newer schema with a bad stamp, tombstoned or not,
is refused without the offer.
status's human output for an index a newer codegraph wrote always named
`uninit --force`, even when the refusal it reports does not offer it
because uninit would refuse the index (a missing or foreign extraction
stamp). It now follows the refusal: upgrade, plus the uninit recovery
only where uninit would discard the index.
Moving the shared helpers to tests/upgrade_support left
upgrade_from_v054 and upgrade_from_v055 using ExtractionStatus and Store
only in their unix-only tests, so the Windows Clippy job failed on
unused imports. The import is now cfg(unix).
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.23083% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/codegraph-core/src/collation.rs 97.10% 6 Missing ⚠️
crates/codegraph-extract/src/lang/arkts.rs 90.00% 6 Missing ⚠️
crates/codegraph-extract/src/lang/terraform.rs 93.47% 6 Missing ⚠️
crates/codegraph-cli/src/main.rs 99.15% 2 Missing ⚠️
crates/codegraph-extract/src/lua_loaders.rs 99.71% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   95.59%   96.40%   +0.80%     
==========================================
  Files         280      368      +88     
  Lines      166519   254382   +87863     
==========================================
+ Hits       159181   245227   +86046     
- Misses       7338     9155    +1817     
Files with missing lines Coverage Δ
crates/codegraph-cli/src/diagnostics.rs 91.63% <100.00%> (+0.24%) ⬆️
crates/codegraph-core/src/config.rs 98.99% <100.00%> (+0.06%) ⬆️
crates/codegraph-core/src/file_class.rs 98.96% <ø> (ø)
crates/codegraph-core/src/types.rs 100.00% <100.00%> (ø)
crates/codegraph-extract/src/embedded/astro.rs 98.83% <ø> (ø)
crates/codegraph-extract/src/engine.rs 97.27% <100.00%> (+0.28%) ⬆️
crates/codegraph-extract/src/ext_config.rs 98.63% <100.00%> (+0.33%) ⬆️
crates/codegraph-extract/src/lang/kotlin.rs 97.54% <100.00%> (ø)
crates/codegraph-extract/src/lang/mod.rs 100.00% <ø> (ø)
crates/codegraph-extract/src/spec.rs 91.50% <100.00%> (ø)
... and 161 more

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The groundwork the routers of the next commits draw their edges with
(F1, upstream #2129 and #2395). No registered resolver uses the new
pieces yet, so every golden and the express, typescript-large and
self-index graphs are unchanged.

- EdgeKind::Navigates, stored as text like every edge kind. Callers,
  callees, the named-symbol flow and a flow's boundary follow it, as
  upstream's traversal, FLOW_EDGE_KINDS and CONTINUATION_KINDS do.
- A ResolvedRef can carry an EdgeShape (upstream edgeKind, metadata and
  alsoTargets): the edges' kind, the metadata on the target's edge, and
  more targets, each its own edge under the same kind and confidence.
  ResolvedRef::new builds the plain resolution every resolver returned
  before.
- frameworks/package_deps reads the dependencies a project declares in
  its root package.json and up to 24 nested ones: one or two directories
  down, then deeper above JavaScript-family code, never inside
  node_modules. React and NestJS detect through it, so an app whose
  manifest is in frontend/, apps/web/ or src/Web/ClientApp/ is detected
  without its fallback evidence. Upstream package-deps.ts is unchanged
  between b635dd46 and e8ddc4e2.
- A framework can name its app dependencies (appDependencies). When a
  manifest declares one, its extractor runs only on files whose nearest
  package.json naming such a framework names it. The frameworks row a
  sync compares adds a digest of where each gated framework runs, so a
  manifest edit that moves an app re-extracts every file, as a framework
  that came or went does. The JS control inputs digest every manifest
  detection may read, so a sync notices one appearing beside no script.
- The trait gains cross_file_nodes and navigation (upstream #2400 and
  #2425), both None by default; nothing calls them until a router
  implements them.

The sync matrix gains two cases: React declared in an app's manifest,
and in a manifest one directory down above no script. The gating sync
case waits for the first gated framework (W7-07).
An edge a framework resolver made now names that resolver in
metadata.framework (upstream #2159), as a synthesized edge names its
pass in synthesizedBy: a Tauri invoke('greet') says `tauri`, a Godot
autoload call `godot`. The orchestrator adds it to every result a
framework's resolve returns, before the confidence race, so a lower
confidence framework result that wins later carries it too. When a
resolution reaches several targets, only the edge to the first carries
it, as upstream's does; the others keep the metadata the resolver gave
each.

Goldens: godot's four autoload calls and routers' one Vue-resolved call
gain the key; no edge, node or reference comes or goes. The same holds
for this repository (2 edges) and typescript-large (590 edges, all
`react`).
Framework detection reads the manifests one or two directories down from
every indexed file, whatever its language (upstream #2395), and the JS
control-input row digests every such candidate. The watcher re-read that
row only when a JS-family file came or went, so a file of another language
arriving in a new directory left the row behind a fresh index: 39 cases of
the sync matrix (CFML, C, C++, C#, Dart, Go, Java, Kotlin, Liquid, Lua,
Objective-C, PHP, Python, Rust and Solidity edits) failed under the watch
driver. The graph itself converged, since a sync with changes re-detects
the frameworks anyway.

The control-input check now counts any file that comes or goes as touching
the JS kind. typescript_react_dependency_beside_an_added_script covers it
directly: React declared in frontend/package.json is detected once
frontend/build.py is indexed, and the sync records that manifest as a fresh
index does.
…ts; typed styled components

React resolution now follows upstream b635dd46 (#2120's React half,
#2240, #2429, #841, #2475's static half and #2420's wrapper half):

- A component, hook or context the file imports is the import's: a
  UI kit's `<Button>` or @tanstack/react-query's `useQuery` no longer
  binds a project namesake, and a project module's is import
  resolution's to find (#2120, #2475).
- A hook nested inside another function is never a target, and the
  file's own hook comes first (#2120). In a JS/TS module another file's
  hook or context is reached only through an import, never by bare name
  (#2240), and `f?.()` is a bare call, so an optional call no longer
  binds a class member or a property.
- A PascalCase name a .tsx/.jsx file declares as a module-level value
  is that declaration wherever the file uses it: the function the value
  wraps (`observer(function X() {…})`, `forwardRef(Inner) as …`), else
  the declaration, never another app's same-named component (#2420).
  The lazy loader half needs W7-09's reader.
- A PascalCase const declared through forwardRef/memo (bare or `React.`)
  or a styled-components/emotion tag (`styled.x`…``, `styled(Base)`…``,
  typed `styled.x<P>`…``, #2429) is a `component` node, and an inline
  render function's calls are the component's (#841). React's extract no
  longer mints regex component/hook duplicates of tree-sitter nodes; it
  emits routes only, now from .tsx/.jsx files too.

js_scan ports the bracket and string scanner upstream reads declarations
with, iteratively, so deeply nested source cannot exhaust the stack.

Goldens: routers gains the four .tsx page and data-router routes and one
route -> Layout edge; synthesis loses the regex `useCartStore` hook node
(log row in docs/equivalence.md). Precision: express-medium identical;
this repository +4 routes, -8 regex hook duplicates, and a Svelte
`onclose?.()` is now unresolved, as upstream; typescript-large and
LibreChat sampled 20 + 20 rows each, no wrong edge introduced.

LibreChat loses 919 reference sites in the interim: 857 behind the
`~/` alias its client/tsconfig.json declares (Rust reads only the root
tsconfig; upstream #2165's nearest-config aliases come with W7-09) and
62 rendering a module whose default export is `memo(X)` (#2563's
static half, W7-09). Upstream landed #2120 before #2165 the same way.

The sync matrix gains tsx_route_element_body_edit and
tsx_wrapper_value_body_edit; the react_dependency cases observe a data
router's route instead of a regex hook node. Upstream's later react.ts
rows #2737 (PORT) and #2738 (PARTIAL) are left for the next round.
…sioning

In a TS/JS module the provider convention (`*Service`, `*Controller`, …)
now takes only the reference's own class or the convention file beside
it (users.controller.ts -> users.service.ts); anything farther is import
resolution's or name matching's (upstream #2246). Nest's own specs'
`TransientService` no longer reaches an integration app's, and a
decorator call `@Controller('users')` no longer instantiates a PHP class
named `Controller`.

A NestJS route is named by the path a request takes to it (upstream
#2117). post_extract reads each `NestFactory.create` bootstrap and
renames the routes of its app's controllers in NestJS's order,
`/{prefix}/{v}{version}/{RouterModule prefix}/{path}`:

- `exclude` paths (plain, `{ path, method }`, `{/*wildcard}`, `(.*)`,
  `*`) skip the prefix and keep their version;
- a route's version is its own `@Version` (found past decorators with
  object arguments), else its class's `@Version` or `@Controller({
  version })`, else `defaultVersion`; `VERSION_NEUTRAL` has none, and
  header or media-type versioning adds no segment;
- a computed prefix is not guessed; each app takes the bootstrap with
  the longest root above it, a seed script that creates the app without
  serving it does not displace the one that configures it, and an app
  that sets nothing keeps its routes as written;
- only a route whose decorator sits in a `@Controller` is renamed.

A route keeps its id and qualified name. One an earlier pass renamed
that nothing renames any more (a removed global prefix, version or
RouterModule entry) gets the name its file gives it back, so a sync
converges with a fresh index; before, a removed RouterModule entry left
the old name, as colby's sync does. The decorator regexes are compiled
once, since the pass now scans controller files on every sync.

Goldens: servers' NestJS route becomes `GET /api/v1/users/:id` (log row
in docs/equivalence.md). Precision: express-medium and typescript-large
identical; this repository renames that route and drops the PHP
`Controller` guess; nestjs/nest's samples and specs move 43 provider
references from another app's class to the spec's own and resolve 14
more. Its 302 routes without a bootstrap of their own take the `/api` of
the one root-level e2e spec that sets one, by upstream's bootstrapFor.
A sync of typescript-large declaring @nestjs/core takes 2.8% longer
(median of three).

The sync matrix gains four NestJS cases and checks node names. The
Express and cross-tier halves of upstream's test come with W7-19a and
W7-20.
…component

Nuxt's file routes move from the Vue resolver to their own `nuxt`
resolver (upstream #2130), detected by a `nuxt`, `nuxt3` or `@nuxt/kit`
dependency or a `nuxt.config.*` file, and gated to the apps whose
nearest manifest declares one (#2129). A plain Vue app keeps its views
in a `pages/` folder just as often, and those are components a router
config names, not addresses: halo's console no longer makes a route of
each of them. Every path gets a leading `/` before the `pages/`,
`server/api/` and `middleware/` searches, so a Nuxt app at the
repository root finds its endpoints and middleware as a nested one does;
a top-level `pages/index.vue` is `/`, and a `server/api/` file takes a
page's param syntax (`[id]` -> `:id`, `[...slug]` -> `*slug`; `index`
is the folder's path, `/api` at the top).

A page route `calls` the component its own file is (#2267, new
`frameworks/page_component.rs`): the route says so by the file's
basename, and the resolver lands it on that file's component only,
never on a same-named one elsewhere (every `index.vue` is a component
named `index`). The viewer's routes list counts a component as a
route's handler, so a Nuxt page is listed with the component that
serves it.

Goldens: routers' Nuxt index route becomes `/` (its id moves) and its
two pages gain a `framework` edge each (log row in docs/equivalence.md).
Precision: express-medium and typescript-large identical; elk's 59 pages
each reach their own component, its root route is `/` and its four
`server/api/` routes appear; halo's console loses 12 routes that were
components.

The sync matrix gains three Nuxt cases: a `nuxt.config.ts` appearing,
an app's manifest coming to declare Nuxt, and a page's template edit.

The Astro half of #2267 comes with W7-19a, and #2130's Vue Router
admin-template half with W7-11. Upstream's later change to vue.ts
(#2633, 986de95c: `@/`/`~/` imports left to the import resolver) is
left for the next round.
Explore opens with the call path among the symbols the query names
(upstream's Flow section, #365): when two or more named callables are
connected by a chain of three or more, one numbered line per symbol and
one `↓` line per hop come before the header. The search is
named_symbol_flow's, the one the viewer's Flow rides, so of two equally
long routes the Flow takes the one through the symbols the query names
(#2453's explore half).

A hop names the conditions its call runs under (#1655). The new
codegraph-graph branch_guards module reads them from the caller's
current source with the extractor's grammars: the if/else and ternary
arms, switch cases, `&&` / `||` short circuits and catch blocks around
the call site up to the enclosing function, and the early exits before
it, negated, for JavaScript, TypeScript, Swift, Python, Java, Kotlin,
C#, Go, C, C++ and Objective-C callers: `↓ calls (when !busy && ready)`.
A caller file that changed since it was indexed, or one above 256 KiB,
gets no condition rather than one read at a moved line. Upstream's rules
read fwcd's Kotlin grammar and an older Go grammar; this port reads
kotlin-ng's tree (arms without control_structure_body,
return_expression, a bare break or continue as an identifier) and
tree-sitter-go 0.25's statement_list for the same labels, and passes
every guard label of upstream's branch-guards tests. codegraph-graph now
depends on codegraph-extract for the grammars.

A synthesized hop reads as the dynamic dispatch it is, in the Flow and
in the codegraph_node trail: `dynamic: interface → impl
@src/pdf-exporter.ts:5` (new synthesized_hop module, upstream's
synthesized-hop.ts at cd97bb37, #2428). The index has no synthesized
edges until the synthesis stage (W7-14), so only the engine test shows
the tag for now.

Not in this commit: the dynamic-dispatch links among the named symbols
(W7-26), boundary and polymorphic-dispatch announcements for a flow that
does not connect (the port keeps its boundary scan over the explore
seeds), and the spine's weight in file ranking and body windows (W7-25).
Upstream's interface cases of #2453 need interface-impl edges and come
with W7-14. Upstream rows left for the next round: #2750 (f5dfa21f,
PORT, named-symbol-flow.ts), #2769's branch-guards hunk (6bd217a2,
PARTIAL, the Steps status reader this commit does not port), and the
explore rows #2783 (1890b10c, PARTIAL), #2789 (214ef50e, PORT) and #2557
(5da4a41d, PARTIAL).

Goldens and the MCP fixtures are unchanged: the mini fixture's query
`Counter add runDemo` connects no chain of three, because runDemo calls
add directly and the walk reaches it first.
A `NestFactory.create` in a test file (an e2e spec) with no `src/`
segment above it now belongs to the directory above its test folder
(`integration/security/` for `integration/security/e2e/csrf.spec.ts`),
or to the directory holding it. Within one app root, the bootstraps of
the app's entry points decide over a test's: an e2e spec's
`setGlobalPrefix('api')` does not rename the routes `src/main.ts`
serves.

W7-02 ported upstream b635dd46's appRootOf and bootstrapFor as they
are. They put every such spec at the repository root and prefer the
bootstrap that configures the app, so on nestjs/nest one integration
app's spec gave its `/api` to 306 routes of ten other integration apps
and packages/core's specs. With this change only
integration/security's own routes and sample/24's keep `/api`.
express-medium and typescript-large are identical, and no golden
changes. This is a deliberate difference from upstream (KEEP-RUST,
recorded in KNOWN_DIFFS.md). It answers the W7a sub-wave gate's first
round.
W7-04 (9ef9f69) names the resolver on the edges a framework resolution
draws (`metadata.framework`, upstream #2159) without adding a sync case
of its own. The plan requires one for every commit that changes
crates/codegraph-resolve/src.

The matrix harness gains `edge_metadata_after`, which requires an edge
of the fresh index to hold a value under a metadata key. Each sync is
already compared with the fresh index by every metadata key. Two cases
use it:

- tauri_command_body_edit_keeps_the_invoke_edges_resolver_name: an edit
  to a Tauri command's body re-resolves the TypeScript `invoke('greet')`
  at its site, and the edge keeps `framework: "tauri"`.
- tsx_framework_edge_keeps_its_resolvers_name: a `.tsx` file is
  re-extracted, and the React-resolved edge to the function a component
  value wraps keeps `framework: "react"`.

Both cases fail if W7-04's naming is removed (the fresh index lacks the
key). They also fail if the incremental resolution drops the name (the
sync differs from the fresh index). Only test files change.
Next.js gets a resolver of its own, as upstream F3 (9c6bc23b) split
nextjs.ts out of react.ts. React's old rule read any `pages/` or `app/`
file with a default export as a page, kept route groups in the path
(`/(commonLayout)/tools/custom`) and drew no edge.

- A page is a route named by the path a request takes: a `(group)` is no
  segment, `[slug]` is `:slug`, `[...all]` and `[[...all]]` are `:all*`.
  It `calls` its default export. A `route.ts` handler is one
  `METHOD /path` endpoint per exported method, referencing it; a
  `pages/api/` file is `ANY /path`. Layouts, `_app`, configs, tests and
  parallel or intercepting routes are no route.
- Next is detected by a `next` dependency, or a `next.config.*` beside a
  route file, and names `next` as its app dependency (#2129): in a
  monorepo it reads only the apps whose manifest declares it.
- `router.push` / `replace` / `prefetch`, `redirect`,
  `permanentRedirect` and `NextResponse.redirect(new URL(...))` under a
  Next app become a `navigates` edge to the page their href names, with
  the `href` and `navMethod` in its metadata; each arm of a conditional
  is an edge. The href readers and the matcher are upstream's Expo Router
  ones, in a new shared `route_href` module: a string, a template whose
  holes fill parameters, a `{ pathname }` object, a local `const href`.
  A computed href, a relative one or a path no page serves stays
  unresolved.
- When several pages serve one path (two apps of a monorepo with
  `/login`), a call goes to its own app's page; several or none there
  is nothing. Upstream keeps the last page in node order, which a sync
  changes (KEEP-RUST, recorded in KNOWN_DIFFS.md).

The routers golden is rewritten (log row in docs/equivalence.md): the
three Next page routes take upstream's ids and gain their `calls` edges,
`GET /api/auth` appears, and the Dashboard's `router.push('/')` becomes
a `navigates` edge. On Dify's Next.js web the 31 page routes lose their
route-group segments, each calls its own file's component, and 27
navigation calls reach the pages they name; express-medium,
typescript-large and LibreChat are identical, and halo loses the
`/module` route React's rule made of a Vue console file.

Not in this commit: `<Link href>` and `<a href>` (a synthesizer, not a
call), the Screens and Steps builders that read these edges, and the
sync retry for a navigation call whose page appears later in another
file (upstream #2425).
Expo Router gets a resolver of its own (upstream F2, expo-router.ts at
b635dd46, with #2135's API routes).

- A file under `app/` or `src/app/` is a screen named by its path: a
  `(group)` is no segment, `[id]` and `[...rest]` stay as written, an
  `index` is its directory, a platform suffix (`.ios.tsx`) is dropped.
  The route `calls` the file's default export. Layouts and the other `_`
  and `+` files are no screen, except `+not-found`. A `+api` file is one
  `GET /path`-style endpoint per exported method, referencing it (#2135).
- Expo Router is detected by an `expo-router` dependency, or an
  `app/_layout` beside an `app.config.*`, and names `expo-router` as its
  app dependency (#2129).
- `router.push`, `replace`, `navigate` and `dismissTo`, and a project's
  own wrapper named for the verb (`safePush`), become a `navigates` edge
  to the screen their href names, through the shared href readers; a
  relative href is read from the calling screen's directory, and a
  wrapper is remembered as `via`.
- A call matches only the screens of its own Expo app, the longest
  directory above an `app/` that holds it; a file under no Expo app is
  not read, and a path two screens of that app serve stays unresolved
  (KEEP-RUST, recorded in KNOWN_DIFFS.md). Upstream keeps one table for
  the project and reads every file: in the routers corpus, the React
  Router app's `navigate('/')` reached the Expo app's `/` screen.

The Next.js resolver's duplicate-path rule moves into route_href as a
shared `ExactTable`, and the routers' unit tests share one test context.

The routers golden is rewritten (log row in docs/equivalence.md): the
Expo app's `/` and `/settings` screens and its `GET /api/hello`
endpoint appear, and the index screen's `router.push('/settings')`
becomes a `navigates` edge.
A monorepo app declares its own `paths` (`@/*`, `~/*`) in a tsconfig.json
or jsconfig.json below the repository root, and only the root's aliases
were read: LibreChat's `~/hooks`, bulletproof-react's per-app `@/lib/auth`
stayed unresolved, and since imported names wait for import resolution
(#2120) their calls, tags and imports lost their edges.

- An import tries the aliases of the config nearest the importing file
  first (walking up its directories, the root excluded; a directory
  counts only when its tsconfig.json or jsconfig.json yields aliases, so
  a lone tsconfig.base.json does not), then the root's. Upstream #2165
  (getNearestAliases). Both resolution contexts cache the lookup per
  directory.
- An importing path that is absolute or climbs with `..` never walks.
- Sync re-resolves the JS class when an ancestor directory's
  tsconfig.json or jsconfig.json appears, changes or goes away, or a
  config one of them extends changes.

Precision against the previous commit: express, typescript-large, this
repository, adifyweb and mantis identical; bulletproof-react and LibreChat
lose no site and gain 898 and 6665, each in its own app or package.
React Router routes were read by a v1.0 regex scan that named a nested
route by its own segment (`login`, `c/:conversationId?`) and never read a
route object whose path is a constant or whose page loads lazily, and a
navigation call (`navigate('/login')`, `history.push(…)`) resolved to
nothing.

- A structural scanner, ported from upstream's `scanRoutes` (the part
  that reads one file), reads `<Route>` elements and the route objects of
  a file that makes a router: nested paths compose, an index route is
  its parent's address, a route around others is the layout they render
  inside (`references` with `layout: true`), `lazy: () => import(…)`
  renders the module's default or `Component` export, an `<Outlet />`
  route renders nothing of its own, and `path={paths.x}` is a route the
  file does not spell out. A path built from a constant
  (`paths.app.root.path`) is named in `post_extract`, which now runs
  before resolution in index, migration, sync and the orphan sweep, as
  upstream's does, so a fresh index and a sync agree.
- A `react-router` resolver turns `history.push`/`replace`,
  `navigate(…)`, `router.navigate(…)` and `redirect(…)` into `navigates`
  edges carrying the href, matched against the routes of the caller's own
  app: a literal, a template with holes, a `{ pathname }` object, a local
  `const href`, `paths.x.getHref(id)`, every arm of a conditional.
  Upstream F4 (#2165, #2187, #2400, #2423, #2436, #2558, #2670).
- KEEP-RUST: a path two routes of one app serve stays unresolved rather
  than taking the first in node order, and a route file nested past 256
  levels yields no routes rather than running the stack out.

Precision against the previous commit: express, typescript-large,
adifyweb and mantis identical; this repository changes only the routers
fixture, as its golden; bulletproof-react gains ten constant-path routes
and three navigation edges; LibreChat's 14 relative routes become 16
composed ones and seven navigation calls resolve. Upstream's first-wins
table would resolve one more call (bulletproof's `navigate('/app')`).
A data-router `lazy` loader that picks the export it renders (`const {
TestTab } = await import('./tabs'); return { Component: TestTab }`) was
read for its first import, so the route rendered the module's default or
`Component` export, and a barrel of tabs has neither. A module-level value
a lazy wrapper loads (`Loadable(lazy(() => import('./Register')))`) was
bound by name, so a tag naming it reached another app's same-named page.

- The loader readers, ported from upstream (#2480), follow what a loader
  hands back: a destructured or `.then`-picked export, `(await
  import('./x')).Page`, a module binding, `Promise.all`, an `async lazy()`
  method, React Router 7's object of lazy properties, the page an
  `element` shows past a guard, or a component of the route file. The
  route's reference names the pick (`import:./x#Page`), which the React
  resolver finds through barrels, only for a React route's reference. A
  loader that hands back `Outlet` renders nothing of its own (#2670); one
  that hands over only a `loader` makes no page.
- A PascalCase value the file declares is, wherever the file uses it, the
  component of the module its lazy wrapper loads, through `Loadable`,
  `dynamic(…, options)`, a loader option or either branch of a
  conditional (#2420, #2452's route half).
- KEEP-RUST: a loader nested past 256 levels links nothing rather than
  running the stack out.

Precision against the previous commit: express, typescript-large, this
repository, adifyweb, bulletproof-react and mantis identical; LibreChat's
two tags naming a same-file `lazy()` value (`<AccountSettings>`,
`<BookmarkNav>`) reach the component of the module it loads instead of the
value itself.
A route table written in one file and handed to the router in another
(`useRoutes(routes)`, `createBrowserRouter([MainRoutes, LoginRoutes])`,
`AppRoutes.map((route) => <Route {...route} />)`) made no routes: the
scanner read only the route objects of a file that makes a router
itself.

- The table pass, ported from upstream (#2400, #2423, #2668, #2672),
  starts from every non-test file that imports React Router and hands a
  table over, finds the table where it is declared, imported or
  re-exported, or as what a function a value calls returns (through
  `useMemo` too), and makes its route objects, and the tables they name,
  routes under the path they are mounted at. They render inside the
  layouts around the mount only when the table is written in the same
  file. A navigation call binds to these routes as to any other.
- The routes are cross-file nodes (`route:<file>:<line>:table:<path>`):
  a pass after the constant naming compares the routes the tables give
  now with the stored ones, before anything resolves, in an index, a
  migration, every sync and the orphan sweep. The edges that reached a
  removed route are resolved again; a sync withdraws its markers only
  when the pass changes the store, and a re-extraction of a file keeps
  the references of the routes in it.
- KEEP-RUST: a route whose name or references changed is deleted and
  inserted again with its new references, where upstream renames it in
  place and keeps the old ones; a file nested past the scan bound hands
  over no table either.
- The table readers blank comments byte for byte, so an offset found
  past a comment holding non-ASCII text still indexes the file.

Precision against the previous commit: express, typescript-large, this
repository, adifyweb and bulletproof-react identical; LibreChat gains
the three routes of `client/src/routes/Dashboard.tsx`, which its router
names among another table's children, and mantis the eight routes of
its `MainRoutes.jsx` and `LoginRoutes.jsx`; nothing removed.
A tag whose name the file imports from a module of the project kept
import resolution's or name matching's target: the module's first
exported function (`getToolIconType` for `<ToolIcon>`), a memo
wrapper's bodyless node, a type alias, or a same-named declaration
elsewhere, and nothing when the module's default export wraps the
component (`export default memo(HoverButtons)`) or an index forwards it
(`export { default as X } from './X'`).

- React binds such a tag, ported from upstream (#2563), to the
  component the module exports under the imported name: through an
  index that forwards it, past a wrapper around it, or through a value
  holding another module's component. Where import resolution already
  reaches that component, its edge stays.
- KEEP-RUST: where the module exports no component under the name, the
  tag keeps import resolution's edge; upstream's `jsx-render` pass
  draws nothing there.
- The module surface a dependent re-resolves on covers the imports a
  module's own exports forward, read the way React reads them (each
  declarator of a statement, past a type annotation; row format 3), so
  an index that re-points what it forwards moves the tags behind it on
  sync, as a fresh index does.

Precision against the previous commit: express, typescript-large, this
repository and mantis identical. Every change is a tsx tag's
`references` edge, now the module's (`framework`, 0.9): LibreChat 181
sites (75 bound where they were unresolved, 47 retargeted, 59 the same
target), adifyweb 1038 (944, 90, 4), bulletproof-react 434 (the same
target); no tag lost its edge.
A TanStack Router app had no routes in the graph: its
`createFileRoute('/posts/$postId')` pages and `createRoute({
getParentRoute, path })` trees were plain calls, and its
`navigate({ to })` and `throw redirect({ to })` calls stayed unresolved.

- A resolver, ported from upstream, extracts one route per address.
  File routes take their path from the literal (`$x` is `:x`, a
  trailing `$` a splat; pathless `_layout` segments and `(group)`
  folders are not in the URL); an index route wins its address over
  the layout around it, and a layout file (`*.route.tsx`, or one that
  renders `<Outlet />`) is no page. Code routes are composed through
  `getParentRoute` within their file. Each route calls its component.
- `navigate`, `redirect`, `router.navigate` and `Route.navigate` bind
  to the route of their own app that the `to` pattern names, as a
  `navigates` edge with `href` and `navMethod`. The resolver is
  detected by any of the five TanStack Router and Start packages and
  runs after React Router and before Next.js, as upstream orders the
  routers.
- KEEP-RUST: a pattern two routes of one app serve stays unresolved,
  as React Router's does; upstream keeps the first in node order, which
  a sync changes.
- KEEP-RUST: a framework result inside a module that exports nothing is
  dropped like a name match's, so a route tree in a `main.tsx` that only
  renders is reached only from that file.

Precision against the previous commit: express, typescript-large,
LibreChat, adifyweb, bulletproof-react and mantis identical; this
repository gains its routers fixture's two TanStack routes. Five
TanStack Router examples gain 27 routes, 26 route-to-component edges
and 3 navigations. One component edge picks another file's same-named
function in the directory, as upstream's component rule does.
A Vue app's routes table was plain data:
`createRouter({ routes: [...] })` and an admin template's
`constantRoutes` named no route, and `router.push({ name: 'login' })`,
the way Vue apps navigate, stayed unresolved.

- A resolver, ported from upstream, reads the routes tables of a file
  that builds a router, imports `vue-router`, writes a `routes` array
  or sits in a `router/` directory: one route per entry, a child's
  path joined onto its parent's (`children` read only from an array
  written in place). A route references its parents' components as
  layouts; a parent that a child's path claims or that redirects is a
  frame, not a page.
- A route calls the component its import takes: a named import the
  module's exported node of that name, through export lists and
  re-exports; a default import or a lazy `() => import(...)` the
  module's default export, a `.vue` file's own component. The module
  is the one the router file's import resolves to, or, through an
  alias import resolution misses, the one file of the app whose path
  ends the same way. KEEP-RUST: the route's reference to an identifier
  is `component:<name>`, which only this resolver answers, so an import
  it cannot follow binds no namesake; upstream takes the module's first
  component-like function and falls back to any component of the name.
- `router.push`, `router.replace` and `this.$router.push` bind by name
  to the route of their own app that the table names so, else by path
  to a config route or a Nuxt page, as a `navigates` edge with `href`
  and `navMethod` (and `by: name`). KEEP-RUST: a destination is read
  only when it is whole (a string, a template whose holes fill whole
  segments, a conditional of them, a local initialized to one, an
  object's own `name` or `path`), so `'/redirect' + fullPath` reaches
  nothing; and a name or a path that more than one entry of an app
  carries stays unresolved, where upstream keeps the first.
- The resolver is detected by `vue-router`, `nuxt` or `nuxt3` and runs
  after Next.js and before Expo Router, as upstream orders the routers.
  A bare `navigateTo` now passes the name filter as a navigation call,
  and the Vue resolver answers it first as a Nuxt auto-import, an edge
  to its own caller, as upstream does at the audited revision.

Precision against the previous commit: express, typescript-large,
LibreChat, adifyweb, bulletproof-react and mantis identical; this
repository gains its routers fixture's Vue routes. Across six Vue apps
and the fixture: 92 routes, 92 route-to-view edges and 62 layout
references, each to the component its entry names, and 15 navigations.
A SvelteKit app's pages were plain components:
`src/routes/+page.svelte` and `src/routes/blog/[slug]/+page.svelte`
named no route, `goto('/login')` and `redirect(303, '/')` stayed
unresolved, and some `$lib/...` imports reached nothing.

- A `svelte` resolver, ported from upstream, makes each `+page.svelte`
  under a `routes/` directory a route named by its directory: a
  `(group)` folder is no part of the address and a parameter's
  `=matcher` no part of its name (upstream #2131), `[[lang]]` is
  `:lang?` and `[...rest]` is `*rest`. A layout, an error page, an
  endpoint or a loader is no route.
- It resolves what Svelte's and SvelteKit's conventions name: a rune is
  the compiler's, `$app/*` and `$env/*` are SvelteKit's own modules,
  `$lib/x` is the file `src/lib/x` of the importing file's app, and a
  capitalized call names a component. KEEP-RUST: `$lib` is read from
  the importing file's app rather than the repository root, a store
  subscription binds only the store its own component declares, and a
  component call binds only the one component of its name in the
  calling file's directory or, failing that, in the project.
- A `sveltekit-router` resolver binds `goto` (destination first) and
  `redirect` (destination after the status) to the page of their own
  app that serves the path, as a `navigates` edge with `href` and
  `navMethod`. A page whose last segment is `[[optional]]` also serves
  the shorter path unless another page serves it. KEEP-RUST: a
  destination is read only when it is whole, as Vue Router reads it, an
  absolute URL reaches nothing, and a path two pages of one app serve
  stays unresolved, where upstream keeps the first page in node order.
- Both are detected by their dependencies (Svelte also by any `.svelte`
  file) and run after Next.js and before Vue Router, as upstream orders
  them. `<a href>` links and a page's join with its loader are synthesis
  passes, which come later.

Precision against the previous commit: express, typescript-large,
LibreChat, adifyweb, bulletproof-react and mantis identical; this
repository gains its routers fixture's SvelteKit routes. Across three
SvelteKit apps (sveltejs/realworld, shadcn-svelte, svelte.dev): 45
routes, 17 navigations each to the page its destination names, and 48
`$lib` imports that reached nothing now reach their app's file.
…mits

W9-01's `codegraph context` takes its entry points from explore's search
(OD-B81) and walks the subgraph the way upstream's ContextBuilder does, at
context's own limits (OD-B79). This commit prepares both and changes no
explore behaviour:

- explore_gather::walk takes a WalkLimits. Explore passes EXPLORE_WALK
  (maxNodes 200, traversalDepth 3, the old constants' values), and the
  eight uses of the constants read the limits with the same formulas:
  each entry point's share, the type-hierarchy budget, the trim, the
  per-file and the non-production caps.
- CodeGraphEngine::explore_seed_search holds explore's entry-point
  search (high-value kinds, eight results, the segment seeds,
  deprioritize, once per id), which find_relevant_context_with_pins now
  calls.

Every explore output is byte-identical to 5b9d797's on the twelve OD-14
queries of W7-25's frozen method (gin, koel, ghostfolio and
typescript-large, fast builds on shared indexes). The codegraph-mcp
tests pass, the MCP goldens included. Three new tests pin a one-node
budget, a one-hop walk and explore's own limits; red-green variants (the
walk's depth fixed at 3, the trim at 200) each turn one of them red. No
graph change: the extraction version and every golden stay as they are.
`codegraph context <task...>` is upstream's command (src/bin/codegraph.ts
b635dd46 1421-1478 and src/context/, with #2428 from e8ddc4e2) over the
explore engine, CLI only (OD-10): the entry points of a task, the symbols
around them, their code and the call paths among them, as Markdown or
JSON, with upstream's flags, defaults, error sentences, sections and keys.

- Entry points: the first three seeds of explore's search for the task as
  written, with no minScore floor (OD-B81). Subgraph: explore's walk at
  context's limits, maxNodes 20 (--max-nodes) and depth 1 (OD-B79).
- Low-confidence note: upstream's rule (extractSymbolsFromQuery and the
  two-term corroboration of findRelevantContext) over those entry points,
  marker and text verbatim (OD-B80).
- Code blocks: upstream's priority and its 1500-unit cut, counted in
  UTF-16 code units and stopping before a surrogate pair. Source goes
  through the engine's drift-safe reader: a file changed since its sync
  gives no block, never a slice at stale lines. A YAML or properties key
  gives its key alone (#383, OD-B81).
- Call paths: upstream's walk (six symbols, 2000 steps, two entry points,
  three chains). A synthesized hop reads `→[<summary><detail> @<site>]`
  through the new SynthesizedHop::call_path_label, with the `[…]` footnote
  (#2428); explore's tag() is unchanged.
- --max-nodes reads its leading number as parseInt does (5abc is 5, 1.9 is
  1); the format and --max-nodes are checked before the project; errors
  carry the CLI's `Error: ` prefix and exit 1 (OD-B81). stdout holds the
  answer alone: code left out for drift, and auto-sync recovering or
  disabled, get a `warning:` line on stderr (the pre-start revision's
  choice on draft Q7).
- JSON follows upstream's rows: a missing signature, docstring, line or
  column has no key, a missing visibility is null.

For the mini corpus, all six variants of `Counter add runDemo` the
pre-start probe ran (default, --no-code, JSON, the Memorix shape, and
--max-nodes 1 in both formats), and the ctxrank fixture's `flat object
thing` (with the low-confidence note) and `CaptureIntroScreen`, print the
bytes upstream's e8ddc4e2 build prints; the other fixtures differ in their
entry points (KNOWN_DIFFS, Tier-2). Explore output stays byte-identical to
5b9d797's on the twelve OD-14 queries.

Performance (OD-B82, W7-25's frozen method: fast builds, the twelve
queries over gin, koel, ghostfolio and typescript-large, nine valid
rounds each with the load below 8): this commit's explore against
5b9d797's, wall p50 0.985 to 1.050 (typescript-large's third query the
highest), with byte-identical output; context against explore on the same
binary and index, 0.436 to 0.969 (0.677 for --format json on
typescript-large's first query). W9-01a's explore against 5b9d797's: 0.985
to 1.066 on eleven queries; typescript-large's third never had a quiet
round, and its CPU time over 27 loaded rounds is 1.058.

Tests: context_cli (fifteen cases, four snapshots, upstream's
cli-context-command cases), context and engine unit tests, the call-path
label, and new cases in stdout_purity, completions and future_schema_cli;
25 red-green variants each turn one of them red. The workspace tests pass
(a timing assertion in codegraph-ui's highlight test failed once under
load and passed alone). No graph change: the extraction version stays,
and regen-goldens --check finds all 32 corpora identical. docs/cli.md
gains the command, KNOWN_DIFFS its Tier-2 entry.
…MINGS

W9-00a, the phase metrics the OD-9 rule needs for table 9.1 (OD-B85's
profile-only rejections and OD-B88's phase-level target and regression
rules). With CODEGRAPH_PHASE_TIMINGS=1, init, index and sync print one
stderr line per timed phase, `codegraph-phase\t<command>\t<phase>\t<us>`,
whatever --debug and --quiet say. phase_end prints the ten init phases and
the sync phase; the new parts print on stderr only, never into the JSONL
log, so its phase_end durations still add up:

- parse_write.store_busy, the single writer's busy time;
- reference_resolution.{setup, read, snapshot, resolve, create_edges,
  insert_edges, move_refs, wal_fold, conformance, this_members}, summed
  over the batches and sent once as ResolutionObservation::Timings;
- synthesis.{read, <each pass that ran>, merge, replace, inputs}, from
  run_stage_timed;
- sync.{scan, files, frameworks, resolve, synthesis, finish}, six
  consecutive parts from sync_project_once_with_progress_timed, with the
  stage's parts when it ran.

Unset, nothing is printed. Stdout and the graph are the same either way.
KNOWN_DIFFS records colby's CODEGRAPH_SYNTH_TIMINGS as not read.

Evidence in $EVIDENCE/W9/w900/: regen-goldens.sh --check on fast builds,
32 identical with the variable unset and set (w900a-golden-check*.log);
the touched crates' tests, 5867 passed (w900a-tests.log); red-green, a
dropped sync.finish, a dropped parse_write.store_busy and an
unconditional print each turn phase_timings red (redgreen/w900a-*).
…ns in --ab

W9-00b, the measurement table 9.1 needs under OD-9, OD-B87 and OD-B88:

- Every child runs with CODEGRAPH_PHASE_TIMINGS=1 (W9-00a); its phase
  lines are read from init.stderr or sync.stderr before the run's
  directory is deleted, and its CPU time comes from wait4. Each arm gets
  the median and unscaled MAD of every phase and of its CPU time, each
  candidate a phase_ratio. A malformed line, or two runs of one binary in
  a cell naming different phases, stops the harness.
- The load guard (OD-B87): three quiet checks in a row, 20 s apart (load
  below 3, no cargo or rustc of any user, 90% idle over a 1 s /proc/stat
  sample) before timing; before each run a load below 8 and 7/8 (or 3/4)
  of the CPUs idle; after each run the busy CPU time less the child's and
  the harness's is the foreign load, and a run over 0.5 (or 2) CPUs is
  void, kept in the report and run again, each binary of a cell at most
  twice its runs. --no-load-guard turns it off; --guard-max-foreign-saturating,
  --guard-max-foreign-partial and --guard-start-max-load replace the
  defaults, and every run's foreign CPU, void or kept, is in the report.
- --candidate repeats: the baseline and every candidate rotate in one
  session, each candidate compared with the baseline (candidates[],
  graphs[], cells[].candidates[]; the old fields are the first one's).
- --threads default leaves RAYON_NUM_THREADS unset, and is the cell when
  --threads is omitted.
- --op sync-edit:<N> and sync-edit:1:<path>: an untimed init and warm-up
  sync, then a comment line appended to the edited files before each
  timed sync; every sync must re-index exactly them, and the last synced
  graph must equal a fresh init of the same source. A single-file sync is
  judged against the 1.15 sync budget.
- scripts/od9-verdict.py (python3 -I) applies OD-9 with OD-B88's rules to
  one or more reports: ADOPTED, REJECTED_BY_PROFILE, or no verdict for
  missing evidence or a fast-profile build.

The report is schema 2; schema-1 fields keep their meaning.

Evidence in $EVIDENCE/W9/w900/: codegraph-bench tests (w900b-bench-tests.log)
with unit tests over fixture stderr, a stubbed /proc/stat, the rotation
order, the sync-edit op, and the verdict at the 5%, 2*MAD, 2% and
noise-floor boundaries; red-green (redgreen/w900b-*): each boundary moved,
the void never set, and the rotation removed each turn a test red.
Table 9.1 row 26 (upstream 8c1e821) and the evidence for row 5 (2adc7f6),
both ALREADY-HAVE under OD-9's in-table rule and OD-B84: the valve folds
at a batch boundary under the one exclusive writer lease, so no reader can
pin the WAL. The existing test only asked for a sidecar under 4096 bytes.
This one ports the upstream case "chops a fully-backfilled WAL file to
zero": with the bulk pragmas on and over 1 MiB in the -wal file,
checkpoint_wal_if_over(0) folds and leaves the file itself at zero bytes,
for the store's valve (the batched resolver and the orphan sweep) and the
active rebuild's (the full index and migration replay).

Evidence in $EVIDENCE/W9/w900/: b1-evidence.md (the callers and their
lease); red-green (redgreen/b1-*): TRUNCATE changed to PASSIVE and to
RESTART, in queries.rs and in rebuild.rs, each red with 1050632 bytes left.
Read the custom Lua module loader settings of #1617 (OD-11): the [lua]
table of the selected config.toml (APP_CONFIG, else the project's own)
and the lua object of the project's codegraph.json, both kept raw as
JSON values so a mistyped block never fails the rest of either file.

The new codegraph_extract::lua_loaders validates and merges them into
the canonical LuaLoaders: per key, config.toml's array replaces
codegraph.json's whole; loader names follow the Lua name rule
(dotted paths allowed), roots must be project-relative folders (`.` is
the project root, `./x/` reads as `x`); every dropped element, mistyped
key, unknown key or non-table block is named in a warning on stderr,
and indexing goes on. ExtractOptions::for_project fills the new
lua_loaders field. Nothing reads it yet, so the graph does not change.

Upstream #1617 is an open issue with no code, so every rule is this
port's own (OD-11, OD-B83). Evidence: W9/w902/ (progress.md, logs,
red-green variants r1-r3) and the pre-start revision
W9/prestart/lua/revision-draft.md.
A call of a loader the project names in [lua] loader_functions (or
codegraph.json lua.loaderFunctions) is extracted as a require is when
its first argument is one plain string literal: an import node named
the literal, an imports reference of that name, and no calls reference
(#1617, OD-11). The callee must be the whole configured name, a dotted
path rebuilt name by name, case-sensitive; a concatenation, variable,
parenthesized string, table, empty string or Luau backtick string names
no module and the call stays what it was. Positions follow require's:
top-level statements, blocks and declaration values are imports, a
function body keeps its call.

ExtractOptions carries the settings through extraction_of into the
walker. A new project_metadata row, lua_loaders, records the canonical
settings; init, migration and every persisted sync write it, for a
project naming none too. A sync compares it before its first change:
other loader names, or a missing or unreadable row, withdraw it and
extract every Lua and Luau file again (by recorded language). The
W5-09e identity leaves the loader names out, as the plan decided.

Projects without [lua] keep their graph byte for byte. Docs: cli.md
(new section; the two jsonc examples serde_json rejects are now valid
JSON), languages.md, data-model.md, architecture.md.

Evidence: W9/w902/ (progress.md, deviations.md, logs, red-green r4-r10);
plan OD-11 and OD-B83; W9/prestart/lua/revision-draft.md.
A require and a custom loader call (#1617, OD-11) now resolve under the
project's [lua] module_roots: each root, in the order written, is
looked in for each candidate in turn before upstream's project-wide
suffix search, which follows unchanged. With any [lua] setting the
literal as written is the first candidate, answered only by a Lua or
Luau file, so Require("Script/Activity/ActivityMgrC.lua") is that file
(OD-B83); a project without settings resolves byte for byte as before.

The settings ride on the resolution context through a resolver builder
(with_lua_loaders), reaching init, the migration, sync, the W7-27
recheck, the orphan sweep and, beyond the draft's list, the snapshot
context the batched full-index resolver builds. lua_module_may_be
becomes a superset (the literal as written). A sync whose roots alone
changed re-resolves every Lua import by site (new store query
lua_import_sites) and every Lua file whose aliases require a module
whole, with no re-extraction.

Docs: cli.md (roots, lookup order, the literal, alias limit),
data-model.md, languages.md, and a KNOWN_DIFFS entry: #1617 is an open
upstream issue with no code, so every rule is this port's own.

The rule for where a loader call stays a call is worded as "outside
named function bodies": the main walk also reaches anonymous function
expressions (busted callbacks, pcall(function() ... end), table function
values), so a require or loader call there is an import, as before.

Evidence: W9/w902/ (progress.md, deviations.md D9-D13, logs, red-green
r11-r19, identity/); plan OD-11, OD-B83 and OD-B92;
W9/prestart/lua/revision-draft.md.
Table 9.1 row 2 (upstream a2f3c31's double buffer; its deferred checkpoint
was already in place). The batched resolution loop read, resolved, created
edges for, and wrote each batch in turn, so the thread pool sat idle while
the single writer inserted a batch's edges and moved its references. On the
snapshot path batch k+1 now resolves on the pool while batch k's edges,
moved references and WAL valve are written. Batch k's inheritance edges
join the adjacency before k+1's context is built, so k+1 sees batches 0..k
as the serial loop shows them; k's edges are still inserted before k+1's,
the deferred references are queued in batch order, and the progress and
batch observations come in the same order. Reading k+1 before k's writes
reads the same rows: a batch's writes remove only its own. Resolution reads
only the resolver and the snapshot, never the store. The streaming fallback
stays serial. The resolve timing part is now the first batch's resolution
plus the wait for each next one.

Tests: over the cross-batch inheritance fixture, batches of 1, 2 and 3 write
the same nodes, edges, unresolved and resolved references, row ids
included, as the loop writing each batch before reading the next (a test
switch); an orphan sweep over more than one 5,000-row batch, with calls
reaching a base method through an extends edge, heals to a fresh index.
Table 9.1 row 24 (upstream 974e6c8, #1392). infer_local_receiver_declaration
scanned from each member call up to its enclosing scope's first line for
the receiver's declaration, so N calls through one receiver in one function
read its lines N times, compiling the receiver's patterns again on every
call that met a line that might declare it. SourceFacts::
receiver_declaration now remembers, per (scope's first line, language,
receiver), every declaring line of the lines already scanned and the
highest line scanned: a call within them reads the nearest declaration at
or above it, a call past them scans only the new lines. The answer is the
one the scan from the call up to the scope's start returns first, in any
query order (KEEP-RUST: upstream caches only queries moving down the file;
the parallel resolve asks in no fixed order). CFML's component-scoped
receivers, read in the whole file, keep the plain scan, as upstream does.
Compiled patterns are still not cached in the snapshot context, whose sets
can exceed 1 MB each (W4-PHP-01).

Tests: in any of 120 query orders the cached answer is the direct scan's
per scope, receiver and language, and each line is read once per key; a
probe with three calls under one declaration, a later function without
one, and one declaring its own type in the same file; a matrix case
changing the declared type above repeated calls.
Table 9.1 row 7 (upstream c74e8b0, #1397). Every watcher event set the
sync deadline a whole debounce out (2 s by default), so saving one file
reached the graph two seconds plus a sync later. A burst of at most two
pending files now waits a 300 ms quiet window, or the debounce when that is
shorter (quiet_window); a larger burst, a burst owing a full reconcile, or a
watcher without a quick window waits the whole debounce. Every event still
restarts the wait, so the sync follows the burst's last event. The scoped
sync and its 500-path ceiling were already in place (v0.55 W1-02); the
lost-event recovery, the retry backoff and the drift sentinel keep their own
deadlines.

KEEP-RUST (KNOWN_DIFFS): no 100 ms floor, an alias counts as a pending
path, and a burst owing a full reconcile keeps the debounce.

Tests: the window is quick for one or two files only, never longer than a
shorter debounce; one ingested event syncs inside a 30 s debounce; three
pending files do not sync in the quick window and sync once the debounce
passes. The nine tests that hold events pending behind a 30 s debounce turn
the quick window off (WatchOptions::quick_window, private).
Table 9.1 of the v0.56 follow-up plan: one row per deferred colby v1.5.0
performance strategy with its disposition, its evidence and, once adopted,
its commit. The rows that wait for an A/B campaign are TODO until their
verdicts exist.
…n the website

The landing pages still described the framework layer as "framework-aware
Godot/Tauri/JS ecosystem relationships", and neither they nor the website
mentioned the two features the follow-up program added on the command line
and in configuration.

- README and the Chinese README: the "Source-aware" bullet names task
  context (`codegraph context`), the language bullet describes the
  framework-aware relationships (routes, navigation, rendered components
  and the dispatch framework conventions imply) without a framework list
  or a count and links the custom Lua module loaders, and the CLI block
  lists `codegraph context "task" -p .`.
- Website, both languages: the quick start's next steps and the agents
  page point to the CLI reference's `codegraph context` section (it has
  no MCP tool), and the configuration page lists `lua.loader_functions`
  and `lua.module_roots` with a pointer to the CLI reference for the JSON
  form and the rules. The pages link the canonical references rather than
  copying them; no output block is added without a real run.
A check of every documentation requirement the v0.56 items set found
statements that no longer match the tree. Documentation and comments
only; no behavior changes.

- KNOWN_DIFFS.md: the explore entry says again that the "Dynamic-dispatch
  links among your symbols" section prints as `e8ddc4e2` prints it
  (#2748, #2751), and that #2557 is PARTIAL in the 2026-10-22 audit. The
  relevance-ranking rewrite of that entry had dropped both.
- ui.md: the list of synthesized passes behind a flow's dashed hop named
  only the passes of the synthesis stage's first items and of the
  cross-tier and React Native work. It now points at the architecture's
  synthesis section and at KNOWN_DIFFS for the passes not ported.
- data-model.md: the control-input rows (`control_inputs:<kind>`,
  `frameworks_detected`, `control_inputs_version`,
  `frameworks_version`) were documented nowhere in the data model.
- framework.rs and frameworks/mod.rs: the module docs list the React
  Native bridge, Expo modules, the Swift–Objective-C bridge, Fabric and
  Terraform as ported, and name CICS's as the one left out, with COBOL.
- file_class.rs: upstream tests mockgen's `/^mock_[^/]+\.go$/` against
  the whole path, as the function below the list already said; the
  list's note claimed it anchors to the basename.
The VB.NET trial (W8-00) failed its error-free bar, so VB.NET is
OWNER-EXCLUDED and W8-01/W8-02 do not land. Four comments still said
VB.NET joins with W8 or with its extractor: the static-member language
list and the property-body walker in walker.rs, the case-insensitive
language list in name_matcher.rs and the arity-overloading list in
overloads.rs. They now say that upstream's list names VB.NET and that
this port does not extract it. Comments only.
The ledger still read as if W7–W9, OD-19 and the 2026-10-22 audit's
DEFER rows were only planned. This records what the follow-up pull
request (#338) does with them, as merged, release pending.

- The two dated audits each gain a "Follow-up pull request status
  (2026-11-26)" section; their rows stay as written. The 2026-10-10 audit
  lists every PLANNED (follow-up PR) row with the commits that landed
  it, the rows the pull request also reached (#2025's new-directory
  half, #2214, #2242 and #2415's framework halves, #1168, #1169, #1174),
  the Rust std gate re-checked as ALREADY-HAVE, and VB.NET's rows as
  OWNER-EXCLUDED with the W8-00 trial's evidence. The 2026-10-22 audit
  lists the 18 DEFER rows that landed and the three that did not (A 106
  OWNER-EXCLUDED; B 60 and B 98 left for the next round, OD-B55), the
  prerequisites (#2420, A 56, A 57), B 84's Go half, the rows with parts
  landed, G18, and its open questions: #2683 waits for tree-sitter-swift
  0.7.4 (OD-B4), and the std gate is ALREADY-HAVE with its probe.
- UPSTREAM.md: Current alignment names the follow-up pull request, the
  180 audit rows and G19–G25 left for the next program, and every other
  item the owner left for the next round, with its decision. A new Sync
  log entry records the pull request and the older ledger rows it now
  ports (the 2026-06-24 dispatch and C function-pointer DEFER rows,
  `703629e`, which is #991 and not #1043, #1172's local function
  pointers, the H1, H3, H4 and H5 bridges). The tracked release stays
  v1.6.2 and the discovery boundary stays e8ddc4e2.

The W9-00 dispositions and row 27 are still being measured; their
places are marked with TODO(main) comments.
The website's two home captures showed the counts of an older build: the
f7424cd screenshot corpus now indexes to 69,401 edges (69,400 before), and
the page shows that and the index date. Retaken with
docs/site/tools/capture-screens.sh on this head's build (codegraph
860579a9ef4cb64c…) and the local Chrome for Testing, opening only
the viewers it serves on 127.0.0.1 (OD-B94). The other 22 captures came out
byte-identical and stay as they are.
W9-00 row 27 (OD-B89, OD-B90). A sync that changes the index recomputes
the whole synthesis stage, 19-30% of a single-file sync's wall time: on
the typescript-large whole checkout 1190 of 3988 ms at 4 threads, on
nix-darwin, erl-cowboy and erl-rebar3 15-17 of 70-87 ms (fast-profile
attribution, W9/row27/attr/). The stage can keep a pass's last output
only when it knows which base rows the sync moved, so the store gains a
change log on the write connection.

Store::begin_change_log installs TEMP triggers on nodes, edges,
unresolved_refs, resolved_refs and files that write each row's old and
new image into a TEMP table. take_change_log reads the net change by
content and turns the log off: a node without updated_at, an edge or a
reference without its id, a file by its path, language and generated
flag, with its content hash read as a text change. A synthesized edge is
never logged. Recursive triggers are on while the log is, so a row an
INSERT OR REPLACE replaces is logged as deleted. Past the cap (100,000
images by default) the log stops, drops what it held and reads as
unknown. The objects live in the connection's temporary schema, so the
main database's sqlite_master, and with it the canonical schema, does
not move.

Nothing calls it yet. Unit tests cover inserts, deletes and in-place
updates, a foreign-key cascade, upserts and rewrites that net out, a
REPLACE, a content hash that comes back, the overflow, a rolled-back
write, the main schema, and statements cached before and while the log
was on.
W9-00 row 27 (OD-B89, OD-B90). For a sync to keep a synthesis pass's last
output, the pass's last run must say what it read. A pass reads the base
graph only through View and the ViewContext it hands out, so those record
it now, and the passes take no part:

- each lookup records the 64-bit key of the rows that would change its
  answer (a node by id, a file's nodes or nodes of a kind, a name, a
  qualified or lower-cased name, a kind in a language, the edges of a kind
  into or out of a node, a site's references, the file list, a file's row
  or text); the GLOB, LIKE, signature and decorator lookups keep their
  patterns whole;
- View::gated_texts walks a scope's files through the pass's own per-file
  text check and records only the files it passes; the emitter, registry,
  tier, JSX, Pinia, Vuex, Erlang behaviour, Celery, Spring and Sidekiq scans
  use it, each check written once and used by the pass and the gate;
- View::text_lines and text_line record a node's lines and their hash
  instead of the file; the field, closure, render, ArkUI state, thunk and
  test-request passes read through them;
- a probe on disk, a directory listing or a table built from the store
  through the context, and a file that drifted since it was indexed (H2),
  mark the pass as not reusable;
- a route table keeps what its build read and every pass that reads it
  takes that in, whichever pass built it;
- goFuncFieldEdges reads go.mod through View::go_modules, Go's control
  input, instead of the project root.

Every stage run writes synthesis_passes (the engine version, a build
identity hashed from the sources at compile time, the schema version, the
options digest, the languages and the steps that ran) and one
synthesis_pass:{pass} row a step (its raw output in emission order and its
footprint) in the replacement's transaction, beside
synthesis_unindexed_inputs. StageStats gains the bitmap of the steps that
ran. Every pass still runs: the graph does not move.

The records of the typescript-large whole checkout come to 1.07 MB over 22
steps, all reusable (jsxEdges 1427 gated files and 13519 keys, ifaceEdges
9727 keys, fieldEdges 894 line ranges); nix-darwin's to 246 KB. The sync
matrix now compares the records byte for byte with a fresh init's: 1286
cases pass under both drivers. Unit tests pin each read's key, the gates,
the lines, the drift taint, the untracked reads, determinism, and each step
run alone in a view of its own recording what it records in the stage.
W9-00 row 27 (OD-B89, OD-B90). A sync that changed the index recomputed
the whole synthesis stage, 19-30% of a single-file sync's wall time
(typescript-large whole checkout 1190 of 3988 ms at 4 threads; nix-darwin,
erl-cowboy and erl-rebar3 15-17 of 70-87 ms; fast-profile attribution in
W9/row27/attr/). Now each prerequisite step and pass either keeps the raw
output its record holds or runs again.

A sync reads the synthesis marker before its first change, as the lanes'
markers are read, and when it vouches for the stored edges turns the store's
change log on. Before the stage it takes the net change of every base row
it wrote. A step keeps its output when its record is reusable, no changed
row's key (old image or new) is among its keys, no changed node matches its
pattern lookups (asked of SQLite's own GLOB and LIKE), no changed file is one
its gated scans passed or passes the scan's check now, its recorded lines
read the same, and its files beside the index read as recorded; a
prerequisite step that ran again and emitted other edges moves those edges'
keys for the steps after it. The kept and new outputs are merged and the
stored synthesized edges replaced as a whole run does, which writes back the
edges a re-extraction's cascade dropped (nix-darwin's 53 a sync), and only the
records of the steps that ran and changed are rewritten.

The stage runs whole when the marker was away or another version, the
records are missing or were written by another build (the compile-time
source digest), over another schema, options, languages or steps, a lane
bootstrapped, a control input, the frameworks or the Dart manifests moved,
the orphan sweep ran, or the change log passed its 100,000 images. The
review's holes are closed: synthesis_unindexed_inputs is the union of the
kept steps' recorded reads and the others' new ones (H1); a step that read
a drifted file is never kept (H2); and the marker moves to "24" (H3), so a
build before this one, which recomputes the stage without touching the
records, leaves a marker this engine does not trust. The extraction version
stays 23 and the graph, schema and goldens do not move; the first sync of an
existing index runs the whole stage once.

SyncOutcome carries the stage's statistics; the phase-timing lines add
synthesis.decide and synthesis.<pass>.reused, and the debug log's sync end
lists the steps that ran and the count kept. On the four metric edits with a
fast build every step is kept (nix-darwin: decide 1.1 ms, eight steps kept).

The sync matrix passes all 1334 cases under both drivers, the records
compared byte for byte with a fresh init's: 38 existing cases now assert
that their step runs again, and 48 new ones that each step keeps its output
when a bystander changes, that the four metric edits keep every step, that
two-step edits (a C include and an Angular template beside the index) rerun
only their step (H1), that the cascaded Nix edge is written back, that a
file starting to emit and a dispatcher's changed line rerun their step, and
that a new language, a control input and a framework run the stage whole.
Unit tests cover every fallback, records that do not read or are not
reusable, H2's drift and restore, H3's older and other builds, and a
property test of 300 random one-row changes over 40 lookups of the view and
its context, every change that moves a lookup rerunning its step. The
workspace suite passes (8949 tests). Three tests read the new behavior: the
marker asserts read "24", the phase-timing test finds the field pass kept,
and a file that drifted unsynced no longer hides a kept step's channel.

Fix round (OD-B95), after the first timing judged the row
REJECTED_BY_PROFILE on peak RSS (nix-darwin +2.4%) and a bimodal
sync.finish: a sync that keeps every step reads only the step records'
heads, each step's raw output has its own row synthesis_pass:{pass}:edges
(raw deflate with miniz_oxide 0.8.9 at level 6, named directly so the
workspace's flate2 backend choice does not apply, in base64; the head
names it by length and SHA-256; record version 2), and when every step is
kept the stage writes back the synthesized edges the re-extraction's
cascade dropped from the change log instead of merging (synthesis.restore).
Any head or output row that is missing, of another version, length or
text, or does not decode runs the stage whole. The WAL frames a sync
writes are the same as the base's; the sync.finish modes are the closing
checkpoint's fsync time.

The single final re-measurement (release builds, base 2d56231 against
this stack, 12 measured runs per arm and cell after a dropped warm-up,
fresh copies of both binaries per cell; od9-verdict.py at the 31 ms
floor: ADOPTED), single-file sync wall:
typescript-large whole checkout 4267.9 -> 2859.1 ms (0.670) at 32 threads,
4313.4 -> 2912.4 ms (0.675) at 4; nix-darwin 0.807 / 0.811; erl-cowboy
0.742 / 0.740; erl-rebar3 0.807 / 0.837; target (files + resolve +
synthesis) 0.457-0.613; peak RSS 1.0011-1.0185, no other phase
regressed. Evidence: W9/w927/timing2/ (report.txt, od9-verdict.txt).
W9-00's campaigns and row 27's final re-measurement are done, so the
ledger's placeholders take their results: rows 2, 7 and 24 and the added
row 27 are ADOPTED and landed (305e07d, 4412d1b, 1b8e42f; row 27 as
7c0cb28, e9d5d65, 941561e), row 9 is deferred to the next round (OD-B93),
and rows 15-17 are ALREADY-HAVE, a REJECTED_BY_PROFILE filter and N/A.
UPSTREAM.md names the dated dispositions report, the 2026-10-10 audit's
follow-up section names the commits, and the dispositions report gives the
landed commits beside the measured candidates and a section for row 27
(single-file sync wall x0.670-0.837 over the four corpora, peak RSS within
x1.0185; W9/w927/timing2/).
The final gate's `git diff --check` flagged a new blank line at the end of
tests/snapshots/context_mini.md.stdout and context_typescript.md.stdout.
Those files are `codegraph context`'s stdout byte for byte, and its Markdown
ends with a blank line as upstream's does (W9-01 compares the mini snapshot
with upstream's output exactly), so the bytes stay and the snapshots join
the viewer bundle in being exempt from whitespace errors. No build input
changes.
Windows Clippy on f501aa6 denied two unused imports in
crates/codegraph-bench/src/load_guard.rs: std::fs and std::path::PathBuf
serve only the Linux /proc probe, so they are now gated to Linux like the
probe itself. A Windows-target clippy through cargo-xwin reproduces the two
errors before the change and is clean after it. The codegraph binary does
not depend on codegraph-bench, so its bytes do not move.
@sunerpy sunerpy changed the title feat: framework resolvers, synthesis, VB.NET and codegraph context feat: framework resolvers, synthesis and codegraph context Nov 26, 2026
@sunerpy
sunerpy marked this pull request as ready for review November 26, 2026 16:09
@sunerpy
sunerpy merged commit 69afdf5 into main Nov 26, 2026
12 checks passed
@sunerpy
sunerpy deleted the feat/v0.56-followups branch November 26, 2026 16:10
sunerpy added a commit that referenced this pull request Nov 27, 2026
## Summary

Records the v0.56.0 release in the upstream-sync ledger, as plan section 5.7 of
the v0.56 follow-up program asks, and fixes one stale code comment the program's
final review noted.

- `docs/upstream-sync/UPSTREAM.md`: a `v0.56.0` RELEASED entry at the top of the
  Sync log, in the format of the `v0.55.2` entry. It covers:
  - release PR #344, merged as `73c8dd3` with its head's tree; tag `v0.56.0` at
    that commit;
  - #338, merged as `69afdf5` with its reviewed head's tree;
  - release run 45864204121, which passed all twelve jobs on its second
    attempt. The first attempt timed out in `Verify CI Passed` while the
    release commit's main CI was still running its Windows tests;
  - the publication time, the linux musl digest, and the 31 black-box checks of
    the downloaded release, all passing.
- The `UPSTREAM.md` Current alignment block, the only mutable part, now says #338
  shipped in `v0.56.0`.
- Both dated audits, `V1_6_2_AUDIT_2026-10-10.md` and
  `POST_V1_6_2_MAIN_2026-10-22.md`, gain a "Release closeout (2026-11-26)"
  section that marks their "merged, release pending" rows as shipped. No older
  line changes.
- `crates/codegraph-resolve/src/synthesis/mod.rs`: the module docs said a sync
  that changes the index recomputes the synthesis stage whole. Since v0.56.0's
  per-pass reuse, a sync reruns only the passes whose recorded inputs changed.
  The change is a doc comment only.

## Verification

- `python3 scripts/docs-check.py`: OK on 68 markdown files.
- `make fmt-oxfmt-check` (oxfmt 0.64.0), `rustfmt --edition 2024 --check` on the
  edited file, `bash scripts/guardrail.sh` and `git diff --check` all pass.
- The pre-push hook's `make pre-ci` passed ("All checks passed.").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant