Skip to content

CICS ENQ fault injection (ENQBUSY) and task-private ENQ/DEQ in a RUN child (Part of #5089) - #5187

Merged
squid-protocol merged 5 commits into
mainfrom
churn/5089-20261015T1117Z
Oct 15, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/5089-20261015T1117Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5089.

What changed

  • ENQ fault injection (register X60). A scenario plans {"cmd": "ENQ", "resource": "<RESOURCE operand as written>", "resp": "ENQBUSY"}. The stub (GGCENQ), CicsTask.enq and the det translator answer alike: RESP 55, RESP2 0, event ENQ resource=.. resp=... IBM's ENQ page lists ENQBUSY with no RESP2, so 0 is ASSUMED and a plan naming one is refused. IBM raises ENQBUSY only with NOSUSPEND (or an active HANDLE CONDITION ENQBUSY): a planned-busy ENQ without NOSUSPEND is refused at run time by both runtimes. Any other condition planned for ENQ (INVREQ 2 / LENGERR 1 are the program's own operands) and ENQBUSY on any other command are refused by name. An ENQ that does not fault records no event, as before.
  • Proof: new enq-busy scenario on zecs-zecs000 (1200-ENQ ... NOSUSPEND -> ENQBUSY -> 8000-RESTART): det_port.py run zecs-zecs000 PROVED with the COBOL stub and the java facade agreeing on the fired fault and on every event.
  • ENQ / DEQ in a RUN child: allowed only on a data area (no LENGTH) that the child's own WORKING-STORAGE declares: IBM serialises an address-form ENQ on the area's address, and every task has its own WORKING-STORAGE, so no other task can contend and there is no order to model. LENGTH form, LINKAGE items, undeclared names, counters and SQL stay refused.

Class table (#5089's four same-mechanism gaps from the #5147 review)

Member Status here
ENQ fault injection handled (above)
ENQ / DEQ in a RUN child handled for the task-private form; the rest refused by name
Counters in a RUN child NOT done: a counter is region state; unshared-ness is a runtime property (the child can be RUN twice, the parent can use the name)
Variable-length KSDS (per-record lengths) NOT done: see Sibling gaps
USERID / SCRNHT / SCRNWD case facts left to #5126 as instructed

Evidence

  • pytest tests/cics_crucible/test_enq_fault_5089.py (30: harness rules, a stub run and a CicsTask run over one ENQ sequence, the child rule), plus test_equivalence_cics / _faults / test_cics_spec* / test_cics_runtimes / test_det_translate: 889 passed, 5 skipped.
  • det_port.py check: every port's CicsTask.java moved (shared runtime); services moved only for the ENQ users. Re-proved those: cbsa-creacc, cbsa-bnk1cac, genapp-lgicvs01, genapp-lgtestc1, zecs-zecs000 PROVED; cbsa-crecust and cbsa-bnk1ccs DIFFERS, both already in det_sweep_baseline.json (det: CBSA CRECUST equivalence case (Db2 seed + running children) #4952 / equivalence: cases for the 16 CICS programs that have none (6 estates) #5076, unchanged).
  • Gates: pr_gates --fast 6/6, --ratchets 8 pass 0 fail 0 skipped. Golden masters untouched (no parser change).

Sibling gaps

  • Per-record lengths in a variable-length KSDS: the stub indexes every file by at * reclen, and the det port's DetCics.Store maps entity <-> one fixed byte[], so a record's own length has no home in the facade. Needs an entity-layer design, not a harness tweak. Today's "variable": true stand-in (one record length) stays.
  • Counters in a RUN child (above).
  • ENQ LENGTH outside 1..255 (LENGERR RESP2 1) and a bad MAXLIFETIME CVDA (INVREQ RESP2 2) are IBM-stated but neither runtime checks them (a program passing one gets NORMAL).
  • A HANDLE CONDITION ENQBUSY without NOSUSPEND (IBM raises it): refused, not modelled.

Lessons for agents

  • CicsTask.java is not a file: it is the string CICS_TASK_JAVA in cobol_to_java_transaction_forge.py; det_port.py check reports "CHANGED CicsTask.java" for every port whenever it changes, so re-prove only the ports whose *Service.java moved.
  • Adding a stub event kind needs a branch in equivalence_cics.cobol_events too, or the COBOL side silently drops it and the case DIFFERS with "COBOL START, Java ENQ".

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 15, 2026 07:23
…X60 (Part of #5089)

A scenario can plan ENQBUSY for an ENQ by its RESOURCE operand; the stub (GGCENQ),
CicsTask.enq and the det translator answer alike. IBM states no RESP2 for ENQBUSY, so
it is 0 (ASSUMED); a planned-busy ENQ without NOSUSPEND is refused by both runtimes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t of #5089)

An address-form ENQ / DEQ (no LENGTH) on a data area the child's own WORKING-STORAGE
declares is held by that task alone, so no order against a parent or sibling exists.
Every other region resource in a child (LENGTH form, LINKAGE item, counters, SQL) stays refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ntimes (Part of #5089)

The COBOL side now reads the stub's ENQ event and compares its resource and RESP with CicsTask's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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 11:58
@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 12:02
@github-actions

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

PR #5187 @ 459ade7: 1 failed check(s)

== full-suite part 2/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38731225340/job/116410548772
repro: python -m pytest -q tests/cobol_mainframe/test_strengthen_loop.py::test_the_strengthen_loop_plans_a_fault_for_every_fault_command[ENQ]
failing tests: tests/cobol_mainframe/test_strengthen_loop.py::test_the_strengthen_loop_plans_a_fault_for_every_fault_command[ENQ]
errors:
fail-on-cache-miss: false
tests/cobol_mainframe/test_strengthen_loop.py:134: AssertionError
FAILED tests/cobol_mainframe/test_strengthen_loop.py::test_the_strengthen_loop_plans_a_fault_for_every_fault_command[ENQ] - assert "scenario x: fault {'cmd': 'ENQ', 'resp': 'NOTAUTH', 'resp2': 101, 'file': 'TARGET1'}: ENQ is planned with EN
##[error]Process completed with exit code 1.
log tail:
SKIPPED [1] tests/cobol_mainframe/test_regional_options.py:300: needs Docker (GnuCOBOL)
SKIPPED [1] tests/cobol_mainframe/test_rounding.py:112: needs Docker (GnuCOBOL)
SKIPPED [2] tests/cobol_mainframe/test_trunc_opt.py:196: needs Docker and a JDK 17 (JAVA_HOME / JDK_17)
SKIPPED [2] tests/cobol_mainframe/test_sql_unit_of_work.py:366: needs Docker (GnuCOBOL, Db2) and a JDK + Maven
SKIPPED [1] tests/core_engine/test_language_strictness.py:122: keyword-rosetta corpus not checked out as a sibling (set KEYWORD_ROSETTA_PATH)
SKIPPED [1] tests/core_engine/test_aperture_workflow_blob.py:166: evidence-refresh.yml not found
SKIPPED [1] tests/core_engine/test_bms_symbolic.py:108: the pinned CardDemo corpus is not cloned
SKIPPED [1] tests/cultural_gauntlet/test_cultural_gauntlet.py:478: collation_h2: its database is not on this machine
SKIPPED [1] tests/cultural_gauntlet/test_cultural_gauntlet.py:478: collation_postgresql_en_us: its database is not on this machine
SKIPPED [1] tests/estate_crucible/test_estate_crucible_scorer.py:193: no estate-crucible checkout at /home/runner/work/gitgalaxy/estate-crucible (set ESTATE_CRUCIBLE_PATH)
SKIPPED [1] tests/extraction/languages/test_dart.py:405: got empty parameter set for (payload)
SKIPPED [1] tests/extraction/languages/test_dart.py:441: got empty parameter set for (payload)
XFAIL tests/core_engine/test_aperture.py::test_aperture_embedded_hex_shield - Engine currently allows hex arrays if has_intent=True. Pending engine patch.
XFAIL tests/extraction/languages/test_dart.py::test_dart_class_start_xfail_invalid[var query = '''\nclass FakeClass {\n''';] - String/comment lookalikes lack AST block shielding
XFAIL tests/extraction/languages/test_dart.py::test_dart_func_start_xfail_invalid[/* \n void main() { \n /] - String/comment lookalikes lack AST block shielding
XFAIL tests/extraction/languages/test_dart.py::test_dart_dependency_capture_xfail_invalid[// import 'package:test/test.dart';] - String/comment lookalikes lack AST block shielding
XFAIL tests/extraction/languages/test_dart.py::test_dart_dependency_capture_xfail_invalid[/
\n import 'package:foo/foo.dart'; \n */] - String/comment lookalikes lack AST block shielding
FAILED tests/cobol_mainframe/test_strengthen_loop.py::test_the_strengthen_loop_plans_a_fault_for_every_fault_command[ENQ] - assert "scenario x: fault {'cmd': 'ENQ', 'resp': 'NOTAUTH', 'resp2': 101, 'file': 'TARGET1'}: ENQ is planned with EN
+ where "scenario x: fault {'cmd': 'ENQ', 'resp': 'NOTAUTH', 'resp2': 101, 'file': 'TARGET1'}: ENQ is planned with ENQBUSY only (IBM lists no other condition a region raises for it), and ENQBUSY is no other command's (register X60, refuse
+ where <function validate at 0x7f24580eb4c0> = st.validate
+ and set() = set()
+ and set() = set()
1 failed, 7669 passed, 367 skipped, 5 xfailed, 16 warnings, 9 subtests passed in 261.92s (0:04:21)
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/ff15d9a4-51cf-4729-9e11-57db33c930ae' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Oct 15, 2026
…ge ledger gains the enq-busy scenario (Part of #5089)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol removed 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

CI shepherd: the head of this PR (78f6221) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 12:37
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit d38dc2b into main Oct 15, 2026
68 of 69 checks passed
@squid-protocol
squid-protocol deleted the churn/5089-20261015T1117Z branch October 15, 2026 13:02
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.

1 participant