Repository navigation
fix: --copy-libraries gaps draw no edge (#4420) and copy reports persist in the master DB (#4421) - #4424
Merged
Conversation
… reports in the master DB (#4421) A COPY no library of a declared SYSLIB holds no longer falls back to the default resolver (which linked it to a same-named program source); it draws no edge and is reported as copy_member_gaps. copy_member_collisions and copy_member_gaps are stored in repo_data, restored by the state rehydrator and exposed on GalaxyIR; the estate scorer drops its second --audit-only scan and scores a COPY gap by import edges only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
Contributor
squid-protocol
marked this pull request as ready for review
October 5, 2026 10:24
This was referenced Oct 5, 2026
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.
Covers #4420 and #4421 together: both change the same
--copy-librariesreport (gaps are new, collisions are persisted alongside them) and the same estate-scorer lines.What was broken
COPY Xwhere no declared library holds X fell back to the default resolver, which linked it to a program source of the same name (H-0053:COPY ORDPRICEin ORDMAIN ->ORDPRICE.cbl,COPY SHPRATEin SHPINQ/SHPINQO ->SHPRATE.cbl), spilling intocopy_membersand layouts.copy_member_collisionslived only in the run summary, so a--db-onlyscan lost it and the estate scorer ran a second--audit-onlyscan.Fix
NetworkRiskSensor._resolve_in_libraries: a program with a declared search order is held to it. A member in none of its libraries (or not in the libraryINnames) returns no edge and records a gap (copy_member_gaps: importer, member, libraries searched). Undeclared importers (no matchingsyslibentry) and unknown library names keep the default resolver. Runtime-supplied members (SQLCA, DFHAID) stay unresolved with a gap row, no fallback.repo_data.copy_member_collisions/copy_member_gapsJSON columns (NULL when no libraries declared), restored byStateRehydrator.load_stateand exposed asGalaxyIR.copy_member_collisions/copy_member_gaps.tests/tools/estate_crucible.py: second scan removed, collisions read from GalaxyIR. Also fixed the key-gap check: acopygap now only looks at import edges (ORDMAIN legitimately CALLs ORDPRICE, a call edge, which the old check counted as a hit).Before -> after
tests/cobol_mainframe/test_copy_gaps_4420_4421.py(new): no edge for a member in no library; gaps for unqualified,IN LIBand runtime-supplied (SQLCA); undeclared importer keeps default resolution; collisions persisted by a--db-onlyscan and exposed via GalaxyIR; rehydrator restores both; no libraries -> NULL. Plus a scorer test for the copy-gap edge kinds. Real scan of estate-crucible v0.4.0: H-0053 FAIL (6 not passing) -> PASS; H-0052 collision checks unchanged (pass).Golden masters
Both legs unchanged (the goldens declare no copy libraries); scope check: 0 differences vs origin/main.
Ground-truth ledger
No change.
Estate-crucible
Horrors passing 58/60 -> 59/60 (H-0053). Checks: pass 1369->1378, fail 13->4, phantom 4->1. Channels: copies 63/0/0/3 -> 63/0/0/0, data_items 446/3 -> 449/0, layouts 140/3 -> 143/0, gaps 14/3 -> 17/0. Remaining fails are H-0050 (#4419) and H-0031.
Audits: mypy, ruff, dead_key PASS.
Fixes #4420
Fixes #4421
🤖 Generated with Claude Code
https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo