Repository navigation
fix: a CALL to a sibling program in the same source member resolves to that member (#4447) - #4451
Merged
Merged
Conversation
…o that member (#4447) The resolver dropped any CALL that resolved to the caller's own file as recursion, so a program calling a program declared later in the same member (plain or literal PROGRAM-ID) resolved to nothing. A member declaring several programs now keeps the resolution; the self-pair still draws no edge. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…4447) Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
Closed
5 of 6 tasks
Contributor
Sibling programs in epscsmrd.cbl's 13-program member now resolve. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
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.
What was broken
A multi-program member (
PAYMAIN.cbl: PAYMAIN, PAYCALC, and literal-ID'PAYRPT') callingCALL 'PAYCALC'/CALL 'PAYRPT'produceddst_file_idNULL. Reproduced with a minimal member (MULTI calling plain-ID sibling PLAINSIB and literal-ID sibling LITSIB): both failed, so it is not specific to literal PROGRAM-IDs (H-0029).Fix
resolve_invocationstreated any CALL resolving to the caller's own file as recursion and setresolved_pathto None. Siblings declared in the same member resolve to that same file, so they were dropped. Now a member declaring more than one program keeps the resolution (the key'sresolves_tois the member); the self-pair still draws no edge. A single-program self-CALL is still recursion/None._pick_program(#4419 member-name preference) is untouched. Side effect: a recursive CALL of its own program inside a multi-program member also resolves to the member (call sites carry no enclosing-program span to tell it from a sibling), still with no edge.Before -> after
Minimal member: all 3 call sites
dst_file_idNULL -> 1. Tests:tests/cobol_mainframe/test_sibling_call_same_member_4447.py(plain + literal sibling, single-program recursion negative, #4419 preference kept).Golden masters
Both legs blessed via the kit (crucible_check PASS after update). Moved: 7. Mainframe Skeleton Completeness (Channels, Missing Inputs, Score) and 12. LLM Brief, 0 scanned files moved. All from the same cause: program calls Resolved 359 -> 376, missing program 206 -> 189 (sibling calls in the corpora's multi-program members now resolve); mean channel ratio 65.3% -> 65.9%. (scope_check lists these as unattributed repo-wide rollups.)
Ground-truth ledger
No change; check PASS.
Estate-crucible
Horrors 60/60 -> 60/60; call_sites 47 pass/2 fail -> 49/0 (PAYMAIN L42 PAYCALC, L43 PAYRPT now resolve to the member). Scored at v0.4.0.
Gate #4446 has merged (3900fc3): merged origin/main and ran
estate_crucible_gate.py --update-baseline. Thebaseline.jsondiff is only the two PAYMAIN call-site improvements (call_sites 47/2 -> 49/0, twonot_passingentries removed); the gate passes (horrors 60/60, 0 regressions).Known side effect: a recursive CALL of its own program inside a multi-program member now also resolves to the member (call sites carry no enclosing-program span), still with no edge.
Closes #4447
🤖 Generated with Claude Code
https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz