Skip to content

Split the CICS containers / channels family out of the four hot files (Part of #5274) - #5289

Merged
squid-protocol merged 4 commits into
mainfrom
churn/5274-20261016T1735Z
Oct 16, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
churn/5274-20261016T1735Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Part of #5274 (PR 1 of the family split): the CICS containers / channels family moves out of the four hot files, one module per runtime. Behaviour-preserving: contiguous verbatim moves, nothing reordered.

Class

CICS command-family code living in a shared hot runtime file. This PR covers the containers / channels family: PUT / GET / DELETE CONTAINER, MOVE CONTAINER, STARTBROWSE / GETNEXT / ENDBROWSE CONTAINER, DELETE / QUERY CHANNEL, the container CCSID conversion, channel scope, ASSIGN / LINK / XCTL CHANNEL, channel.cfg in / containers.out.

Runtime Host file Family module How it is wired
Java (CicsTask) cobol_to_java_transaction_forge.py cics_task_containers.py (CONTAINERS_JAVA) CICS_TASK_JAVA = head, then += CONTAINERS_JAVA, then += tail (same non-raw literal, so escapes keep their bytes)
C stub tests/equivalence/cics/ggcics.c ggcics_containers.c #include "ggcics_containers.c" where the block sat; both compile paths copy the whole stub dir
Harness stub translator tests/tools/equivalence_cics.py tests/tools/equivalence_cics_containers.py dispatch stays in _translate_command; family reaches ec._call / ec._resp / ec.SPEC... at call time
det translator det/cics.py det/cics_containers.py (ContainerCommands mixin, plus _datatype / _convertst, which only it used) class Cics(ContainerCommands); command and command_key stay the registry. Shared helpers are imported inside each method, as G_jstr already does, so no import cycle (CodeQL py/cyclic-import); members it uses from Cics are declared under TYPE_CHECKING for mypy

Registered: evidence HARNESS and the harness:cics component, trial HARNESS_PATHS, _TOOLS_WITHOUT_APPROVALS, det_sweep_plan.GENERATOR.

Needs the owner: cics-crucible.yml's pull_request path filter lists tests/tools/equivalence_cics.py but not the new tests/tools/equivalence_cics_containers.py, so a PR that changes only the harness family module does not trigger the CICS crucible. The other three family files are already covered by gitgalaxy/** and tests/equivalence/cics/**. Workflow edits are out of scope for this worker, so the one-line addition (- "tests/tools/equivalence_cics_containers.py") is left to the owner. oracle:cics-stub (tests/equivalence/cics/**) and generator (gitgalaxy/tools/cobol_to_java/**) already cover the other two files. X-Ray: cics_task_containers.py added to XRAY_BYPASS_PATHS. IBM's channel-name set (NAME_CHARS) is a dense Java literal that now falls in the first 8 KB X-Ray reads; the forge held it past that point.

Evidence

  • CICS_TASK_JAVA byte-identical to main (sha256 b01bad28...ddd1 before and after).
  • gcc -E -P ggcics.c byte-identical to main.
  • det_port.py check: 118/118 ports unchanged.
  • No golden, ledger or evidence-record change. Scheduled (non-blocking) harness / oracle / generator fingerprints go stale, as on any edit to these files.
  • Tests: new test_cics_family_split.py (splice / include / dispatch per runtime, every spec'd family command implemented in its family module); test_evidence_components (a family file stales the same inputs as its host for a target of each kind); stub-text readers (test_cics_spec_equality.GGCICS_C, the 64-bit stub test, the det "options are read" test) read the family files too. Container / channel / evidence / det / runtime suites green locally.
  • pr_gates --fast: 6/6 (after the X-Ray bypass, rerun after dropping the workflow edit). pr_gates --ratchets: 8 pass, 0 fail, 0 skipped.
  • E2E (Docker GnuCOBOL + JDK 17): det_port.py run asynccc-getname cbsa-crdtagy1: 6/6 and 44/44 translated, both PROVED (PUT / GET CONTAINER on both runtimes through the moved code).

Remaining families (later PRs, one each)

file control (next), program control (LINK / XCTL / RETURN), interval / START / RUN / FETCH / RETRIEVE, TS / TD queues, counters, terminal / BMS / SEND TEXT, WEB / TCPIP, ENQ / DEQ / SYNCPOINT, storage / pointers, ASSIGN / HANDLE.

Lessons for agents

  • X-Ray (binary_anomaly_detector) reads only the first 8 KB of a file: code moved into a new small module can trip the entropy check on a literal that was safely deep in its old host file.
  • ruff S608 fires on name + """...""" when the literal has SQL words (the CicsTask Java): splice with += statements instead.
  • A pgrep -f wait loop on another command's arguments matches its own shell: wait on the task's own completion.

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 16, 2026 17:31
…iles (Part of #5274)

The forge's CicsTask (cics_task_containers.CONTAINERS_JAVA), the stub
(ggcics_containers.c, included by ggcics.c), the harness's stub translator
(equivalence_cics_containers.py) and the det translator (ContainerCommands in
det/cics_containers.py) each get the family as a verbatim, contiguous move.
CICS_TASK_JAVA and gcc -E -P of ggcics.c are byte-identical to main.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…mponent test checks one target per kind

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…me set now in its first 8 KB)

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 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 16, 2026 21:44
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (f5b99d7) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 16, 2026 21:47
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

from gitgalaxy.standards.cics.resp import DFHRESP
from gitgalaxy.tools.cobol_to_java.det import expr as E
from gitgalaxy.tools.cobol_to_java.det import layout as L
from gitgalaxy.tools.cobol_to_java.det.cics_containers import ContainerCommands # #5274
"""#4270 (X17): PUT's FROMCCSID or GET's INTOCCSID as a Java int expression (a data value; the runtime refuses one outside
37 / 500 / 1140 / 1208), None when not given. The port's storage is read as the region's page (#4528), which the
conversion assumes is CCSID 037: another declared page refuses the option."""
from gitgalaxy.tools.cobol_to_java.det.cics import CicsError, _arg, region_page
channels. DELETE: the channel and its containers go. QUERY: CONTAINERCNT, a fullword, is set to the number of
containers on NORMAL (not on a condition: IBM does not say). CHANNELERR RESP2 2 comes back through RESP / HANDLE
CONDITION (AEZV by default); what IBM leaves open is refused at run time (register X44)."""
from gitgalaxy.tools.cobol_to_java.det.cics import _arg
container's 16-character name into CONTAINER (not on END / TOKENERR). ENDBROWSE: the token. CHANNELERR,
CONTAINERERR, INVREQ, END, ILLOGIC and TOKENERR come back with their RESP2 through RESP / HANDLE CONDITION;
what IBM leaves open is refused or assumed at run time (register X42)."""
from gitgalaxy.tools.cobol_to_java.det.cics import _arg

import cobol_coverage as cov # #4023
import equivalence_common as common
import equivalence_cics_containers as cics_containers # #5274: the channels / containers family

import re

import equivalence_cics as ec
@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.

2 participants