Skip to content

det: CICS options, refusals and RESP read from standards/cics; 45 commands + API name-only entries (#4270, spec PR 2) - #4591

Merged
squid-protocol merged 2 commits into
mainfrom
feat/4270-cics-spec-pr2
Oct 7, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/4270-cics-spec-pr2

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4270 (spec PR 2 of docs/language_status/cics_command_spec.md, section 7). PR 1: #4589.

What changes

  • det/cics.py reads the spec. OPTIONS, DFHRESP, every refusal reason (the old _REFUSED_WHY / _ASSIGN_REFUSED_WHY / _SEND_TEXT_REFUSED_WHY), the option-group messages (Command.group(kind, option)), and the option tuples (MAP / TEXT / SEND CONTROL options, AID keys, FORMATTIME forms, ASSIGN's terminal options) all come from gitgalaxy/standards/cics. check_options is now SPEC[key].refusal_message(bad); the five special cases are per-command refused entries (RETURN / START / RUN CHANNEL and CANCEL are whole=True).
  • Full entries for the other 34 OPTIONS commands: files.py (READ / READNEXT / READPREV / STARTBR / ENDBR / WRITE / REWRITE / DELETE), terminal.py (SEND MAP, RECEIVE MAP, SEND CONTROL, RECEIVE), program.py (LINK, XCTL, RETURN, ABEND, HANDLE ABEND), handles.py (HANDLE / IGNORE CONDITION, HANDLE AID: open_options; PUSH / POP HANDLE), queues.py (WRITEQ TD, WRITEQ TS, READQ TS), task.py (ENQ, DEQ, DELAY, GET COUNTER, ASKTIME, FORMATTIME, INQUIRE PROGRAM, SYNCPOINT [ROLLBACK]). Each has options with argument kinds, refusals, groups, outcomes (NORMAL plus the conditions the runtimes raise; RESP2 where a runtime sets it, else None for PR 6 to state), engine facts that match the engine's verb tables (now checked for FILE / MAP / QUEUE too).
  • LOAD / RELEASE: status="engine-only", with a reason for the translator and EngineFacts(edge="load", target_option="PROGRAM") for PR 8b.
  • 206 name-only entries (api.py: name, IBM URL, reason). This is every other application command in IBM's CICS TS 6.x command summary, with no SPI. IBM lists 336 API topics, which are 259 command names once the device and role variants count as one name. 44 of those names have full entries (the 45th full entry, INQUIRE PROGRAM, is SPI), and 9 are forms the translator reads as a modelled command. The doc said "about 125"; that is corrected to 206. A sample of the URLs (GETMAIN, WEB SEND (Server), DEFINE COUNTER, ISSUE COPY, INQUIRE PROGRAM) was checked on ibm.com; the rest follow IBM's summary-<name> slug pattern.
  • Unknown verbs (decision 4): whole_refusal(key, verb, first_option) finds the entry, so the message is EXEC CICS GETMAIN not modelled (<reason>). The old container MOVE / browse and child-task reasons are kept word for word.
  • Disagreement 2 (owner decision): each command has its own refusal reasons and there is no global table. A file / queue / LINK command keeps SYSID's reason ("a remote system is not modelled"), and READ / READNEXT / READPREV / READQ TS / RECEIVE MAP / SEND MAP / SEND CONTROL keep SET's (the pointer reason). An option that only borrowed another command's reason now has none, e.g. GET CONTAINER WAIT: option not modelled. Check: on a 14,321-case grid (every modelled command × 306 option names, plus pairs), 1,473 messages differ before vs after. Each one contains one of the 16 old global-table options and only loses that borrowed reason. No message gains a new one.
  • Model: Command.why, Command.open_options, Command.whole_message, Command.group, EngineFacts.edge; Outcome.resp2=None is now documented as "not stated yet".
  • Tests: the equality tests marked "Deleted in PR 2" are gone (det DFHRESP / OPTIONS / accepts / refusal messages / cross-command leak / refusal tables / group messages). The harness / runtime / engine ones stay, now restricted to the slice 1-4 commands the harness copies. det/cics.py is in IMPORTERS. New spec tests cover the coverage counts, whole_refusal, group and per-command reasons.
  • Not touched: the harness (equivalence_cics.py), the runtimes and the engine (PRs 3-8).

Proof: det survey before / after

cics_census.py survey (translation only) over the 5 burned corpora, the 2 local non-burned ones and the 10 census clones. The "before" run was on a snapshot of origin/main, the "after" run on this branch:

  • 179 programs: statements, translated, hole count and kind identical for every one. blockers: identical output ("translated whole: 69 / 125 (non-burned 13 / 31)"), same gap classes and counts.
  • The only hole texts that changed (16, all in burned corpora): whole-verb refusals that now name their reason. They are EXEC CICS GETMAIN / FREEMAIN / DELETEQ TS / BIF DEEDIT / DOCUMENT CREATE / DOCUMENT RETRIEVE / WRITE OPERATOR / WEB CLOSE / CONVERSE / EXTRACT / OPEN / PARSE / READ / RECEIVE / SEND / WRITE not modelled + (<reason>). No option-level message changed in any corpus.

Gates

See the comment below for ratchets / pr_gates.

🤖 Generated with Claude Code

https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

…mands + API name-only entries (#4270, spec PR 2)

det/cics.py now imports OPTIONS, DFHRESP, every refusal reason, the option-group messages and its option tuples
(MAP / TEXT / SEND CONTROL options, AID keys, FORMATTIME forms) from gitgalaxy/standards/cics. check_options is one
line: Command.refusal_message.

Spec: full entries for the 34 other OPTIONS commands (files, terminal, program control, handle table, queues,
task / time / sync) and LOAD / RELEASE (engine-only, EngineFacts.edge="load" for PR 8b), plus 206 name-only
entries: every other CICS application command in IBM's CICS TS 6.x command summary (336 topics, 259 names), no SPI.
An unknown verb that is an API command now gets its entry's reason (decision 4).

Owner decision on disagreement 2: each command has its own refusal reasons, no global table. A file / queue /
LINK command keeps SYSID's reason and a read keeps SET's; other commands lose the reason another command's entry
lent them (e.g. GET CONTAINER WAIT). The det survey over the burned corpora and the census clones: translated /
statements identical for all 179 programs, blockers identical; the only hole texts that changed are 16 whole-verb
refusals gaining their reason.

The PR 2 equality tests are deleted; det/cics.py is a listed importer of the spec. The doc's "about 125" name-only
commands is corrected to 206.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging labels Oct 6, 2026
"QNAME": "transient-data trigger-level tasks are not modelled",
k: None if c.open_options else frozenset(c.options) for k, c in SPEC.items() if c.status == "modelled"
}
_FORMS = DATE_FORMS
@github-actions

github-actions Bot commented Oct 6, 2026

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

Local gates on the PR head:

  • pr_gates.py --ratchets: 6 pass, 0 fail, 0 skipped (ports, port-surface, estate, fact-crosscheck, completeness, ground-truth). These ran against a private cics-crucible clone at the pin, v0.5.0.
  • pr_gates.py: 7/7 pass (lint, audits, secrets, xray, gauntlet, golden, suite: 15k passed). The first run caught a dead-key-audit lead on SPEC['MOVE CONTAINER'] subscripts. Fixed in the second commit by importing named constants with the same text.
  • ruff 0.16.0 and mypy: clean on the changed files.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants