Repository navigation
Description
#3200 added edge_data rows with edge_kind 'call' and 'exec' — the mainframe call graph (COBOL CALL, CICS LINK/XCTL, JCL EXEC PGM=). It deliberately left them out of the dependency DiGraph, so pagerank_score, popularity, internal_dependency_links, betweenness, closeness, the archetypes and every risk score are byte-for-byte unchanged by it.
That was the conservative choice, taken so the feature could ship with a zero-diff golden master and one reviewable question deferred rather than bundled. This issue is that question.
The case for folding them in
A mainframe repository's dependency graph is currently built from COPY/INCLUDE edges alone, which are compile-time relations. The runtime topology — which program calls which, which job runs which program — is invisible to every graph metric. On cics-banking-sample-application-cbsa that is 144 call sites across 31 programs, including a genuine hub: ABNDPROC is LINKed from 124 sites in 23 different programs and has a popularity of 0. "Blast radius" is exactly the question a caller graph answers, and for this language family the engine currently answers it from the wrong edge set.
The case against
- A
CALLis not a build dependency. Deleting aCOPYtarget breaks compilation; deleting aCALLtarget does not, and the existing metrics are documented in those terms. - CICS
LINKis frequently an error path (ABNDPROCis the abend handler). Counting it as coupling would rank the abend handler as the most architecturally central program in CBSA, which is defensible as "most depended-on" and misleading as "highest blast radius". - It moves published numbers for every mainframe repo, so it needs a golden-master bless and a before/after on real corpora.
What a fix needs to decide
- All kinds, or only some? (
exec— a job running a program — is a much stronger claim of coupling than an error-pathLINK.) - Same weight as an import edge, or a lower one?
- Does
internal_dependency_links/popularitychange meaning, or does a new pair of columns carry the call degrees? A new column is the non-breaking option and keeps Persist the dependency graph edge list (enables neighborhood/interaction-level risk hypotheses) #2992's reconciliation invariant intact.
What already exists to measure it with
edge_dataalready carries the rows, so the graph input can be switched without any new extraction.call_site_data.verband.formlet a fix scope itself per verb.tests/tools/mainframe_corpus.py scoreand the refraction snapshot give a before/after on three pinned corpora.
Related: #2992 (edge_data), #3200 (the extraction), gitgalaxy/core/invocation_resolver.py's header comment records the deferral.
Activity
feat(mainframe): named call graph and dataset boundary (#3200, #3201) (…
squid-protocol commentedon Sep 26, 2026
Proposal (approved by @squid-protocol, 2026-09-26): fold resolved mainframe call edges into the dependency graph
What changed since this issue was opened
#3333 now puts confident function-to-function calls into the file graph as
fcalledges, atCALL_EDGE_WEIGHT = 1.0, in every language. So Java, Python, C and the others already count calls toward PageRank,popularity, blast radius andinternal_dependency_links.The #3200
edge_datarows of kindcall/execare now the only call edges still kept out.invocation_resolver.py's header records that deferral.On engine main today,
cobol/cics-banking-sample-application-cbsa/ABNDPROC.cbl, which 23 programsLINKto, still has:A Java utility called from 23 classes would already rank near the top. The conservative choice has become the one inconsistent language family.
The three decisions
CALL,LINK,XCTLandEXEC PGM=.CALL WS-NAMEwhose target is unresolved stays out. That matches #3265 step 6: call-derived file edges in the dependency graph (blast radius, PageRank) #3333, which takes only confident links.ABNDPROCwould become CBSA's most depended-on program. But that is what it is. If it breaks, error handling breaks in 23 programs, and other languages already count calls into their error utilities the same way.call_site_data.verb/.form.fcall. Same rule as #3265 step 6: call-derived file edges in the dependency graph (blast radius, PageRank) #3333: an edge is added only where no import edge already joins the pair, so a pair is never counted twice.popularity, blast radius andinternal_dependency_linksalready include calls for every other language. A mainframe-only column pair would now be the exception. Folding in also restores Persist the dependency graph edge list (enables neighborhood/interaction-level risk hypotheses) #2992's invariant (edge_datarows bysrc==internal_dependency_links) without acall/execcarve-out.What the implementing PR must carry
tests/tools/mainframe_corpus.py scoreand the refraction snapshot).ABNDPROC's numbers are the headline, together with the most-moved programs per corpus.ground_truth_ledger.py check. Update and assign any cause that moves. Log any defect found on an estate infield_testing.json, per CLAUDE.md.rosetta_audit.py. If the COBOL/JCL manifests move, addrosetta:rebless-owedand open a companion keyword-rosetta PR against engine main.invocation_resolver.pyheader comment andtests/tools_recorders/test_edge_data.py's scoping. Both currently record the deferral.Coordination
Another session is working on CICS right now, so I'm not implementing this from here, to avoid colliding in
invocation_resolver.py, the mainframe goldens and the ledger. Whichever session owns the CICS work can pick this up, or say here when it's clear and I'll take it.Generated by Claude Code
squid-protocol commentedon Sep 26, 2026
Taking this now: the CICS work is done (#3489/#3445 closed), and no open PR touches
invocation_resolver.py, the goldens or the ledger. I'll implement the approved proposal above and bring the before/after with the PR.Generated by Claude Code
Docs: mainframe call/exec edges are in the graph since #3237
Graph: resolved mainframe call/exec edges join the dependency graph (#…
Java conversion: porting tickets in port order, most-depended-on prog…