Repository navigation
feat: framework resolvers, synthesis and codegraph context - #338
Merged
Merged
Conversation
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 Report❌ Patch coverage is @@ 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
... and 27 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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
marked this pull request as ready for review
November 26, 2026 16:09
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.").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 contextandcustom 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
DEFERrows of the 2026-10-22 upstream audit with theirprerequisites. 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.0parsed59.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-authorized2026-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:
triggerUpdate()calls each of
this.callbacks, and nothing there names thetriggerRenderthat
scene.onUpdate(this.triggerRender)stored;repo.save()on aRepostopped at
Repo::saveand never reached theJpaRepothat implements it; aC call through a struct's function-pointer field reached no registered
function. Upstream draws these as synthesized edges (
callback-synthesizer.tsand its sibling passes).
navigate('/login'), a server framework'sGET /users/:idand the handlerbehind it, and a test's request to a route were invisible to
impact,callersand the viewer. The 2026-10-10 audit planned F1–F12 and theframework resolvers for this pull request (
PLANNED (follow-up PR)); the2026-10-22 audit's 21
DEFERrows change the same code.dynamic-dispatch links, and explore ranked files without graph relevance.
codegraph contextand #1617's Lua loaders were deferred since the1.5.0 → 1.6.0sync.run_pending_migrationspassed aschema newer than the binary and
ANALYZEthen wrote to it (OD-19, recordedby 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 eachgraph change was read against precision corpora before landing (the
precision.mdof each item's evidence directory).Behaviour boundary
What changes:
nodes;
navigatesedges; edges a framework resolver made name it inmetadata.framework; synthesized edges marked bymetadata.synthesizedBy(with
via,registeredAtand the like), written by a synthesis stage afterresolution on every path that publishes an index and at the end of a sync.
Extraction: every Go
varandconstspec is a node; Vue store collectionsand RTK Query endpoints and hooks are nodes; Play routes files,
.escript,.appand.app.srcfiles are indexed; JSX tags in.jsfiles render theircomponent; C++ calls through a local function pointer reach the bound
functions. KEEP-RUST choices are in
docs/upstream-sync/KNOWN_DIFFS.md, itemby item.
passes read across files: route modules and navigation (#2422, #2425),
Angular's
angular.jsonandnx.json, files that are added, removed or crossindexing.max_file_size(#2392's resolved counterpart, C macro visibility),calls through an imported value (W7-31), Terraform module wiring, the
non-indexed
#includefiles and Angular templates the stage reads, and eachframework's own lane. The sync-convergence matrix grew from 550 to more than
1,200 cases, none ignored.
incremental sync; past 500 files it escalates like a lost event (W7-29).
codegraph_exploreopens with the Flow, listsdynamic-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=1printsper-phase timings to stderr.
statusreports a newer schema.Symbol and Flow rails, and their layout fixes.
--gen-go-std-methods, and--abphase timings, a load guard,more candidates and sync runs.
What does not change:
list and its schemas, stdout purity, project containment (every read beside
the index,
#includefiles and Angular templates included, passes the scan'srules and a lexical containment check first), and the no-AI dependency
boundary (
scripts/guardrail.sh).[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 areADOPTED;the numbers are release builds against
2d56231, at 32 and 4 threads:(
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).
(
1b8e42f): reference resolution −14.29% and −29.11% on kong-medium, −6.02%and −14.68% on typescript-large.
(
4412d1b): from saving tokio-medium'slib.rsto the server'sauto-syncedline 2097.2 → 385.4 ms and 2094.5 → 384.7 ms.(
7c0cb28,e9d5d65,941561e): the one-file sync wall on the wholeTypeScript 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_versionmoves to 24, so anexisting 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/AorREJECTED_BY_PROFILE.Index upgrade: extraction version 22 → 23
c5514d8moves the extraction version before any graph change, so usersrebuild 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_v055replays a real v0.55.2 index (official musl binary, sha256in 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 byreads,
status, sync, MCP, the daemon,initandindex --forcewithout achanged byte;
uninit --forcecan 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 commitorder, each with its command (
scripts/regen-goldens.sh --write <corpus>, orthe OD-4 re-capture for MCP). By corpus:
varandconstspec a nodecodegraph_explore.jsonre-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 --checkwasidentical 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 --checkwith its release build is identicalon all 32 corpora (
final/pre-ci.log). The OD-4 parity run against upstreame8ddc4e2(5.2) found nothing that is a defect of this pull request: on minithe nodes, files and unresolved references are identical, 11 edges differ only
by upstream's
refName/refKindstamp, and the schema differs by the v0.55KEEP-RUST items plus #2630's index (
final/golden52/parity.md, the v0.56.0parity paragraph of
docs/equivalence.md).Validation actually run
make checkon98b7052(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-pushmake pre-cion5cb5f32(6135 passed; :60)fda96ed: every check SUCCESS (:63)make checkone69a778(6251 passed, 0 failed, 1 ignored; tracker :76);make ui-check(:76)ca35060: every check SUCCESS (:86, :87)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)W7b-gate/goal-r2.log)fec4fbb: every check SUCCESS (W7b-gate/ci-run.log)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 thev-prefixW7c-gate/goal-r1.log) and two CI-fix rounds PASS6841a6d: green, Windows Tests includedmake 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)W7d-gate/goal-r2.log); CI-fix gate r2 PASS (W7d-ci-fix/goal-r2.log)654c438: every check SUCCESS, Security Audit included (W7d-ci-fix/ci-watch.log)make checkon0059b2d(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 against8c18a34plus 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/)W7e-gate/goal-w7e-r2.log)0059b2d(attempt 3: macOS runner capacity) and run 45671032839 on5b9d797: every check SUCCESS; Docs site 45671032864 (W7e-gate/ci/ci-5b9d797.txt)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/)W9/w900/final-workspace-tests.log)W9/w9c/campaigns/out/, verdicts inW9/bc9cc95/,W9/330166d/,W9/1be277d/); workspace clippy and focused tests at the land (W9/w9c/land/validate.log)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/)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/)python3 scripts/docs-check.py,make fmt-oxfmt-check(oxfmt 0.64.0),bash scripts/guardrail.sh,rustfmt --edition 2024 --checkon the edited Rust files,git diff --check; the docs check tableW10/docs-check.md(185 requirements, 9 gaps fixed, the ninth after verification, none needing code)make pre-cionf8e90e9(final/pre-ci.log: all checks, 10388 passed withsync_convergence1345/0/0 ignored and the three upgrade tests, 0 failed, 1 ignored) and again by the pre-push hook onf501aa6anda1a3b7e;git diff --checkclean afterf501aa6;regen-goldens --check32 identical; a Windows-target clippy through cargo-xwin fora1a3b7e(final/xwin-clippy-green.log); the two full 2.7 A/B reports (final/ab-final-{1,2}.md, retestfinal/ab-retest-*.md, OD-B98). the three-way sync check on GitHub runners: typescript-large one-file sync 1.115 againstfec4fbb(line 1.5), 0.700 against5b9d797(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)final/gate/goal-r1.log)a1a3b7e, attempt 1: every check SUCCESS,CI Successincluded; Docs site 45832059157 (final/ci/ci-a1a3b7e.json); onf501aa6run 45825372799 failed Windows Clippy, fixed bya1a3b7e(OD-B99)W0's and W7a's gate logs (
W0-gate,W7a-gate) werelost with
/tmp(plan 2.1). Their rows cite, as:N, the lines of the progresstracker (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.f501aa6differs fromf8e90e9only by.gitattributes, anda1a3b7efromf501aa6only by twouselines ofcodegraph-bench, which thecodegraphbinary does not link, so the releaseand musl builds of
f8e90e9are the final head's binaries for everymeasurement.
Documentation
docs/architecture.md: the framework registry in registration order, thesynthesis 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,synthesizedByand itskeys), framework node ids,
synthesis_version,synthesis_unindexed_inputs, every lane's rows and markers, the control-inputrows, the newer-schema refusal and its snapshot read.
docs/upstream-sync/KNOWN_DIFFS.md: the ported resolver and pass lists, eachKEEP-RUST and DEFER of the program, the explore and
codegraph contextTier-2 differences, OD-A4's mechanism.
docs/cli.md(context,[lua], phase timings, Live file watch, newerschema),
docs/mcp.md(Flow, dynamic links, ranking, skeletons, dynamicboundaries),
docs/ui.mdandui/README.md(Steps, Screens, conditions,Direction D as built),
docs/languages.md,docs/grammar-manifest.md(
tree-sitter-swiftheld at=0.7.3, OD-B4),docs/equivalence.md(thev0.56.0 regeneration log, the framework, synthesis and language-bridge
corpora),
docs/benchmark.md(the Go standard-library table, the--abchanges).
codegraph context, the Lua loaders andthe framework-aware relationships; the website (both languages) covers the
viewer's Screens and Steps,
codegraph contextand[lua].(2026-11-26)" section, and
UPSTREAM.mdgets its Current alignment updateand 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 indocs/upstream-sync/V1_5_PERF_DISPOSITIONS_2026-11-26.md;UPSTREAM.mdandthe 2026-10-10 audit point at it and name the landed commits (
68ab3ad,f8e90e9).Owner decisions
feat: framework resolvers, synthesis and codegraph context(VB.NET dropped after W8-00)OWNER-EXCLUDED; trial kept off the branch, no revertcodegraph_explore.jsonre-captured at W7-25a; 5.2's parity run againste8ddc4e2found no defect of this pull requestADOPTED, row 9 deferred (OD-B93), the restALREADY-HAVE,N/AorREJECTED_BY_PROFILE(docs/upstream-sync/V1_5_PERF_DISPOSITIONS_2026-11-26.md)codegraph contextCLI-only with #2428's wording (W9-01);[lua]contract as frozen (W9-02)Windows Teststimeout 40 → 60 minutes (7d5db3b, OD-B76)DEFERrows and their prerequisites; 180PORT/PARTIALrows and G19–G25 for the next programreferencesedges (W7-14e)uninit --forcetree-sitter-swiftstays=0.7.3; #2683's probe ignored on Windows, not required on macOS#includefiles and AngulartemplateUrltemplates read with containment, recorded insynthesis_unindexed_inputs<Link href>is skipped (KEEP-RUST)addonsskip unchanged; a Godot-only skip laterb635dd46'sisLowValue; #2557 next round.jsJSXutil.rs/util/mod.rsresidue recorded, not fixedangular.json/nx.jsonalways JavaScript control inputsfec4fbbon the final head (run 45825362291).jsJSX tags render (W7-28); two React.jscorpora addedFoundcounts what renders; two environment switches?Xbinds only a-define;.firemember calls as upstreamshrinkCluster) for the next round1d2f851and0059b2d; the six whole-table scans for the next round.jsxvalue references for the next roundcodegraph context: upstream's walk at context's limits, the low-confidence note, four contract details, explore-relative timing lines (all within)[lua]settingsALREADY-HAVE/N/Arows, profile-only rejections, schema-order rejections, 32-thread cells locally with a load guard, release-build verdictsADOPTEDat the final re-measurement[lua]re-extracts every Lua file (accepted)ADOPTEDon typescript-large, its cost on other corpora judged at the final A/B; express-medium's peak RSS at 4 threads (×1.165 against8c18a34, ×1.043–1.066 against the W7d head) accepted as a known costf501aa6fixed bya1a3b7eRemaining risks and known limits
in Rails apps; Objective-C bridges; Express init; Angular route files;
.jsJSX 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
fec4fbbat W7e (1.597 and 1.511, OD-B78), is 1.115 on the final head afterrow 27.
UPSTREAM.md's Current alignment withtheir 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.
crates.io.
control_shutdownrefused-frame test (BrokenPipe after the hello), aWindows catch-up latency assertion, the viewer's highlight timing assertion
under load, and GitHub's macOS arm64 runner capacity.
try!is misparsed bytree-sitter-swift0.7.3's scanner on MSVC (documented indocs/languages.md).OWNER-EXCLUDEDfrom 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
/tmpbetween 2026-10-24 and 2026-10-31 (plan 2.1), and the plan'sas-built entries and the progress tracker record it.
c5514d8/tmp(plan 2.1); the plan's as-built2a3dfde/tmp(plan 2.1); the plan's as-builte5a8695/tmp(plan 2.1); the plan's as-built301a172/tmp(plan 2.1); the plan's as-built98b7052/tmp(plan 2.1); the plan's as-builtfc6b6d0/tmp(plan 2.1); the plan's as-builtb80a14f/tmp(plan 2.1); the plan's as-built7160d9a/tmp(plan 2.1); the plan's as-built5cb5f32/tmp(plan 2.1); the plan's as-builtfda96ed/tmp(plan 2.1); the plan's as-builtf699c78/tmp(plan 2.1); the plan's as-built9ef9f69/tmp(plan 2.1); the plan's as-built9c84ead/tmp(plan 2.1); the plan's as-built80a5384W7-01/86c3386/tmp(plan 2.1); the plan's as-built64b4f95/tmp(plan 2.1); the plan's as-builte69a778/tmp(plan 2.1); the plan's as-built608d5fd/tmp(plan 2.1); the plan's as-builtca35060/tmp(plan 2.1); the plan's as-builtb1ee323/tmp(plan 2.1); the plan's as-built6b74cae/tmp(plan 2.1); the plan's as-builtd0b744fW7-09/,W7-09a/85c4898W7-09b/820c102W7-09c/7046a9fW7-09d/5301bf3W7-09e/655c1dbW7-10/,W7-10a/dda60caW7-11/69902a9W7-12/5ad11e9W7-13/112e048W7-13/b3c03bcW7b-gate/fec4fbbW7b-gate/c7696e0W7-14/2a600edW7-14/3cb90d9W7-14/b/f317880W7-14/f1237a1W7-14/c31a8f7W7-14/080ec64W7-14/2b97b52W7-15/6b5ffb6W7-15/b/2cb1b7dW7-15/b/a3ae027W7-15/c/180259fW7-15/d0/77c32d6W7-15/2e419f9W7-15/d/062c7a0W7-16/a/6a3d2c2W7-17/a/f9c795dW7-17/b/ca3accfW7-16/d/cd56729W7-16/b/701a06bW7-16/b/ddf97bcW7-16/c/9498108W7-18/a/22e415cW7-18/b/a11026aW7-18/7bb0ec3W7-18/c/0d2e96aW7-18/d/5b2b6d2W7-26/64b64cbW7c-gate/97a9e19W7c-gate/6841a6dW7c-gate/6e68314W7-19/ab937ffW7-19/a/9a6a45dW7-19/b/268df19W7-19/c/97d5b2eW7-19/d/dd95fdfW7-19/e/2845975W7-19/f/7b2134aW7-19/g/8256f7bW7-19/h/6a58caaW7-19/i/a6e58d6W7-20/b316d65W7-21/654c438W7d-ci-fix/9445d69W7-27/28c2e90W7-27/dd2102aW7-22/5a8d229W7-22/b3ff9acW7-22/e16226fW7-22/cee9a13W7-23/9e1dafeW7-23/421c13dW7-23/8803eecW7-24/7c49c61W7-24/b6d35eaW7-24/beea106W7-24/48867dfW7-24/9a7768cW7-24/25dcf4eW7-24/32b9c30W7-25/c369d72W7-25/c10e457W7-25/a960b97W7-25/4349c0eW7-29/e89c1c8W7-28/05cc19aW7-30/cea1c73W7-24/sync-supp/0e6586bW7-31/e6db340W7-24/cost/08d1114W7-24/cost/fcdd9fcW7-24/cost/97cee04W7e-gate/ci-fix/278acd2W7e-gate/ci-fix/7d5db3bW7e-gate/1d2f851W7-25/cost/0059b2dW7-25/cost/5b9d797W7e-gate/fa8c7c4W9/w901/2a18fb7W9/w901/08b5514W9/w900/9c465bdW9/w900/2d56231W9/w9c/3344187W9/w902/55eede8W9/w902/cc63b9eW9/w902/305e07dW9/w9c/,W9/bc9cc95/1b8e42fW9/w9c/,W9/330166d/4412d1bW9/w9c/,W9/1be277d/68ab3adW9/w9c/323f634W10/82f21eeW10/f6ad441W10/28bb16dW10/7744126final/golden52/e7be312W10/screens/7c0cb28W9/w927/e9d5d65W9/w927/941561eW9/w927/f8e90e9W9/w927/,W10/land/f501aa6final/pre-ci.loga1a3b7efinal/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 changelogshows them, as #322 did; the grammar update stays
build(deps). Commits thatfix another commit of this branch (the W0 gate's
b80a14f,7160d9aand5cb5f32,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