Skip to content

CICS POST / WAIT EVENT / terminal CONVERSE modelled (X63); SEND PAGE / PURGE MESSAGE stay refused (Part of #5079) - #5216

Merged
squid-protocol merged 3 commits into
mainfrom
churn/5079-20261015T2145Z
Oct 15, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/5079-20261015T2145Z

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Part of #5079

What

#5185 refused the last members of #5079's old-style set by name (SEND PAGE, PURGE MESSAGE, terminal CONVERSE, POST, WAIT EVENT). IBM's pages define POST, WAIT EVENT and CONVERSE (default) fully enough to model them, so this PR does, on both runtimes (det port CicsTask / stub ggcics.c) and in the equivalence harness; SEND PAGE and PURGE MESSAGE stay refused by name. Register entry X63 (new; X59 trimmed to point at it) quotes each IBM page.

  • POST INTERVAL | TIME | AFTER / AT HOURS MINUTES SECONDS [SET(ptr)] [REQID]: a 4-byte timer-event control area, "initialized to binary zeros", posted (first byte X'40', third X'80') at expiry. INVREQ RESP2 4 / 5 / 6, EXPIRED. The area is a block of task storage on the pointer lane (X47 / X58), so SET ADDRESS OF rec TO ptr shares its bytes.
  • WAIT EVENT ECADDR(ptr) [NAME]: the area is posted at its expiry (a task takes no time, X4: the wait dispatches RUN children and runs the stated clock to the expiry); INVREQ RESP2 2 for a null pointer. CANCEL REQID finds a POST's REQID (NORMAL while unexpired, NOTFND once the wait expired it).
  • CONVERSE FROM [FROMLENGTH] INTO [TOLENGTH] [MAXLENGTH] [NOTRUNCATE] (terminal form): the FROM data recorded as a plain SEND records it, then the terminal RECEIVE of the reply (LENGERR cut, TOLENGTH the original length, NOTRUNCATE keeps the rest).
  • Bug found by the class sweep (harness): cobol_events had no CANCEL branch, so any harness proof of a program with CANCEL compared Java's CANCEL event against nothing and mismatched. Added it.
  • POST AFTER ... read AFTER as a second verb word; added to _SECOND_OPTIONS.

Class table (old-style CICS commands that were refused whole)

Member Status
ADDRESS EIB, COMMAREA modelled earlier (X59, #5185)
ADDRESS CWA, TWA, TCTUA, ACEE, ADDRESS SET refused by name (X59)
READQ TD / DELETEQ TD (intrapartition) modelled (X57, #5167)
UNLOCK (with / without TOKEN) modelled (X52, #5090 / #5095), re-verified
POST, WAIT EVENT modelled here (X63)
CONVERSE (terminal) modelled here (X63); SET, APPC / conversation options, LUTYPE2 refused by name
WAIT EXTERNAL, WAITCICS refused by name (X63: program-owned ECBs are not modelled)
SEND PAGE, PURGE MESSAGE refused by name (X59): need the BMS ACCUM / PAGING logical message SEND MAP / SEND TEXT refuse (X20)
READ / RECEIVE / RETRIEVE SET #5042, not touched

Assumed (X63; IBM leaves open) / refused

Assumed: a POSTed area is posted only by WAIT EVENT or a CANCEL (a task takes no time, and SUSPEND, the polling IBM suggests, is refused); WAIT EVENT on an already posted area returns at once; a POST with no REQID runs under POST0001, POST0002 ... in EIBREQID; an EXPIRED POST leaves SET's pointer as it was; a negative FROMLENGTH is LENGERR with nothing sent. Refused at run time: WAIT EVENT on an address that is no POST's area, or on one a later POST / CANCEL / local START / DELAY ended (IBM: "unpredictable"); CONVERSE on an LUTYPE2 terminal (EOC is not among CONVERSE's conditions).

Evidence level (policy 1)

  • Translated: whole for programs using only these commands (the three commands no longer make a hole).
  • Executed-equivalent: 1 synthetic hand-traced case (test_post_wait_converse_e2e_5079.py, GnuCOBOL + stub vs det port under CicsTask, EQUIVALENCE_E2E=1), 2 scenarios (reply fits / reply cut), 14 events each, 0 diffs, PROVED; paragraphs 2/2, branches 4/4 (reported "not proven" by the harness: coverage is not the corpus's).
  • Both runtimes also answer one 23-scenario table alike and match its IBM-traced lines (test_post_wait_converse_5079.py: every expiry form and range, EXPIRED, generated REQID, WAIT on a posted / unposted / null / foreign / ended area, CANCEL of a POST, CONVERSE that fits / is cut / keeps the rest / has a negative or zero length, LUTYPE2 refusal), 83 tests.
  • Assumptions relied on: the X63 list above. Residual risk: no corpus program uses these commands (0 of the 18 corpora); the oracle is GnuCOBOL plus our stub, not z/OS; cics-crucible cases are still to be added (below).

Gates

pr_gates --fast 6/6; --ratchets 8/8, none skipped (cics-spec, ports, port-surface, estate, fact-crosscheck, completeness, ground-truth, time). det_port.py check: 98 of 112 ports differ only by the 126 added lines of CicsTask.java (no generated service code moved), 14 unchanged; re-proved carddemo-acctview and zecs-ecs001 PROVED. Golden masters not touched (no scan output moves). cics-spec counts: 98 modelled, 155 name-only.

Cross-repo

No companion PR is needed to merge. cics-crucible cases to queue (separate items): POST AFTER + WAIT EVENT + CANCEL NOTFND; a second POST ends the first area (refused); CONVERSE with a reply that fits and one that is cut (LENGERR, TOLENGTH the original length); WAIT EVENT on a null pointer (INVREQ RESP2 2); POST TIME already past (EXPIRED).
Overlap: open PRs #5204 / #5211 / #5213 also touch det/cics.py, ggcics.c and equivalence_cics.py (this PR adds new functions beside the existing ones, and one 4-line edit to test_det_translate.py, which #5204 / #5213 also touch).

Lessons for agents

  • A new stub event needs a branch in equivalence_cics.cobol_events: an event the stub logs but that function does not read shows up as a Java-only event in the proof ("event 3: ('SEND-TEXT', 'CANCEL')"), not as a stub bug.
  • A COBOL test program with an EXEC CICS command longer than column 72 fails in the layout reader ("source text past column 72 truncates ..."), not in the translator: wrap the command (textwrap.wrap) when a test builds programs from command strings.

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 15, 2026 17:58
…times, register X63 (Part of #5079)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, CONVERSE FROM / INTO required by name (Part of #5079)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(lint) (Part of #5079)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 15, 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 15, 2026 22:17
@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 22:21
if kind == "post":
_, label, how, n, h, m, s, reqid = op
j = lambda v: "null" if v is NG else str(v) # noqa: E731
r = f'{{"{reqid}"}}' if False else (f'"{reqid}"' if reqid else "null")
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit d26b86e into main Oct 15, 2026
88 checks passed
@squid-protocol
squid-protocol deleted the churn/5079-20261015T2145Z branch October 15, 2026 22:39
squid-protocol added a commit that referenced this pull request Oct 16, 2026
…dling and #5216 POST/WAIT/CONVERSE/CANCEL)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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