Skip to content

fix: rebind all callers when common definitions change - #3261

Open
motsc wants to merge 1 commit into
colbymchenry:mainfrom
motsc:fix/complete-common-name-rebind
Open

motsc wants to merge 1 commit into
colbymchenry:mainfrom
motsc:fix/complete-common-name-rebind

Conversation

@motsc

@motsc motsc commented Nov 9, 2026

Copy link
Copy Markdown

Summary

A definition change can leave unchanged callers bound to old targets when a symbol exceeds the invalidation ceiling. A 501-caller fixture has identical edge totals after sync and rebuild, but 501 extra and 501 missing edges.

Replace that exemption with complete keyset-paged edge reopening and bounded failed-reference updates. Each pass owns an atomic SQLite transaction and yields between batches without leaving the caller connection in a transaction. Preserve existing edge exclusions and resolver ambiguity limits.

Verification

Add/remove competing definitions, newly resolvable failed calls, paging, reader isolation, rollback and older-runtime transaction-state handling are covered. SDK replay converges; disabling rebinding restores the failure. Full-suite and per-commit results are recorded below.

Merge Danger

Door: two-way. Common names now require more real work. This fixes one demonstrated drift mechanism, not universal convergence or a latency target. No synthesis skips, watermark exemptions or package-version change.

@motsc

motsc commented Nov 9, 2026 •

Copy link
Copy Markdown
Author

Verification for 561818da876987b66768e2ccc9362ba22aaca0b5, based directly on upstream f72c9d2efb14454ff4f9fd7b8460abd82f19a287. This contribution does not include or depend on the synthesis performance change in #3258.

  • npm run build passed.
  • Full Vitest run (--maxWorkers=2, Node 24, macOS ARM64): 11,099 passed, 2 expected failures, 50 skipped; 885 files passed, 2 skipped.
  • Actual CLI: init 501 unchanged callers, add an earlier competing definition, sync, then compare with fresh init; repeat after deleting the winning definition. Canonical node/edge signatures match after both transitions, with zero pending references.
  • Standalone SDK negative control: rebinding enabled gives 0 extra/0 missing; CODEGRAPH_NO_REBIND=1 restores 501 extra/501 missing despite identical total edge counts.
  • Owned-transaction tests cover bounded paging, event-loop turns, old-reader snapshots, rollback, caller-transaction rejection and the supported older-driver case without an exposed transaction-state getter.

No PR CI checks are configured on this repository; those results were run locally. This repairs one demonstrated invalidation hole, not universal graph convergence or a latency target. Common names now perform additional real resolution work. No package version or synthesis policy was changed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant