Skip to content

zapp.yaml named COBOL libraries: COPY x IN MYLIB resolves in declared directories (Part of #8412) - #8850

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261121T0749Z
Nov 21, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261121T0749Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412

Checklist: done [c:9ca24188]

What

#8565 read a zapp.yaml's local COBOL libraries into one flat SYSLIB order, but the real sample (zopeneditor-sample, a development estate) also declares named libraries (MYLIB -> COPYLIB-MVS, MYFILE -> COPYLIB) used by COPY REPTTOTL IN MYLIB / COPY DATETIME IN MYFILE. Two defects followed from the flattening:

  1. a qualified COPY x IN MYLIB looked for a directory literally named MYLIB (none), fell to the default resolver, and was refused as ambiguous whenever two directories held the member;
  2. an unqualified COPY x searched the named libraries too, which Z Open Editor only uses for IN name.

Now (gitgalaxy/standards/language_lens.py, gitgalaxy/core/copy_libraries.py, gitgalaxy/core/network_risk_sensor.py):

  • only syslib entries form the unqualified order;
  • named_zapp_dirs_in_folder reads {NAME: [dirs]} (same glob expansion, same declare-nothing shapes: mvs, ${}, escapes, other languages, malformed, no PyYAML);
  • _resolve_implicit_library tries a qualified COPY's literal-directory match first (unchanged), then the nearest zapp.yaml's directories for that name, first declared holding the member wins; no hit leaves the default resolver, so no edge is lost.

Evidence

  • tests/cobol_mainframe/test_copy_zapp_yaml_8412.py: 25 pass (6 new: named-library reader, 4 end-to-end IN MYLIB scans with invented names incl. glob and order, and an undeclared name falling to the default resolver). Related tests/cobol_mainframe -k "copy or zapp or dbb or syslib": 782 pass, 8 skipped.
  • Real scan of zopeneditor-sample (copied to scratch): SAM1LIB.cbl still resolves all four COPY edges (COPYBOOK/*, COPYLIB/DATETIME, COPYLIB-MVS/REPTTOTL); that estate has one candidate per member, so this is a no-change check there and the order proofs are the authored fixtures.
  • pr_gates --fast under heavy-run: see the report. Not run: --ratchets / golden bless (no extraction rule changed; code runs only when a zapp.yaml exists).

Class / Sibling gaps

Class: workspace-declared COBOL copy-library resolution a scan reads with no --copy-libraries: proc_grps.json (handled, #8111), settings.json cpy-manager (handled, #8111), zapp.yaml SYSLIB order (#8565) and named libraries (this PR), DBB application-conf (handled, #8573), JCL SYSLIB / JCLLIB (handled, #8412 line separate).
Sibling gaps (no issues filed):

  • zapp.yaml language: pl1 include libraries: a different language's resolver, not a COBOL COPY.
  • zapp.yaml type: mvs data sets: no directory to map.
  • Per-program property-group selection (several cobol groups for different programs): groups are still concatenated.
  • Non-burned estates with zapp.yaml: not read (burned-only policy).

Remaining slices

None for this line.

🤖 Generated with Claude Code

…orms the unqualified order (Part of #8412)

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 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 21, 2026 08:16
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 08:21
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

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