Skip to content

design: one declarative CICS command spec for engine, translator, runtimes and harness (#4270) - #4586

Merged
squid-protocol merged 2 commits into
mainfrom
docs/4270-cics-command-spec
Oct 6, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
docs/4270-cics-command-spec

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4270. This is a design proposal only, in a docs-only PR. It changes no code.

docs/language_status/cics_command_spec.md proposes one declarative CICS command spec. For each command it would hold:

  • options, with argument kinds and directions
  • required / exclusive groups
  • conditions with RESP / RESP2
  • named state touched
  • facts the runner must state
  • refusals with their reasons
  • the X-register entry and the IBM topic

Today a slice writes these facts again in five to seven places.

Evidence (origin/main b6c3e4ea8):

  • One command, GET CONTAINER, has 8 facts written in 18 places.
  • DFHRESP is copied 5 times: 104, 104, 43, 19 and 14 entries.
  • The condition-to-abend table is copied 3 times, plus an oracle copy with 8 entries where the others have 10.
  • The stub translator refuses options with no reasons.
  • ASSIGN's RESP2 5 is computed in the translator, not in CicsTask.
  • The engine has no LOAD / RELEASE, so PL/I CICS estates get no load edges.

Proposal:

  • Format: Python frozen dataclasses under gitgalaxy/standards/cics/. This keeps the engine at 0 dependencies, keeps IBM comments next to the values, and is checked when built.
  • Generated or table-driven: the engine, the translator, the stub translator and the runner are table-driven. Both runtimes get generated switches and constants: DetCics / respName / abcodeFor and a ggcics_spec.h.
  • Hand-written: the semantics stay hand-written in each runtime, so the two remain independent witnesses. State machines get named state, with no DSL.
  • X-register: checked against the spec, not generated from it.
  • Crucible independence: it is enforced by tests. The spec cannot be imported by log scripts, and the oracle keeps its own tables. Differences are reported to a person and never synced.

Migration: 8 small PRs with identical verdicts until the engine LOAD step.

  • PR 1 adds the spec and drift tests showing it equals every existing copy.
  • PR 2 makes the translator read it.

Effort is about 11 agent-days, about 3.5 of them for PRs 1-2. Open questions for the owner are in section 9.

Checks: docs only. The file is not in the mkdocs nav, like the other docs/language_status pages, so no nav or build change is needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

…times and harness (#4270)

Docs only: a proposal for a single declarative EXEC CICS command spec
(gitgalaxy/standards/cics, Python data) read by the engine's fact
extraction, the det translator, both runtimes (generated tables),
the stub translator, the crucible runner and an X-register check,
with the crucible's hand-traced logs kept independent of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@squid-protocol squid-protocol added documentation Updates to standard operating procedures, guides, or wiki enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging labels Oct 6, 2026
Section 9 becomes the decisions: standards/cics imported directly by
every consumer (CODEOWNERS to the translator side), committed generated
Java/C tables with regen + ratchet drift test, stub refusals carry the
translator's reasons, 45 full entries + ~125 name-only API refusals,
new engine edge kinds batched after the blind 4th-estate trial,
conformance gate and report-only oracle cross-check in CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@squid-protocol

Copy link
Copy Markdown
Owner Author

Owner decisions (2026-10-06), now in the design doc (section 9, commit 0373da9):

  1. Location: gitgalaxy/standards/cics/. It is a neutral, data-only package that the engine owns and ships, and every consumer imports it directly. There are no separate engine tables and no drift test between copies. A CODEOWNERS entry routes the folder's review to the translator side. Later siblings follow the same pattern: standards/sql/, intrinsic functions, file status.
  2. Generated runtime tables are committed. That covers CicsSpec.java (RESP / abend switches and refusal constants) and ggcics_spec.h. cics_spec regen rewrites them, and a ratchet-style drift test fails when one is stale.
  3. Stub refusal text matches the translator's. Unsupported carries the same reason as CicsError. Messages change, verdicts don't, and the message snapshots are rebaselined once.
  4. Coverage. The 43 modelled commands plus LOAD / RELEASE get full entries (45 in all). The other CICS API commands, about 125, get name-only refusal entries (name, IBM URL, reason). SPI commands are left out. A name-only entry becomes a full one only when the cics_census.py blockers ranking (tooling: cics_census blockers -- rank gaps by programs made whole (#4270) #4587) calls for that command.
  5. New engine edge kinds wait. LOAD, START TRANSID, MQ queues and dynamic CALL come as one engine batch (PR 8b) after the blind 4th-estate trial. PR 8a (the same rows read from the spec, ledger identical) may land before it. The hosts field stays.
  6. The conformance check gates. After the report-only week, an undeclared (RESP, RESP2) fails a crucible cell.
  7. The spec-vs-oracle cross-check runs in CI, report-only. The missing AEZJ / AEZV in ABEND_FOR stay the crucible's own decision.

Plan changes:

  • PR 1 adds the CODEOWNERS entry and regen. Its equality tests are now transitional: each is deleted when its copy switches to importing the spec.
  • PR 2 adds the name-only entries.
  • PR 4 commits the generated files and adds their drift test.
  • PR 8 splits into 8a and 8b.
  • Effort is now about 12.5 agent-days, about 4.5 of them for PRs 1-2.

🤖 Generated with Claude Code

@squid-protocol
squid-protocol marked this pull request as ready for review October 6, 2026 22:19
@squid-protocol
squid-protocol merged commit d7ad333 into main Oct 6, 2026
1 check passed
@squid-protocol
squid-protocol deleted the docs/4270-cics-command-spec branch October 6, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to standard operating procedures, guides, or wiki 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.

1 participant