Repository navigation
Conversation
graph.json stores colliding file labels as directory suffixes such as lib/index.ts (Graphify-Labs#2032). The incremental resolver context for update, watch and extract copied that label, but the JS/TS barrel and Markdown citation resolvers find a file node by its bare basename. Editing an importer of such a barrel, or a doc that links such a file, dropped those edges and created a phantom import target until a full rebuild. Run the relabel selection again over the persisted nodes and give the resolvers the basename for exactly the nodes a build qualified. Other labels that contain a slash, such as an external @scope/package module, are left alone. Ids and persisted labels do not change. Fixes Graphify-Labs#5675 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the pull request, @Max17190. 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 
No issues reported · High impact
Incremental rebuilds now translate qualified persisted file labels back to basenames when assembling resolver context.
Code graph · 2750 functions depend on this change
- 1 function became more coupled.
dispatch_command()(8 callers). - 253 of 666 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed d7f414d
This branch has not been deployed
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.
Why
Incremental updates build resolver context from graph.json, which stores colliding file labels as directory suffixes such as
lib/index.ts(#2032). The JS/TS barrel and Markdown citation resolvers find a file node by its bare basename. So editing an importer of such a barrel, or a doc that links such a file, dropped those edges until a full rebuild. Fixes #5675.Summary
resolver_file_labelsruns the build's relabel selection again over the persisted nodes and returns the basename for exactly the nodes a build qualified. The context builders forupdate, watch andgraphify extractuse it. Ids and persisted labels do not change, and an external@scope/packagenode keeps its label.On tauri, after appending a comment to
packages/api/src/tray.tsand a line topackages/api-e2e/README.md, the incremental graph on v8 was missing 8 edges and had 2 extra compared with a cold build of the edited tree. With this change it matches the cold build, and so do all node labels. Cold builds do not run this code.Limitations: for a shared
__init__.py, this restores Markdown citations, but the import and call edges also need the fix for #5676.Test plan