Skip to content

Copybook-resolution census: engine COPY resolver vs plain file search, wired into preflight (Part of #8111) - #8123

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8111-20261108T1644Z
Nov 8, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8111-20261108T1644Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8111 (first slice: the tool, its corpus rule and the preflight wiring; the resolver fixes are listed under Remaining slices).

What changed

  • tests/tools/copy_resolution_census.py: for every COPY / EXEC SQL INCLUDE member of every COBOL file in a repo, resolves it two ways: the engine (GalaxyIR.copy_resolution plus the BMS symbolic maps it keeps apart, from a --db-only scan) and a plain search of the repo by member name (any case, any extension or none, anywhere). Counts only, in classes: miss (engine draws no edge for the one member the repo holds), ambiguous (the repo holds it in several files and the engine refuses; not a disagreement), different (engine's edge is not copybook-shaped, a copybook of the name exists), neither.
  • Corpus rule: excluded_names() = blind candidates + census repos + non-burned trials.json estates, by basename; run_roots skips them and check_allowed refuses one. Burned estates stay in.
  • tests/tools/cics_preflight.py: sixth check, copy resolution: repos N, members N, agree N, miss N, ...; miss + different above 0 is a finding.
  • estate-trial skill: the new check and the corpus rule.

Census (counts only)

corpus repos members agree miss ambiguous different neither
burned estates 6 549 435 0 0 0 114
non-candidate corpus_cobol 37 1906 1269 33 2 0 602

First run on burned showed 16 misses: all BMS symbolic maps, which copy_resolution leaves out by design; the tool now counts the engine's symbolic copies. neither is mostly IBM product copybooks and members a repo never published. On an authored fixture the engine resolves lower-case, .CPY, nested-dir, .copy, and EXEC SQL INCLUDE members.

Class / Sibling gaps

Class: a COPY / INCLUDE member the engine resolver resolves differently from a plain any-case, any-extension, anywhere file search by member name. Handled here: the measurement for every member of the class (miss / ambiguous / different / neither) over burned + non-candidate corpus. Not fixed here (engine changes move the goldens and the ground-truth ledger, and need more than the 5-file limit): the 33 corpus misses, in three shapes seen on authored fixtures: (1) an extensionless member in an ordinary directory (cpybooks/NAME): admitted only under a dataset-qualifier directory (language_lens._pds_library_lang, #7064), about 25 of the 33; (2) a member under a dot-directory (.copybooks/...), dropped by the aperture; (3) a member named with a library path directory (DATA.SET.PATH1/X.cpy) importing another. No burned-estate program needs any of them (burned misses are 0): scope sweep, not core. .inc as the member extension of an EXEC SQL INCLUDE is also unresolved (ambiguous extension, needs content admission).

Remaining slices

  1. gitgalaxy/standards/language_lens.py + test: admit extensionless members in any directory when the body is COBOL member-shaped and some scanned file COPYs the name (shape 1; golden re-bless).
  2. gitgalaxy/core/aperture.py + test: dot-directory copybook libraries (shape 2).
  3. Resolver for shapes 3 and .inc; then drop the census to 0 on corpus_cobol.

Gates

  • pytest tests/tools/test_copy_resolution_census.py tests/tools/test_cics_preflight.py: 22 passed (~5 s; time ratchet 0 over). One test runs the real engine on an authored fixture.
  • pr_gates.py --fast: 9/9 pass. No engine code changed: no golden bless, no ratchets.

Cross-repo: none.

🤖 Generated with Claude Code

…, wired into preflight (Part of #8111)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 8, 2026 17:53
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 17:55
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant