Skip to content

COPY: no --copy-libraries reads OF/IN lib by directory name; declared dirs first (Part of #8111) - #8153

Merged
squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8111-20261109T0109Z
Nov 9, 2026
Merged

squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8111-20261109T0109Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8111 (slice 6, follows #8143).

With no --copy-libraries, the resolver ignored the library qualifier of COPY x OF|IN lib and the directories a workspace declares as copy libraries. It now reads a qualified COPY from the directory named lib (any case; member name any case, any extension or none), and tries the directories declared in .cobolplugin/proc_grps.json / .vscode/settings.json first for an unqualified COPY. Zero or several hits fall back to the default resolver, so no edge is lost and no gap or collision is recorded; an explicit --copy-libraries declaration is unchanged. The declaration reader moved from the lens into declared_dirs_in_folder so the lens and the resolver read the same bytes.

Class / Sibling gaps

Class: a COPY whose library is spelled (OF/IN lib) or declared by the workspace (proc_grps, settings paths-local) but resolved by the default resolver, which ignored both. Members handled here, each with a test: qualifier equal to a directory name in any case (3 cases x 3 member spellings x OF/IN, with two same-named members in other directories); the second library chosen by its own qualifier; a qualifier naming no directory and two directories of one name (fall back to the default); a declared directory for an unqualified COPY via proc_grps and via settings (JSONC); malformed and absolute declarations change nothing; EXEC SQL INCLUDE unchanged.
Sibling gaps: (1) extensionless members in an UNdeclared library with no COBOL-extension sibling are never claimed as COBOL by the lens, so the resolver never sees them (slice 5 covers only declared libraries; needs a lens evidence rule, different mechanism). (2) Libraries derived from JCL/PROC SYSLIB: a different declaration source, not here. (3) The 11 miss and 2 ambiguous the census still reports on the burned and non-candidate corpus are other classes: not touched by this change, to be classified in a following slice. (4) cics_census.py preflight wiring: separate tool change.

Evidence

  • Census (copy_resolution_census.py, burned + non-candidate corpus, counts only), before and after this change, identical: repos 40, members 1989, agree 1356, miss 11, ambiguous 2, different 0, neither 620. The real corpora hold no qualified COPY this change moves; it is proven on authored fixtures (20 of the 25 new tests fail on main's resolver).
  • Golden masters: no drift (crucible_check.py --update --yes: both fixtures already match). pr_gates --ratchets: 9 pass. pr_gates --fast: all gates pass except mypy audit on a first version, fixed (targets: list[Any]), mypy audit now clean.

Checklist: partial [c:c9828d15] -- counts reported above; the classes of the 11 misses are not yet broken out
Checklist: partial [c:43ee243d] -- library qualifier and declared-directory classes fixed; the remaining misses and extensionless-in-undeclared-library are left
Remaining slices: classify the 11 miss / 2 ambiguous; lens rule for extensionless members in undeclared libraries (language_lens.py + test); wire into cics_census.py preflight ([c:18fcac1e], tests/tools/cics_census.py + test).

🤖 Generated with Claude Code

squid-protocol and others added 3 commits November 8, 2026 20:13
…red dirs first (Part of #8111)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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 9, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 9, 2026 01:43
@github-actions

github-actions Bot commented Nov 9, 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