Skip to content

Read a compile job's SYSLIB concatenation into the COPY library order (Part of #8412) - #8656

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261119T1008Z
Nov 19, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261119T1008Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412

What

With no --copy-libraries, a COBOL program's unqualified COPY now resolves in the order its own compile JCL lists in //SYSLIB DD (the DD and its unnamed continuation DDs). A library is read as the directory named after the dataset's last qualifier, exactly as COPY ... IN lib already reads one (DirectoryIndex.named). Before this, two same-named members in different directories fell to the default resolver's proximity guess.

  • copy_libraries.jcl_syslib_orders(root): PROGRAM -> ordered library names over every .jcl / .prc / .proc (capped at 5000 files, .git / node_modules pruned). Reuses job_flow._statements and jcl_proc._dd_keys.
  • Compile steps read: EXEC PGM=IGYCRCTL and EXEC IGYW* procs (qualified COB.SYSLIB / COB.SYSIN). The program is the literal SYSIN member DSN=...(MEMBER).
  • network_risk_sensor._resolve_implicit_library: the JCL order is tried first (the most specific declaration), then the workspace declarations. Nothing found in the JCL order falls through (no refusal: a JCL is evidence of order, not of a complete library set).
  • Declares nothing, never a guess: a symbolic (&HLQ) or member-qualified SYSLIB dataset, a non-literal SYSIN member, and a program that two JCL files compile with different orders.

Class / Sibling gaps

Class: sources of a COPY library order a workspace ships (zapp.yaml #8565, DBB application-conf #8573, now compile JCL SYSLIB). Members of this PR: EXEC PGM=IGYCRCTL, EXEC IGYW* procs with qualified step DDs, continuation DDs, a library named twice, a following DD ending the concatenation, unreadable entries, conflicting jobs; each has a test in tests/cobol_mainframe/test_copy_jcl_syslib_8412.py, plus two real-scan order tests (both orders).

Sibling gaps:

  • JCLLIB ORDER=: it orders PROCLIBs, not COPY libraries; it matters only when the compile step lives in a cataloged proc found along it and the proc's SYSLIB is read through jcl_proc.resolve_job. Different mechanism (needs proc expansion); not built here. Burned estate that needs it: none identified; the Batch Badlands H-0071 plant is a proc-order plant, not a copy-library one.
  • SYSLIB with &SYMBOL datasets resolved through SET / proc symbolics: refused by name (declares nothing). CBSA / CardDemo compile JCL not checked for this shape.
  • Dataset -> directory by last qualifier only: an estate whose directories do not carry the dataset's last qualifier still needs --copy-libraries.
  • SYSLIB DD references (DD *.step.DD, DSN= in an INCLUDE) are not followed.

Remaining slices

  • JCLLIB-resolved compile procs (above), one slice: copy_libraries.py, test.
  • Program name = SYSIN member, not PROGRAM-ID: a mismatch (member differs from PROGRAM-ID) is not mapped; needs the engine's program-id index.

Gates

  • pytest tests/cobol_mainframe/test_copy_jcl_syslib_8412.py test_copy_zapp_yaml_8412.py test_copy_libraries_4265.py test_copy_gaps_4420_4421.py tests/test_source_reads.py: 50 passed.
  • tests/tools/audit_check.py: ruff, mypy, dead-key, doc-refs, ast-accuracy, signal-coverage all OK; ruff format clean (pinned 0.16.10).
  • pr_gates.py --ratchets: 6 pass; 3 fail (ground-truth, completeness, fact-crosscheck) because example-health-apis is not fetched at its pinned ref on this box (mainframe_corpus.py fetch), the same unfetched-corpora failure earlier churn runs recorded; not caused by this change. Not run: crucible_check.py golden bless (the change fires only where a compile JCL names a SYSLIB; no golden diff expected, unverified).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 19, 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 19, 2026 10:20
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 19, 2026 10:21
@github-actions

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