Skip to content

Read in-stream PROC calls and INCLUDE groups into the SYSLIB order (Part of #8412) - #8766

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8412-20261120T1002Z
Nov 20, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8412-20261120T1002Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412 (slice 2 of 2 of the JCL copy-library-order line; slice 1 is #8753).

Checklist: partial [c:166e4a56] -- JCL SYSLIB order now reads in-stream PROC .. PEND calls and INCLUDE groups; still unread: JCL held in extensions outside .jcl/.prc/.proc (INCLUDE groups included), and the zapp.yaml / DBB lines are separate checklist items.

What changed

gitgalaxy/core/copy_libraries.py, _compile_steps (and its caller jcl_syslib_orders):

  • INCLUDE groups (IBM z/OS MVS JCL Reference, "Considerations for using INCLUDE groups"): each INCLUDE MEMBER= is replaced in place by its group, found along the job's JCLLIB ORDER= (first library wins, nested groups, groups inside a procedure), reusing jcl_proc._include_statements. A group found in no library, or invalid (holds JOB / PROC / PEND / JCLLIB), leaves the order unknown from that point (libs None): it may hold a SYSLIB DD or a SET. Before this, INCLUDE statements were skipped silently, so a step could declare an order missing the group's libraries.
  • In-stream procedures (a named PROC closed by PEND, searched before any library, p. 26): a call of one reads its compile step's SYSLIB with the same symbol rules as a library proc (call keyword symbols > PROC defaults > SET; a clash is unresolved). The template's own steps declare only through a call.
  • Fix found on the way: PEND now resets the PROC defaults (they used to leak into later job steps), and an in-stream procedure's symbols are its PROC defaults plus its own SETs; the job's SETs reach it through the call, so one SET value is not read as a clash with itself.

Class / Sibling gaps

Class: "a compile job's SYSLIB order, from the JCL the estate ships" -- every route by which JCL statements reach a compile step. Members: direct EXEC PGM=IGYCRCTL / IGYW* (done), cataloged proc via JCLLIB (done), symbolic datasets (done #8753), in-stream proc call (done here, tests), INCLUDE group at job level, nested, along JCLLIB order, inside a proc, missing / invalid group (done here, tests).

Sibling gaps (no issues filed):

  • JCL members in extensions other than .jcl / .prc / .proc (.cntl, .inc, extensionless PDS unloads) are not read, so such an INCLUDE group or proc is "missing" and the order is declared unknown (the safe side). Needs an aperture decision: separate slice.
  • A SET inside a step after its EXEC (including one a spliced group brings) is not seen by that step's SYSLIB: symbols are read at the EXEC (slice 1 design). Rare; the result is an unresolved order, never a wrong one.
  • Nested in-stream procedure calls (a call inside a procedure) are not followed: refused by skipping, not guessed.
  • zapp.yaml / DBB application-conf copy paths: their own checklist lines [c:19982422], [c:9ca24188].

Remaining slices

None for this mechanism; the above siblings are listed for later.

Evidence

  • tests/cobol_mainframe/test_copy_jcl_syslib_8412.py: 43 pass (12 new: in-stream call with and without a library, in-stream wins over a library member, template-only-through-call, PEND resets defaults, job SET vs. in-stream default clash and call-symbol settle, two compile steps not guessed; INCLUDE: supplies SYSLIB, nests and follows JCLLIB order, group SET, missing / no-JCLLIB / invalid group unknown, INCLUDE inside an in-stream proc). All authored fixtures, invented names, no census / candidate repo read.
  • Gate results: pr_gates --fast 9/9 after ruff format (no new lint findings). pr_gates --ratchets: 6 pass (cics-spec, ports, port-surface, estate, det-mutation, time), 3 fail, all from ONE cause that is not this change: example-health-apis cannot be fetched at its pinned ref (git fetch of ibm/example-health-apis says "Repository not found"), so ground-truth, completeness[example-health-apis] and fact-crosscheck stop at require_clone. The other 8 completeness corpora pass. Not verified here: whether this change moves an example-health-apis score; CI's ground-truth / completeness will say. Golden masters not re-blessed (no detector / language-standards file touched).

Lessons for agents

  • python is not on PATH in a churn worktree and GG_PY is unset: use /home/joe/gitgalaxy/venvs/selfscan/bin/python and export its bin on PATH in every Bash call.

🤖 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 20, 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 20, 2026 11:30
@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 20, 2026 11:41
@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