Skip to content

WEB SEND/RECEIVE identity code-page pair and literal HTTPHEADER/MEDIATYPE operands: GTHECHO, GTWRECV stub-whole (Part of #6876) - #7502

Merged
squid-shepherd[bot] merged 4 commits into
mainfrom
churn/6876-20261102T0207Z
Nov 2, 2026
Merged

squid-shepherd[bot] merged 4 commits into
mainfrom
churn/6876-20261102T0207Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Part of #6876 (slice: GTHECHO, GTWRECV, GTWSEND whole translation; WEB SEND/RECEIVE CHARACTERSET/HOSTCODEPAGE and the "not a data area" literal, #4767).

File-cap exception: docs/language_status/cics_crucible.md is the report cics_crucible.py --update-baseline generates (never hand-edited, with baseline.json and coverage.json); the hand-written files are five.

What changed

  • WEB SEND / WEB RECEIVE accept CHARACTERSET('iso-8859-1') with HOSTCODEPAGE('037'), both literals, and nothing else. Any other value, a data-area operand, one option alone, and CLNTCODEPAGE stay refused by name on both translators (code_page_pair_refusal in det/cics_web.py; the stub imports it from there because the spec-importer allowlist is closed). The refusal text still says "code-page conversion".
  • A literal HTTPHEADER name, a literal WEB WRITE HTTPHEADER value, a literal WEB SEND MEDIATYPE and a literal WEB READ HTTPHEADER VALUELENGTH (input only, so no write-back) are lowered on det and stub. A literal WEB READ HTTPHEADER VALUE is refused ("written to").
  • Runner: the http peer body is compared with trailing blanks ignored (SPEC 6.1, "trailing blanks are optional"); GTWRECV sends a 107-byte line and the case states it trimmed. Embedded and leading blanks still differ (tested).
  • Spec: WEB SEND / WEB RECEIVE list CHARACTERSET / HOSTCODEPAGE as name options; READ HTTPHEADER VALUELENGTH is inout_unless_literal.

Evidence (stub leg of the three cases; oracle is GnuCOBOL plus our stub, not z/OS)

  • gt-http-inbound (GTHECHO): cobol-stub pass.
  • gt-web-server-receive (GTWRECV): cobol-stub pass, 4 of 4 scenarios.
  • gt-web-server-send (GTWSEND): cobol-stub fails on request 2 (status 201, application/json): the stub runtime refuses "SRVCONVERT on a media type that is not text/*" (ggcics_web.c:480, cics_task_web.py:270). Not whole yet.
  • Java legs (java / java-facade / java-ported) are unchanged: no committed det port of the three programs exists yet.
  • 1702 tests pass across tests/cics_crucible, test_det_translate, test_equivalence_cics_spec, test_cics_spec, test_source_reads; audit_check.py clear.

Assumption and open ruling

The owner ruling on code-page handling is still open (it only received an auto-hold). This PR takes the narrow route: the identity pair is ASSUMED to convert nothing the model can see (the model keeps the exchange in the program's characters; SRVCONVERT was already a no-op). Residual risk: IBM does not state the EBCDIC/ASCII byte mapping for non-ASCII bytes, so a non-ASCII payload is unproven. The register text (X37/X38) is not written here (file cap): see Remaining slices.

Class / Sibling gaps

Class: WEB-family options and operands the model refuses although they carry no model-visible effect or only need a literal lowered. Fixed here: the SEND/RECEIVE code-page pair; literal HTTPHEADER name/value, MEDIATYPE, READ VALUELENGTH.
Sibling gaps (not here): CLNTCODEPAGE; non-identity pairs; the _CODEPAGE options on WEB READ FORMFIELD / QUERYPARM / STARTBROWSE; DOCUMENT RETRIEVE/CREATE HOSTCODEPAGE (X33, documents.py:56); other stub literal sites in equivalence_cics_web.py (FORMFIELD, QUERYPARM, DOCTOKEN, STARTBROWSE names, FROM / STATUSTEXT literals); NOTRUNCATE / TOCONTAINER / CHUNKING; SRVCONVERT on a non-text media type when the pair is stated.

Remaining slices

  • (done, merge of main + this round) GTWSEND: SRVCONVERT on application/json accepted unconditionally in ggcics_web.c and cics_task_web.py (provisional, recorded in register X37 with its residual risk); the cobol-stub leg passes. Not gated on the stated pair.
  • Committed det ports of the three programs (PROGRAMS in tests/tools/cics_crucible_det.py, overlays under tests/cics_crucible/det-ports/), flipping the java-facade / java-ported rows.

Checklist: partial [c:6103c400] -- GTHECHO, GTWRECV and GTWSEND pass the cobol-stub leg; the committed det ports (java-facade / java-ported rows) remain

Cross-repo: none. Overlaps open PR #7498 on docs/language_status/cics_crucible.md and tests/cics_crucible/baseline.json (regenerated, small); #7498 likely merges first, so this PR regenerates on top of it.

Lessons for agents

  • test_options_honoured_without_code_say_why requires every spec option's name to appear quoted in det code: a check that reads a whole opts dict does not count, so pass the named entries (_pair(opts)).
  • tests/core_engine/test_cics_spec.py lists the only importers of the CICS spec: a helper shared by det and stub goes in a det module the stub imports, not behind an extra spec import.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits November 1, 2026 21:23
…, MEDIATYPE and VALUELENGTH lowered; http peer body ignores trailing blanks (Part of #6876)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…RECV stub pass; GTWSEND fails on non-text SRVCONVERT) (Part of #6876)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol

Copy link
Copy Markdown
Owner Author

Waiting on an owner decision (asked privately, 2026-11-02). Nothing is needed from contributors; work resumes once it is answered.

squid-protocol and others added 2 commits November 2, 2026 06:22
…END passes on the cobol-stub (Part of #6876)

The crucible's GTWSEND expects NORMAL for SRVCONVERT on application/json. Under the identity code-page assumption (owner ruling, pending z/OS data #4702) SRVCONVERT converts nothing, so the one non-text type the case uses is accepted in the stub and CicsTask; every other non-text/* type stays refused. Baseline, coverage and report regenerated.

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 Nov 2, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 2, 2026 12:42
@github-actions

github-actions Bot commented Nov 2, 2026

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 2, 2026 12:51
@squid-shepherd
squid-shepherd Bot merged commit 7797b10 into main Nov 2, 2026
124 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6876-20261102T0207Z branch November 2, 2026 13:29
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