Skip to content

det: GETMAIN without INITIMG answers LENGERR and is refused by name when it would acquire storage (X47, Part of #6876) - #7137

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6876-20261030T1217Z
Oct 30, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6876-20261030T1217Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6876

Follow-up to #7062. This diff is 7 hand-written code and test files plus one register doc, over the 5-file cap for one reason: dropping the spec's required INITIMG group (storage.py) broke tests that pinned the old refusal (test_det_translate.py, test_eibrcode_port_5126.py) and the oracle's _getmain, which read that group (equivalence_cics.py). Source: gitgalaxy/standards/cics/commands/storage.py, gitgalaxy/tools/cobol_to_java/det/cics.py, gitgalaxy/tools/cobol_to_java/cobol_to_java_transaction_forge.py, tests/tools/equivalence_cics.py; tests tests/cobol_mainframe/test_pointer_lane_4771.py, test_det_translate.py, test_eibrcode_port_5126.py; doc docs/language_status/register/X47.md.

File-cap exception: the spec change cannot land apart from the two test files and the oracle line it breaks (each is a one-to-five-line edit that follows from it); the stub-side work is listed under Remaining slices.

What

EXEC CICS GETMAIN without INITIMG on the det port. IBM: "There is no default initialization", so the acquired contents are undefined. No fill byte is ASSUMED; the outcome is by case:

  • LENGERR (answered): FLENGTH below 1 or LENGTH zero raises LENGERR RESP2 1 and sets the pointer to zero before any storage exists, so contents are moot. These are CAGMZ's three requests (FLENGTH 0, FLENGTH -1, LENGTH 0).
  • REFUSED by name at run time: a valid length, "GETMAIN without INITIMG acquired storage" (CicsTask.getmain called with initimg -1). No proof can rest on undefined bytes; no proof is loosened.
  • Still refused at translation: a literal INITIMG, an INITIMG that is not one byte.
  • The cobol-stub side is unchanged: equivalence_cics._getmain still refuses at translation (now with a literal message, since the spec group is gone), so CAGMZ has no stub-side proof yet.

Evidence

  • Translating the cics-crucible CAGMZ: before this change 3 of its statements were holes, now 40 of 41 translate; the three GETMAIN holes are gone. The one hole left is IF WS-PTR2-N = 0 (a REDEFINES numeric view of a pointer). CAGMPT stays 46/46.
  • test_pointer_lane_4771.py: a translation test (no holes, task.getmain(..., -1) emitted, literal INITIMG still a hole) and, in the compiled-Java alias test, the runtime answers for lengths 0, -1, LENGTH 0 (22/1, pointer 0) and the refusal for a valid FLENGTH and LENGTH.
  • Gates: pr_gates --fast 9/9, --ratchets 9/9 (0 skipped), audit_check clear, pre-PR guard files 280 pass, 0 over the per-test time limit, ruff format clean on changed files. No detector change, no golden bless. det sweep: none of the 9 ports' translation changed (ports ratchet PASS); the burned epscsmrd stays blocked by SOAPFAULT and sibling CALLs.

Checklist: partial [c:5019a6ff] -- GETMAIN without INITIMG now translates on the det port (CAGMZ x3 closed there); the stub-side translation, and CAGMZ's IF WS-PTR2-N = 0 / CAGMPT's ADD 4 TO WS-PTR2-N numeric pointer view, are still holes.
Checklist: partial [c:36bb664b] -- CAGMZ's remaining hole is the REDEFINES numeric view of a pointer; unchanged here.

Class / Sibling gaps

Class: EXEC CICS GETMAIN whose acquired contents IBM leaves undefined (X47). Members: no INITIMG with length below 1 (answered LENGERR, det port, done); no INITIMG with a valid length (REFUSED at run time, det port, done); a literal or multi-byte INITIMG (refused, unchanged). Sibling gaps: cobol-stub GETMAIN without INITIMG (equivalence_cics._getmain / GGCGETM / shared table in test_cics_runtimes.py: needs the same answer-or-refuse split on the C side; different mechanism, would pass the file cap); WS-PTR2-N REDEFINES numeric view of a pointer (IF ptr-N = 0 as a NULL test, ADD n TO ptr-N as pointer arithmetic; blocks CAGMZ and CAGMPT on the stub; #5042); TWA/TCTUA (#5079); LOAD/RELEASE; RECEIVE SET without MAXLENGTH; ADDRESS OF undeclared item (#6262); UNLOCK with no key (#5079); WEB CHARACTERSET/HOSTCODEPAGE (#4767).

Remaining slices

  • Stub side of GETMAIN without INITIMG: equivalence_cics._getmain emits GGCGETM with no image, ggcics.c GGCGETM answers LENGERR for n < 1 and refuses otherwise, one new step in the test_cics_runtimes.py shared table. 3 files.
  • CAGMZ IF WS-PTR2-N = 0 as a NULL test of the pointer (det translator gen.py / program.py numeric-view refusal, plus tests); then the ADD view for CAGMPT.
  • Other unticked checklist lines each need their own slice.

Cross-repo

None.

Lessons for agents

  • Dropping a required(...) group from a gitgalaxy/standards/cics/commands/*.py spec entry makes _rule(key, "required", X) raise KeyError in tests/tools/equivalence_cics.py (the oracle reads the same groups): grep _rule(key, "required" for the command before editing the spec.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 30, 2026 08:19
…hen it would acquire storage (X47, Part of #6876)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… by name on the stub (Part of #6876)

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 30, 2026 12:43
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 30, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 30, 2026 12:47
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@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