fix: restore call graph relationships and Steps effects - #1862
Merged
Merged
Conversation
docs: explain completed indexing benchmarks
This was referenced Sep 15, 2026
bompus
added a commit
to bompus/codegraph
that referenced
this pull request
Sep 15, 2026
Upstream colbymchenry#1849 (atomic edge rebinding) and colbymchenry#1862 (restored call-graph relationships) re-land fork-side fixes in a different form; reconcile: - extraction: keep upstream's normalized/validated qualified-chain callee and extend the signature-method gate to javascript/jsx (colbymchenry#1862) - resolution: union upstream's store-action/chain guards with the fork's bindings model (bound receivers prove first, untyped chains refused; store accessors link their holder const; destructured names are local bindings except getState/selector shapes, which the kernel now emits) - kernel: port upstream's is_unresolved_member_chain dropped by the merge - tests: keep the wasm-parity deletion, take upstream's callers fixture, merge the chained-receiver contract comment - changelog: keep both Unreleased blocks Full suite green (4924 passed); golden dumps unchanged.
1 task
bompus
added a commit
to bompus/codegraph
that referenced
this pull request
Sep 15, 2026
…rgets (colbymchenry#1794) Rebased onto main after colbymchenry#1862: the extraction mechanism from the original revision is superseded (upstream's normalized qualified-chain callee covers the retention), but this matrix still adds value — 8 receiver shapes (optional chains, computed keys, comments, unicode, imported and namespace roots) across ts/tsx/js/jsx asserting argument calls survive while the nested member itself stays unlinked. Verified green on current main.
This was referenced Sep 15, 2026
This was referenced Sep 15, 2026
bompus
added a commit
to bompus/codegraph
that referenced
this pull request
Sep 15, 2026
…Phase 4) (#44) * feat(resolution): kernel-native read+settle over persisted bindings (Phase 4 §7a) resolve.rs: KernelResolver napi class — readPendingBatch + resolveChunk over bindings/nodes/imports on a read-only rusqlite conn, mirroring the resolver-worker chunk contract. ReferenceResolver stays the orchestrator: framework resolvers, merge/cleanup, and the TypeScript path are unchanged, with per-ref and whole-batch fallback when the kernel is absent or a ref is ineligible (CODEGRAPH_KERNEL_RESOLVE=0, RESOLVE_SHADOW for divergence). Cross-build -shm isolation: node:sqlite and bundled rusqlite keep separate intra-process wal-index lock registries (fcntl can't discriminate same-process conns), so a worker kernel conn's walIndexRecover could rebuild the shared -shm under a writer commit — measured on the linux corpus as whole cleanup transactions overwritten in a checksum-clean WAL, plus a SIGBUS. Worker kernel conns now open a checkpointed snapshot copy (codegraph.db.kr-snapshot) over extraction-static tables; the WAL valve is quiesced while any kernel conn is live on the real file; and KernelResolver.close() gives deterministic teardown — a GC-timed destructor was itself a mid-run shm actor. Pool engages preflight-first so a declined host never pays the snapshot copy. Verified: pool-only falsifier 4/4 clean; mitigated kernel+pool linux runs clean; full engine suite 4881; eval precision 10/10; byte-identical edges across kernel/pool/off configs on the smoke corpus. * fix(resolution): pass through store-bindable JS calls in the kernel path The merged colbymchenry#1862 store-binding matcher can fire on a prefilter miss and short-circuits matchByExactName's candidate list. It is source-reading and stays in TS, so a JS-family bare `calls` ref whose file const-binds its name (destructure or selector alias) now passthrough instead of settling. Absent that shape the matcher cannot fire, so kernel adjudication is unchanged elsewhere; isUnresolvedJsMemberCall's dotted chains were already ineligible via name_is_bare.
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.
This restores relationships lost between npm 1.6.0 and main, fixes the remaining Steps/callers assertions, and avoids repeatedly scanning each source file while looking for bound store actions. Excalidraw's mutation-to-render flow connects again, and Steps retains database effects and selected Zustand actions.
.getStateeligibility in a bounded resolver-context memo, invalidated with source caches during sync. Positive matching still uses every existing scope, shadow, import and store guard. No helper bypass or reference removal.Validation on Node 24.16.0/Linux:
Four fresh full VS Code platform indexes and all integrity/FK/orphan checks now complete with no wall timeout. Every node, edge and retained-reference row/multiplicity is identical across both pairs (75,767 nodes, 256,523 edges, 166,516 retained references; zero pending).
The cache saves 6.1–7.2% of total indexing CPU in these pairs; resolution CPU falls 8.4–10.8%. Elapsed improvement remains variable. Diagnostics show substantial disk/page waits with only 92–158MiB available at sampled minima, zero visible CPU quota throttling, and 0.21–0.30% CPU steal. Matching CPU does not rise with progress. The old 180s stops came from the audit harness; all incomplete evidence is preserved, and its precise wait sites cannot be reconstructed.
The portable benchmark now records phase/batch progress, CPU/RSS and event-loop state, identifies database maintenance, saves completed-index measurements before verification, and rejects existing fixture indexes. The Linux observer records process/thread and host resource counters without a wall cutoff. Actual native/WASM harness checks preserve a real cross-file call and a qualified external reference; existing-index refusal leaves SQLite bytes unchanged, and a wrong backend produces a nonzero observer exit. No additional resolver behavior changed.
Mac execution remains unavailable here; earlier extreme parser and monolithic-worker limitations are documented. No npm release is included.
Audit and cache follow-up report · Portable indexing harness
Remote head
4e6dcf9bd2b09e38aa0da7b0358ff5fdb084897dhas the exact tested local tree191a128a5c41db20cfef226a1a0b764666f962e4. Original evidence and the unmodified pre-optimization build are preserved locally.