Repository navigation
standards/cics: the CICS command spec, with equality tests against every copy (#4270, spec PR 1) - #4589
Merged
Conversation
…ery copy (#4270, spec PR 1) gitgalaxy/standards/cics/: stdlib-only frozen dataclasses (model.py), DFHRESP and the default abend codes (resp.py), full entries for the slice 1-4 commands (PUT / GET / DELETE CONTAINER, START, RETRIEVE, CANCEL, RUN, ASSIGN, SEND TEXT) with today's refusal texts word for word, and the cics_spec CLI (emit / check / regen, python -m gitgalaxy.standards.cics). Lazily importable; nothing reads it yet. Transitional equality tests (tests/cobol_mainframe/test_cics_spec_equality.py) prove the spec equals det/cics.py, equivalence_cics.py, the Java switches (CICS_TASK_JAVA, DetCics.java), ggcics.c, cics_crucible.py and the engine verb tables; each names the spec PR that deletes it. Where copies disagree the difference is listed with its reason and asserted exactly. crucible_case.py check-hand-derived names the spec in its denied set ahead of the allow-list; tests prove crucible_events.py and the crucible's Python never import it. The design doc drops the CODEOWNERS entry (owner decision). Part of #4270. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
Contributor
…ible scan reads strict UTF-8 (#3813) Part of #4270. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4270 (spec PR 1 of
docs/language_status/cics_command_spec.md, section 7).What
gitgalaxy/standards/cics/: stdlib-only frozen dataclasses (model.py:Arg,Refusal,RuntimeRefusal,Outcome,Group,Fact,EngineFacts,Impl,Command, aSTATESvocabulary), each checked in__post_init__;resp.py(DFHRESP, 104 names + the DSIDERR alias; the 10 default abend codes with verified IBM topics);commands/with full entries for the 9 slice 1-4 commands: PUT / GET / DELETE CONTAINER, START, RETRIEVE, CANCEL, RUN, ASSIGN, SEND TEXT (options with kinds/widths, 64 refused options with today's reasons word for word, option groups with today's messages, 32 outcomes with RESP2, runtime refusals, ASSIGN's 4 stated facts, engine facts, impl pointers, register, event name). IBM URLs checked by page title.python -m gitgalaxy.standards.cics emit [--json] | check | regen --out DIR(regen rendersCicsSpec.java/ggcics_spec.h; both compile with javac 17 / gcc. PR 4 commits them and adds the drift test; PR 1 commits no generated file).import gitgalaxy.standards.cicsloads only its__init__; entries load on first use; tests prove stdlib-only imports and that nothing ingitgalaxy/imports the spec yet (anIMPORTERSset each later PR extends). No behaviour change.tests/cobol_mainframe/test_cics_spec_equality.py, each docstring naming the PR that deletes it: det/cics.py (DFHRESP, OPTIONS, the three*_REFUSED_WHYtables,TEXT_OPTIONS,check_optionsmessages for every refused option, all together and an unknown one, group messages); equivalence_cics.py (DFHRESP, CICS_RESP,_CONTAINER_OPTIONS, RUN / ASSIGN allow-lists and widths, interval and SEND TEXT deny-lists,Unsupportedfeatures per refused option, group messages); the Java switches (DetCics.condition/resp,CicsTask.respName/abcodeFor); ggcics.c (every condition enum,condition_abcode);cics_crucible.CONDITION_ABCODE,REGION_USERID/REGION_SCREEN; runtime refusal texts in each runtime; stated facts (withX,$GGCICS_X); engine verb tables (_CONTAINER_VERBS,_TASK_VERBS,_CHANNEL_VERBS).crucible_case.py check-hand-derivednamesgitgalaxy.standards.cicsin its denied set, checked beforeALLOWED_EXTRA(a test widens the allow-list togitgalaxyand the spec is still refused, incl.from gitgalaxy.standards import cics); tests thatcrucible_events.pyimports only the stdlib and that no Python file in the cics-crucible checkout imports the spec.Disagreements found between copies (recorded, not silently resolved)
Each is an expected-difference table in the equality test, asserted exactly (it can neither grow nor be fixed unnoticed):
VOLIDERR 71,RESIDERR 75,NOSPOOL 80, which det/cics.py has. The spec keeps them (no case names them). PR 3._REFUSED_WHYis keyed by option alone, so e.g.GET CONTAINER WAITis refused with RETRIEVE's WAIT reason andRUN SYSIDwith START's. Per command: PUT 13, GET 10, DELETE CONTAINER 16, START 10, RETRIEVE 14, RUN 16 leaked options. The spec gives these no reason. PR 2 must choose: keep a global fallback or rebaseline (no corpus program hits one).... without a namevs the translator's genericEXEC CICS option needs an argument), PUT two data types, START two expiry options / HOURS without AFTER (bare feature, no reason),CANCEL without REQID(no: only CANCEL REQID is modelled). PR 3.(IBM lists no code for one)vs C: IBM lists no code for it; unstated facts: JavaASSIGN STARTCODE: how the task was started is not stated (withStartcode)vs CASSIGN %s: not stated for this task; GET CONTAINER FLENGTH below zero: C refuses it explicitly, Java via DetCics.containerLimit's text. The spec keeps both texts for now (RuntimeRefusal.java/.c). PR 5.condition24 arms /resp19,respName19, ggcics 19 condition enums spread over 3enums): every arm equals the spec. The abend table is the same 10 entries in all 3 implementation copies. (crucible_events.ABEND_FORis the oracle's own 8-entry table, not compared here: section 6, PR 6's report-only cross-check.)Also noticed, not tested (semantics, not tables): SEND TEXT's stub passes only ERASE / FREEKB / ALARM / WAIT / LAST in GG-FLAGS, while the Java side records every
TEXT_OPTIONSflag (CURSOR, PRINT, INVITE ...) in the event.Checks
tests/core_engine/test_cics_spec.py(22),tests/cobol_mainframe/test_cics_spec_equality.py(72), guard tests intests/tools/test_crucible_case.py(+7; the crucible scan runs with a checkout, else skips). All pass (translatorextra present; no det skip).pr_gates.py --ratchets: 6 pass, 0 fail, 0 skipped (with a private cics-crucible clone at the pin v0.5.0; the sharedcics-crucible-pincheckout is at v0.3.0, which also makestest_events_table_matches_the_crucible_schemafail locally on main).pr_gates.py: 7/7 pass (lint, audits, secrets, xray, gauntlet, golden, suite) after fixing two findings of the first run (a dead-key lead in the CLI's emit summary; a lossyerrors=read in the new crucible guard test).No golden-master, ledger or baseline change: nothing reads the spec.
🤖 Generated with Claude Code
https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6