Repository navigation
Graph: resolved mainframe call/exec edges join the dependency graph (#3237) - #3790
Merged
Merged
Conversation
…3237) The approved #3237 proposal: every RESOLVED invocation edge from invocation_resolver (COBOL CALL, CICS LINK/XCTL, JCL EXEC PGM=) joins the dependency graph at CALL_EDGE_WEIGHT wherever no import or function call already joins the pair -- the #3333 rule -- so pagerank, popularity, internal_dependency_links, betweenness and blast radius count runtime invocation for mainframe code as they do for every other language. Unresolved targets add nothing; error-path LINKs count like any call. - NetworkRiskSensor.build_dependency_graph takes `invocation_edges`; they are not re-published on dependency_edges, since the recorder writes every invocation edge from the resolver's own list (one edge_data row per kind). - galaxyscope resolves invocations before the graph build (full and delta). - #2992's reconciliation is now "distinct neighbours over every kind == internal_dependency_links / popularity" (test_edge_data.py, + a fold-in test). - invocation_resolver.py's header records the decision, not the deferral. Before/after (six pinned corpora): CBSA ABNDPROC popularity 0 -> 23, genapp lgstsq 0 -> 20, DSF R0010301.pli 0 -> 59; no archetype or risk score moves. Golden masters re-blessed (both modes): popularity / direct downstream on 54 mainframe files, their composition z, the network macros; outside mainframe only Composition Fit (Z-Score), 13 files, max 0.031 (population shift). Ground-truth ledger clean; rosetta audit: no new failure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
function_call_graph.md documents the 'call'/'exec' edge_data rows as graph edges (the fcall rule, distinct-neighbour reconciliation); the differential's dated #3200 entry gets a since-#3237 note rather than a rewrite. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
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 #3237, implementing the approved proposal as written.
What changes
Every resolved invocation edge from
invocation_resolverjoins the dependency graph: a COBOLCALL(static, or resolved through a VALUE), a CICSLINK/XCTL, and a JCLEXEC PGM=. It goes in atCALL_EDGE_WEIGHT(1.0), only where no import or function call already joins the pair; that's #3333's rule. PageRank,popularity,internal_dependency_links, betweenness and blast radius now count runtime invocation for mainframe code, as they already do for every other language.edge_data: unchanged in shape. The invocation rows are still written once, from the resolver's own list, and are not re-published throughdependency_edges.internal_dependency_links/popularity", with no carve-out.test_edge_data.pyasserts it, and a new test covers the fold-in: a new edge only where nothing else joins the pair, and no double counting.invocation_resolver.pyheader records the decision instead of the deferral.Before / after (six pinned corpora, main vs this branch)
ABNDPROCpopularity 0 → 23, PageRank 0.0014 → 0.0080;INQCUST0 → 4lgstsq0 → 20;lgapol01/lgdpol01/lgipol010 → 4CBTRN03C0 → 2;COMEN01C1 → 3R0010301.pli0 → 59;R0019906.pli0 → 47SAM2.cbl0 → 2ZECS003/ZECS002.asm1 → 2CompanyNameResource,SortCodeResource) gain an edge to the COBOL program they CICS-LINK(GETCOMPY,GETSCODE). The engine already extracted these call sites; they now count like any other LINK.Golden masters: re-blessed, both modes (scoped review)
205 leaf changes in each fixture:
m_fixed.h0.476 → 0.445). That's a shift in the population statistic, not a change to those files.Checks
ground_truth_ledger.py check: ledger clean. Nothing moved, and no new defect to log infield_testing.json.rosetta_audit.py(head vs main, both through shims so each checkout's own engine ran): exit 0. Every failure is pre-existing drift, none new, so norosetta:rebless-owed.tests/tools_recorders/test_edge_data.py: 9 passed.Follow-up
Porting tickets in port order (most-depended-on programs first) landed separately, after this merged.
🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g