Repository navigation
Conversation
Only a parsed package __init__.py yields Python re-export facts. An incremental batch that holds `from pkg import f` without the unchanged pkg/__init__.py could not follow `f` to its defining module, so the edited file lost its imports and calls through the package until a full rebuild. Read export facts from live unchanged initializers that the batch's imports reach, and follow re-exports through nested initializers. This matches the existing JS/TS barrel context from Graphify-Labs#5595. Fixes Graphify-Labs#5676 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 symbol resolution now reads export facts from unchanged Python package initializers and follows re-exports into subpackage initializers.
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.
- 2 of 2 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 4755 functions depend on this change
- 2 functions became more coupled.
_collect_python_symbol_resolution_facts()(3 callers),_augment_symbol_resolution_edges()(2 callers). - 666 of 666 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 5c0ea1f
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
On an incremental update, Python re-export facts came only from an
__init__.pyin the parsed batch. Sofrom lib import fin an edited file stopped at the unchangedlib/__init__.py, and the file lost its imports and calls through the package until a full rebuild. Fixes #5676.Summary
_collect_python_reexport_contextreads export facts from live unchanged initializers that the batch's imports reach, and follows re-exports through nested initializers. Unchanged files add resolver facts only, never edges. This matches the JS/TS barrel context from #5595, and ARCHITECTURE.md now says so.On Django, adding a comment to
tests/admin_views/tests.pykept 431 of the file's 1121 import and call edges on v8, and keeps all 1121 with this change. Cold builds do not run the new code, and a cold build of Graphify's own source matches v8 byte for byte.Limitations: the same Django edit still misses 253 class level
usesedges. v8 misses them too, and they do not go through initializers.Test plan