Repository navigation
fix(cobol): CICS queues, containers, abends and condition suppression (#2484, #2485) - #2807
Merged
Merged
Conversation
…#2484, #2485) COBOL's CICS surface was almost entirely unmeasured. Of the ten CICS constructs the two issues name, nine recorded no correct signal: the whole TSQ/TDQ queue lifecycle, channels and containers, task abends, and condition suppression. Only `WRITEQ TD` (telemetry) worked. Five rules change, each verified against language-crucible v1.2.0 (331 .cbl/.cpy files, 8 real CICS repos): * `io` -- the queue lifecycle. `EXEC CICS READQ TS` could never reach the existing `(?:READ|WRITE|REWRITE|DELETE)` arm: engine rule 9's `\b` needs a word/non-word transition and `READ` is followed by `Q`. Added as its own alternative with the mandatory TS/TD qualifier rather than `READ(?:Q)?`, which would have matched a bare `EXEC CICS READQ` -- not a valid command. +32 occurrences across 7 files. * `panics_and_aborts` -- `EXEC CICS ABEND`, the CICS sibling of `STOP RUN`. +91 across 47 files. Deliberately NOT added to `high_risk_execution`: rule 3 keeps that key for things that execute, and an abend runs nothing. * `safety_bypasses` -- `EXEC CICS IGNORE CONDITION`. +2 in 1 file. The issue proposed `panics_and_aborts`; that is the opposite reading (an abend raises, IGNORE CONDITION suppresses), so it is routed here. * `ipc_rpc_bridges` -- channels/containers, the modern replacement for the COMMAREA on LINK/XCTL. +18 across 8 files. * `state_mutation` -- `PUT CONTAINER` only. +9 across 7 files. `GET CONTAINER` is excluded: reading a container mutates nothing. `telemetry` is deliberately left at TD-only, against #2485's proposed regex. A transient-data queue is the CICS journalling destination; a temporary-storage queue is a scratchpad, and a `READQ TS` is not an emission. All six queue verbs count as `io` instead; `WRITEQ TD` counts as both, the same dual as sqlite's `.read`. Golden master: 144 differences, every one attributed -- 133 in cobol files, 11 cobol-scoped aggregates, zero non-cobol movement. Signal-field diffs match the predicted file counts exactly (aborts 47, ipc 8, io 7, flux 7, bypasses 1); the remainder is downstream risk exposure plus the 22 topological coordinates the corpus-wide re-solve always produces. EDUCHAN.cbl's `state_flux` 19 -> 26 was isolated by reverting that one rule and re-scanning: it reads exactly the baseline 19, so all +7 comes from the 3 new matches amplified by the existing mitigation pass. keyword-rosetta is unaffected (44/46 pass; apex and groovy `args` fail identically on unmodified origin/main and are unrelated to this change). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
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.
Closes #2484. Closes #2485. Addresses #2486 (see "The jcl half" below — it comes back "no change", with evidence).
COBOL's CICS surface was almost entirely unmeasured. Of the ten constructs the two issues name, nine recorded no correct signal; only
WRITEQ TD(telemetry) worked. Everything else firedreflection_metaprogramming's deliberate bareEXEC CICScatch-all and nothing specific.Measured against language-crucible v1.2.0 — 331
.cbl/.cpyfiles across 8 real CICS repos (AWS carddemo, CICS genapp, CBSA banking, NIST CCVS85, Che4z fixtures).What changes
ioEXEC CICS (READQ|WRITEQ|DELETEQ) (TS|TD)panics_and_abortsEXEC CICS ABENDipc_rpc_bridgesEXEC CICS (PUT|GET|MOVE) CONTAINERstate_mutationEXEC CICS PUT CONTAINERsafety_bypassesEXEC CICS IGNORE CONDITIONThe
Qis why the queue lifecycle read zeroio's CICS arm wasEXEC\s+CICS\s+(?:READ|WRITE|REWRITE|DELETE)closed by\b. Engine rule 9:\basserts a word/non-word transition, and inREADQthe character afterREADisQ— a word character — so the boundary never fires and the alternative fails outright. The whole TSQ/TDQ lifecycle (30 real occurrences) recorded no io.Added as its own alternative carrying the mandatory
TS/TDqualifier rather than relaxing the existing one toREAD(?:Q)?, which would have matched a bareEXEC CICS READQ— not a valid CICS command.test_cobol_cics_queue_verbs_need_their_own_alternative_2485guards both halves.Three deliberate departures from the issues' proposed regexes
1.
telemetrystays TD-only. #2485 proposes(?:WRITEQ|READQ|DELETEQ)\s+(?:TD|TS)for telemetry. A transient-data queue is the CICS journalling destination (CESE/CESO/CSMT) — aWRITEQ TDreally is telemetry. A temporary-storage queue is a scratchpad for passing data between transactions, and aREADQ TSis a read, not an emission. Putting all six verbs intelemetrywould mis-describe the code. All six go toioinstead;WRITEQ TDcounts as both, the same intentional dual as sqlite's.read(import + io).2.
EXEC CICS ABENDgoes topanics_and_aborts, nothigh_risk_execution. Engine rule 3 keeps that key for constructs that execute, and an abend runs nothing.STOP RUNsits in both today, so the precedent for widening exists — but doing it here would movehigh_risk_executionby 91 hits across 47 files as a side effect of a queue/container PR. That deserves its own justification.test_cobol_cics_abend_is_an_abort_not_an_execution_2485pins the current split so a later change has to be deliberate.3.
IGNORE CONDITIONgoes tosafety_bypasses, notpanics_and_aborts. #2485 groups it with the abend. They are opposites: an abend raises,IGNORE CONDITIONsuppresses — it switches off the handler for a condition for the rest of the task, which is whatsafety_bypassesmeans.GET CONTAINERis excluded fromstate_mutationfor the same kind of reason: reading a container mutates nothing. It is a bridge, never a mutation, and the asymmetry is asserted in the double-classification sweep.Golden master
144 differences, every one attributed: 133 in cobol files, 11 cobol-scoped aggregates, and zero movement in any other language. The per-signal file counts match the pre-change prediction exactly (aborts 47, ipc 8, io 7, flux 7, bypasses 1); the remainder is downstream risk exposure plus the 22 topological coordinates the corpus-wide re-solve always produces.
One diff needed isolating:
EDUCHAN.cbl'sstate_fluxmoved 19 → 26 where the raw regex predicts +3. Reverting only thestate_mutationrule and re-scanning gives exactly the baseline 19, so all +7 is the 3 new matches amplified by the existing mitigation pass, not a second effect.Verification
tests/extraction— 6,742 passedtest_cobol_strict.py— 95 passed, including 7 new parametrized cases and 2 new regression testsaudit_check.py— ruff / mypy / dead-key / ast-accuracy all clearcrucible_check.py— both fixtures PASS after the blessrosetta_audit.py— corpus-inert, 44/46. apex and groovyargsfail identically on unmodifiedorigin/main(verified by stashing this branch and re-running) and are unrelated; flagged separately.The jcl half (#2486)
Worked and comes back "no change" on all three parts — full evidence posted as a comment on that issue. In short: (1)
PGM=DFHCSDUPis excluded byhigh_risk_execution's own documented criterion, which explicitly leaves out "destructive-capable utilities that execute a fixed command language" (IDCAMS/IEHPROGM/ADRDSSU) — #2751 set that three weeks ago; (2)DFHCSD/DFHRPLDDs are already covered generically, all 12 recordioand_dependency_capturealready resolves the ones with real dataset names; (3) the crucible contains no EXCI at all, so that rule has nothing to verify against and would flip a keyword-rosetta cell from n/a to a scored 0 at the same time. The real need there is a new domain sensor, not a regex widening.🤖 Generated with Claude Code