Skip to content

CICS: RETURN CHANNEL in the det port (Part of #5005) - #5732

Merged
squid-protocol merged 3 commits into
mainfrom
churn/5005-20261020T1116Z
Oct 20, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/5005-20261020T1116Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #5005. Cross-repo: none. Overlaps open PR #5727 (SET TDQUEUE TRIGGERLEVEL: det/cics.py, equivalence_cics.py); this PR touches only a 9-line RETURN branch and a 2-line stub refusal there, so it can merge either side first. origin/main is merged in.

What changed

EXEC CICS RETURN TRANSID(..) CHANNEL(..) was refused whole ("next task's channel not modelled"). IBM: CHANNEL is "made available to the next program" (created empty if absent); COMMAREA is its alternative; below the highest logical level the command fails INVREQ RESP2 2 and returns to the program.

  • standards/cics/commands/program.py: RETURN accepts CHANNEL (name, 16); at_most_one(CHANNEL, COMMAREA, LENGTH, IMMEDIATE) (IBM silent on IMMEDIATE: refused by name); INVREQ 2 also raised by CHANNEL. Generated spec files are up to date.
  • det/cics.py: emits task.returnChannel(transid, channel); TRANSID is required.
  • cics_task_containers.py: CicsTask.returnChannel (event with the channel and its container names, root returnedChannel, INVREQ/2 below level 1) and returnedChannel().
  • tests/tools/equivalence_cics.py: the stub translator refuses RETURN CHANNEL as stub-only (no stub process outlives its task), so no silent drop.
  • Register X17 (new paragraph + summary), X27 (stale sentence).
  • Tests: translator (test_det_translate.py), runtime (test_cics_runtimes.py::test_cics_task_return_channel); the old "RETURN CHANNEL refused" parameter removed.

Class sweep

Class: a channel/container command the det port refuses by name although IBM documents it.

Member Status
LINK / XCTL CHANNEL, PUT/GET/DELETE/MOVE CONTAINER, browse, DELETE/QUERY CHANNEL, BYTEOFFSET/PREPEND (BIT) already modelled
RETURN CHANNEL this PR (det port)
START ... CHANNEL modelled (stub, ggcics.c)
INQUIRE CONTAINER refused by name (IBM: BTS form only), X42/X44
CHAR BYTEOFFSET / PREPEND, CCSIDs beyond 37/500/1140/1208 refused (IBM silent / not modelled)

Remaining slices (not in this PR)

  1. tests/tools/cics_crucible.py: Java harness pendingChannel carry (set from the RETURN event's channel, handed to the next task via withChannel). Needed by pc-return-channel carry / modify / link-level2.
  2. Stub carry: tests/equivalence/cics/ggcics.c + ggcics_containers.c (the channel must outlive the task process) + the stub driver in cics_crucible.py + equivalence_cics.py (drop the stub-only refusal, GGCRETN with a channel).
  3. Re-baseline the pc-return-channel cells in tests/cics_crucible/baseline.json and docs/language_status/cics_crucible.md (regenerated) once 1-2 land.

Plan changed: the plan assumed one slice would flip the crucible cells. The cross-task carry needs both harnesses plus the stub runtime, well past the 5 hand-written files, so the det-port slice ships alone. The pc-return-channel cells are unchanged by this PR (re-run: cobol-stub unsupported ×3, java fail ×3 on the pre-existing skeleton-service reason). Hand-written files: 8 (4 code + 2 register + 2 test), over the cap of 5; each is small and none could be dropped without leaving a stale register line, a silent stub drop or an untested runtime method.

Sibling gaps

  • The crucible-pinned scenarios pc-return-channel/{carry,modify,link-level2} need the harness carry (core: scenario-level proof); no burned-estate program uses RETURN CHANNEL, so by the register no real-program gap (frontier).
  • RETURN CHANNEL with IMMEDIATE, or without TRANSID: IBM does not say (frontier).

Gates

  • pr_gates --fast: 6/6 pass. ruff format, ruff_audit --ci, dead_key_audit --ci: clean. cics regen --check: up to date.
  • pytest: test_det_translate, test_equivalence_cics, tests/cics_crucible, test_cics_spec_status: 1461 passed, 7 skipped (before the runtime test added; it passes alone).
  • det_port.py check: 22/143 ports unchanged; the rest differ only in CicsTask.java (+23 lines, additive: new field and two methods). Re-proved carddemo-menu and cbsa-delcus: PROVED. The other 119 listed ports were not re-proved.
  • pr_gates --ratchets: 8/8 pass (cics-spec, ports, port-surface, estate, fact-crosscheck, completeness, ground-truth, time).
  • Not run: local mypy (not installed; pr_gates used the cached mypy 2.4.0 and passed audits), golden-master bless (no parsing code touched).

Lessons for agents

  • _stub_only("X") in equivalence_cics.py is the pattern for an option the det port honours and the stub cannot; the baseline reason stays "translator: X".
  • A spec at_most_one group is found by its FIRST option (Command.group): fold related exclusions into one group, not several starting with the same option.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 20, 2026 07:28
The spec accepts CHANNEL on RETURN (alone: COMMAREA / LENGTH / IMMEDIATE refused by name); the translator emits
CicsTask.returnChannel, which ends the task with the channel recorded (INVREQ RESP2 2 below the highest level). The
stub translator refuses it as a stub-only feature; neither crucible harness carries the channel to the next task yet.

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 20, 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 20, 2026 11:47
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 11:48
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5732 @ 8b902f3: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39417515526/job/118630606181
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
Hosted Compute Agent
Version: 20261015.610
Commit: 267fdb4e8bbec4ab5ea31367f3a00d5c480c7656
Build Date: 2026-10-14T17:06:54Z
Worker ID: {734ae6a3-4a4b-49bb-8173-fe4237ec7db7}
Region: eastus2
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261018.339.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261018.339/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261018.339
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: full-suite
##[group]Run echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
echo "full-suite parts: $PARTS (tested-tree skip: $SKIP)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && test "$SKIP" = "true"; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
##[endgroup]
full-suite parts: failure (tested-tree skip: )
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== full-suite part 1/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39417515526/job/118616131722
repro: python -m pytest -q tests
errors:
fail-on-cache-miss: false
[--ai-guardrails] [--fail-on-secrets]
[--fail-on-malware]
--fail-on-secrets CI/CD Gate: Fail build if hardcoded secrets are
--fail-on-malware CI/CD Gate: Fail build if ML threat inference flags
CI/CD Gate: Fail build if any file exceeds this risk
CI/CD Gate: fail the build if any file's structural
FAIL tests/cics_crucible/test_cics_runtimes.py::test_cics_task_interval_control_follows_start_retrieve_and_cancel: 15.9s is over 15s and has no @pytest.mark.slow(reason=...) and no entry in tests/test_time_baseline.json
##[error]Process completed with exit code 1.
log tail:
env:
PYTHONUTF8: 1
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 187302
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 90645cc32dd4400bcf30e98888ffd644801e5086e937bcfc12aa2da0368d2587
Finalizing artifact upload
Artifact test-times-part-1 successfully finalized. Artifact ID 12263474882
Artifact test-times-part-1 has been successfully uploaded! Final size is 187302 bytes. Artifact ID is 12263474882
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39417515526/artifacts/12263474882
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/f380a90c-6f8f-4507-8432-3b6b02546b43' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 20, 2026
@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 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 1d2b543 into main Oct 20, 2026
67 checks passed
@squid-protocol
squid-protocol deleted the churn/5005-20261020T1116Z branch October 20, 2026 13:54
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