Repository navigation
Conversation
Re-extract the live code corpus when a resolver input changes and refresh its Astro cache only for resolver refreshes and explicit full scans. Fixes Graphify-Labs#5533 Co-authored-by: Codex <[email protected]>
|
Thanks for the pull request, @rvitaliy. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify review 
6 possible issues to check · High impact
The extract command now compares resolver-input changes against the manifest and re-extracts the code corpus when those inputs change, while preserving the existing graph’s semantic layer.
6 possible issues we couldn't confirm
- When JS/TS resolver inputs change, the Terraform path refresh is skipped ·
graphify/cli.py:5057 - Ignored lockfiles are no longer tracked as resolution inputs, so edits to them stop triggering a JS/TS refresh ·
graphify/detect.py:2375 - Lockfiles still on disk but skipped by the scan can make the JS/TS refresh flag true on every incremental run ·
graphify/detect.py:3388 - +3 more in Graphify
They don't change the score.
What this review covered
- We didn't review 1 file that isn't source code, such as docs, config, images, or generated or third-party code.
- 4 of 4 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 6223 functions depend on this change
- 3 functions became more coupled.
main()(131 callers),detect_incremental()(33 callers),dispatch_command()(8 callers). - 643 of 643 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 2271397
|
Shipped in v0.9.122 (authorship-preserving cherry-pick) — fixes a real stale-edge silent corruption when a resolver input (e.g. a tsconfig alias) retargets an import. Reconciled one cli.py line with #5528 at merge ( |
What does this PR do?
Apply the resolver-input invalidation used by
graphify updateto the incrementalgraphify extractpath. An alias can change the target of an import or call even when every importer has identical source bytes.Treat admitted resolver inputs as incremental inputs and re-extract the live code corpus when one changes. Use fresh JS/TS resolution context for that pass, then merge through the existing graph path. Skipped lockfiles are recorded as resolver inputs outside the graph corpus. Ordinary source edits still use an incremental AST batch.
Verification & Invariants
--allow-partial, reverting the config to its previous contents after publishing a partial graph can require--force. The retry uses the retained resolver snapshot.How was this tested?
Pyright reports the same 782 diagnostics on the base and on this branch. Related to #5017 and #5022, which cover the same invalidation boundary for
graphify update.Fixes #5533