Repository navigation
Conversation
Resolve bash function calls across sibling libraries sourced by the same entry script via three-tier precedence: direct edges (EXTRACTED), own transitive reach (EXTRACTED), and sibling entry-pool targets (INFERRED, 0.85 confidence) while remaining fail-closed on intra-pool ambiguity and passing incremental resolution context through extract(). Fixes Graphify-Labs#5564 Co-Authored-By: Gemini <[email protected]>
|
Thanks for the pull request, @m3lonxd. 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 
5 possible issues to check · High impact
Bash call resolution now uses transitive source relationships and shared entry-script pools to find functions in sibling libraries.
5 possible issues we couldn't confirm
- Bash cross-file call resolution is silently skipped when resolution context is None, so calls into sourced scripts stop resolving ·
graphify/extract.py:13769 - Calls found only through a transitively sourced script are marked as certain (EXTRACTED, score 1.0) instead of inferred ·
graphify/symbol_resolution.py:808 - Ambiguous calls are skipped within one sourcing pool but emitted once per pool when several pools match ·
graphify/symbol_resolution.py:818 - +2 more in Graphify
They don't change the score.
Code graph · 5324 functions depend on this change
- 2 functions became more coupled.
extract()(1420 callers),resolve_bash_source_edges()(15 callers). - 383 of 652 test files are affected by this change.
- Gate, test list and every flagged function: in the Graphify check.
Reviewed 0633b43
Member
|
Shipped in v0.9.123, landed via authorship-preserving cherry-pick so your commits keep your name. Thanks @m3lonxd! |
This was referenced Nov 28, 2026
This was referenced Nov 28, 2026
safishamsi
pushed a commit
that referenced
this pull request
Nov 30, 2026
…5563) Surgical resubmission of #5592 layered directly on #5589 cross-library sibling-sourced resolution and #5597 variable tracking. - Tracks caller assignments in source order at program level - Propagates caller-defined variable bases across sourcing chains - Fails closed on UNC, out-of-root, cycles, and multi-caller conflicts - Supersedes local fallback decoy edges Fixes #5563 (cherry picked from commit cb00f8a)
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.
Closes #5564
What does this PR do?
Resolves Bash function calls across sibling libraries sourced into the same entry-script namespace during
resolve_bash_source_edges, while preserving incremental-mode reachability context fromextract().Changes
graphify/symbol_resolution.py:_context_file_nidhelper to extract file-level node IDs from incrementalcontext_nodes.resolve_bash_source_edgesto accept keyword-onlycontext_nodesandcontext_edgesand resolve calls with strict three-tier precedence:EXTRACTED,1.0).imports_fromclosure (EXTRACTED,1.0), guarded by cycle-safe BFS/DFS.INFERRED,0.85), remaining fail-closed on intra-pool ambiguity and deduplicated across shared pools.graphify/extract.py: Passedcontext_nodes=resolution_context_nodesandcontext_edges=resolution_context_edgesintoresolve_bash_source_edges.tests/test_symbol_resolution.py: Added regression testtest_bash_sibling_libraries_sourced_by_same_entry_resolve_cross_calls(proven failing on pre-fixv8) plus tests covering tier precedence, multi-pool ambiguity, cross-pool isolation, cyclic transitive sources, and incrementalcontext_nodes/context_edges.Type of change
Verification & Invariants
INFERRED(confidence_score=0.85), keeping direct/own-transitive edges distinct asEXTRACTED(1.0).How was this tested?
uv run --frozen pytest tests/test_symbol_resolution.py tests/test_node_id_canonical.py tests/test_cache.py tests/test_affected_cli.py tests/test_extractors_registry.py -q(159 passed, 1 skipped Windows-only test)uv run --frozen pytest tests/test_extract.py -k 'bash' -q(66 passed, 309 deselected)uv run --frozen ruff check .(passed)uv run --frozen pyright tests/test_symbol_resolution.py(0 errors)uv run --frozen python -m tools.skillgen --check(134 artifacts OK)Graphify-specific checklist
Co-Authored-Bytrailer included