Skip to content

CICS: DOCUMENT CREATE / RETRIEVE in both runtimes and both translators (Part of #4769) - #4858

Merged
squid-protocol merged 3 commits into
mainfrom
feat/4769-cics-document-create-retrieve
Oct 10, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
feat/4769-cics-document-create-retrieve

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4769 (and #4270). Not "Fixes": the hand-traced cics-crucible case is still to do (see below).

What

EXEC CICS DOCUMENT CREATE / DOCUMENT RETRIEVE (the CICS document handler), the two commands that hold up zECS's ZECS000 / ZECS001 / ZECS003. This replaces agy's first attempt, whose translation called CicsTask methods that did not exist (and defaulted MAXLENGTH / DATAONLY, dropped LENGTH, ignored conditions); the older 3-commit branch had the same defect (no runtime), so only its ideas were kept (BINARY as a source, DOCTOKEN required, CREATE / RETRIEVE leave the name-only list).

  • Spec entries (standards/cics/commands/documents.py), register X33.
  • CicsTask (+ DetCics.documentBytes / putDocument) and the stub (GGCDOCC / GGCDOCR in ggcics.c), both translators (det Cics.document, harness translate_command), and the facts plumbing for the installed DOCTEMPLATEs (withDoctemplates, $GGCICS_DOCTEMPLATES, an equivalence case's doctemplates).
  • CREATE: empty / TEXT or BINARY + LENGTH (bytes unchanged) / TEMPLATE (the text the installed DOCTEMPLATE yields); DOCTOKEN written on NORMAL only; LENGERR RESP2 1 (negative LENGTH), NOTFND RESP2 3 (no such template).
  • RETRIEVE: at most MAXLENGTH bytes INTO, LENGTH = the document's length; truncation is LENGERR RESP2 2 with the length needed (IBM's sizing call with MAXLENGTH 0 works); NOTFND RESP2 1 (unknown token); LENGERR RESP2 1 (negative MAXLENGTH, LENGTH untouched).
  • Refused by name (with the cause): FROM / FROMDOC, SYMBOLLIST / LISTLENGTH / DELIMITER / UNESCAPED, DOCSIZE, HOSTCODEPAGE / CHARACTERSET / CLNTCODEPAGE, RETRIEVE without DATAONLY or MAXLENGTH, CREATE of TEXT / BINARY without LENGTH, literal areas; at run time a template holding symbols or template commands, a LENGTH past the area, a document longer than INTO. INSERT / SET / DELETE stay refused whole (no corpus program uses them).

Evidence

  • zECS det survey: the 10 DOCUMENT statements translate; no DOCUMENT hole remains (zECS 886/939 statements). The programs stay held by WEB.
  • Tests: test_det_translate.py (each source / option path, 24 refusals, a zECS-shaped program with no hole), test_equivalence_cics.py (stub translation, the doctemplates fact), test_cics_runtimes.py (the C stub and CicsTask answer alike: tokens, LENGERR 1 / 2, NOTFND 1 / 3, truncation length, refusals), test_cics_spec.py counts. 594 passed, 3 skipped (Docker / Maven only).
  • Gates (local, JDK 17): pr_gates.py --fast 5/5 (lint, audits, secrets, xray, gauntlet; the lint finding in the first run was fixed, ruff 0.16.0, baseline unchanged); --ratchets 7 pass, 0 fail, 0 skipped. No golden / crucible regen needed (no scanner change).

Not done

  • A hand-traced cics-crucible case: the case format cannot state template text yet (a crucible SPEC change, a separate PR there; no tag or pin bump). Until then X33 is "reached: no" and the runtimes are proven against each other, not against an oracle.
  • Det sweep / Docker equivalence: not run locally (CI); no ported program uses DOCUMENT yet.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 10, 2026 16:46
…s (Part of #4270, #4769)

Replaces the first attempt, whose translation called CicsTask methods that did not
exist. DOCUMENT CREATE (none, TEXT / BINARY with LENGTH, or TEMPLATE) and DOCUMENT
RETRIEVE (INTO, LENGTH, MAXLENGTH, DATAONLY) with IBM's conditions (LENGERR RESP2 1 / 2,
NOTFND RESP2 1 / 3) on CicsTask (+ DetCics) and the stub (GGCDOCC / GGCDOCR); the
installed DOCTEMPLATEs are a fact the run states (withDoctemplates, $GGCICS_DOCTEMPLATES).
What IBM leaves open is refused by name (register X33): FROM / FROMDOC, the symbol
table, DOCSIZE, code pages, RETRIEVE without DATAONLY / MAXLENGTH, CREATE of TEXT /
BINARY without LENGTH, templates with symbols or template commands. INSERT / SET /
DELETE stay refused whole (no corpus program uses them).

zECS: the ten DOCUMENT statements of ZECS000 / ZECS001 / ZECS003 translate; those
programs stay held by WEB.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging testing Unit, integration, and E2E pipeline verification shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 10, 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 10, 2026 21:59
@squid-protocol
squid-protocol enabled auto-merge (squash) October 10, 2026 21:59
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@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 #4858 @ bcf26a0: 2 failed check(s)

== full-suite (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38089677718/job/114325116964
repro: python -m pytest -q tests
errors:
##[error]Process completed with exit code 1.
log tail:
2026-10-10T22:10:41.9881723Z Current runner version: '2.337.0'
##[group]Runner Image Provisioner
Hosted Compute Agent
Version: 20261002.596
Commit: c3d12f3313a95f25162a1503be624f3b0617f8c0
Build Date: 2026-10-02T22:28:27Z
Worker ID: {6027e737-bd0e-421a-b377-6ed2c06db200}
Region: westus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261004.327.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261004.327/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261004.327
##[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"
echo "full-suite parts: $PARTS"
test "$PARTS" = "success"
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
##[endgroup]
full-suite parts: failure
##[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/38089677718/job/114323380647
repro: python -m pytest -q tests/cobol_mainframe/test_db2_image_pin.py::test_the_combined_register_page_is_current
failing tests: tests/cobol_mainframe/test_db2_image_pin.py::test_the_combined_register_page_is_current
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
E AssertionError: assert ['docs/langua...ot the page)'] == []
tests/cobol_mainframe/test_db2_image_pin.py:49: AssertionError
FAILED tests/cobol_mainframe/test_db2_image_pin.py::test_the_combined_register_page_is_current - AssertionError: assert ['docs/langua...ot the page)'] == []
##[error]Process completed with exit code 1.
log tail:
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: dbb-mortgage-application not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: cics-async-api-credit-card-application-example not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: zopeneditor-sample not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: cics-banking-sample-application-cbsa not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: aws-mainframe-modernization-carddemo not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: cics-genapp not fetched (mainframe_corpus.py fetch)
SKIPPED [1] tests/cobol_mainframe/test_refraction_snapshot.py:41: zecs not fetched (mainframe_corpus.py fetch)
SKIPPED [5] tests/cobol_mainframe/test_regional_options.py:226: no JDK 17
SKIPPED [1] tests/cobol_mainframe/test_regional_options.py:300: needs Docker (GnuCOBOL)
SKIPPED [1] tests/cobol_mainframe/test_rounding.py:112: needs Docker (GnuCOBOL)
SKIPPED [2] tests/cobol_mainframe/test_sql_unit_of_work.py:366: needs Docker (GnuCOBOL, Db2) and a JDK + Maven
SKIPPED [2] tests/cobol_mainframe/test_link_commarea_bytes_4806.py:115: needs Docker (GnuCOBOL) and a JDK + Maven
SKIPPED [2] tests/cobol_mainframe/test_trunc_opt.py:195: needs Docker and a JDK 17 (JAVA_HOME / JDK_17)
FAILED tests/cobol_mainframe/test_db2_image_pin.py::test_the_combined_register_page_is_current - AssertionError: assert ['docs/langua...ot the page)'] == []
Left contains one more item: 'docs/language_status/oracle_assumptions.md is stale: run python tests/tools/register.py render and commit it (edit the entry files under docs/language_status/register/, not the page)'
Full diff:
- []
+ [
+ 'docs/language_status/oracle_assumptions.md is stale: run python ' + 'tests/tools/register.py render and commit it (edit the entry files under '
+ 'docs/language_status/register/, not the page)',
+ ]
1 failed, 2663 passed, 588 skipped, 1 warning in 456.76s (0:07:36)
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/cd86b938-12c5-44a9-a040-19e08e52583e' 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 10, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 10, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (bb0e489) 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.

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 10, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 10, 2026 22:31
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 09e46e3 into main Oct 10, 2026
62 checks passed
@squid-protocol
squid-protocol deleted the feat/4769-cics-document-create-retrieve branch October 10, 2026 22:53
squid-protocol added a commit that referenced this pull request Oct 11, 2026
…st --timeout) (#4865)

Two quiet failures from 2026-10-10:

- #4858 sat green-but-unmerged: a push dropped shepherd:merge (an approval
  is bound to its head, by design) and, with no request label left, every
  status label was cleared too, so nothing marked the PR. The bot now sets
  shepherd:reapprove when it drops the label. It outlives the request labels
  (is:open label:shepherd:reapprove finds every PR that lost its approval)
  and clears when shepherd:merge or shepherd:hold comes back, or by hand.

- Every macOS matrix leg on main ran into the 45-minute job limit on a hung
  test (#4862) and read as "cancelled", naming nothing. full-suite-gate.yml
  and smoke-test.yml now run pytest with --timeout=600 (pytest-timeout
  2.4.0; slowest real test ~60 s), so a hang fails as a named test.
  main_watch.py reports each cancelled leg's run time ("after 45 min") and
  no longer calls a time-limit cancel "not a verdict on the code".

docs/ci.md: the new label, its lifecycle, the timeout; drops a duplicated
pair of paragraphs.

Part of #4840


Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant