Skip to content

Architecture: Create "CICS-crucible" (The Ultimate Transactional Evil Benchmark) #3989

Description

@squid-protocol

The Concept

Mainframe developers over the last 40 years have done unspeakable things to CICS (Customer Information Control System) and BMS (Basic Mapping Support). To ensure our cobol_to_java Spring Boot generator is bulletproof, we need an adversarial CICS-crucible repository filled with the most horrific transaction state and UI edge cases imaginable.

The "Evil" Benchmark Suite

This repository will stress-test the CICS-to-Spring conversion pipeline with:

  1. The Spaghetti Condition Trap: Bizarre EXEC CICS HANDLE CONDITION and HANDLE ABEND jumps that completely break structured Java try/catch flow control.
  2. The Hex Attribute Trap: BMS screen logic that bypasses standard UI attributes and manually injects raw Hex codes into the UI buffer (e.g., MOVE X'3C' TO MAP-ATTR) to make fields blink, turn invisible, or unlock dynamically.
  3. The COMMAREA Mismatch Trap: EXEC CICS XCTL and LINK commands where Program A passes a 100-byte COMMAREA, but Program B expects a 500-byte COMMAREA, forcing the Java generator to handle memory padding and truncation safely.
  4. The Ghost Task Trap: Asynchronous EXEC CICS START TRANSID() TIME() commands spawning background daemons that require robust Java message-queue / async task scheduling translation.
  5. The Pseudo-Conversational Nightmare: Deeply nested EXEC CICS RETURN TRANSID() COMMAREA() logic that bounces state between screens endlessly.

The Goal

If the Java code generated from the CICS-crucible successfully compiles and runs with 100% equivalence in a Spring Boot / REST API context, the engine is officially ready for the most complex Fortune 500 banking migrations.

Activity

  1. added
    testingUnit, integration, and E2E pipeline verification
    legacy-modernizationCOBOL refractor, dead-code extraction, and JCL forging
    on Sep 28, 2026
  2. squid-protocol commented on Sep 29, 2026

    @squid-protocol
    OwnerAuthor

    Plan (2026-09-29)

    Decisions:

    Phase 1: cics-crucible repo

    • Case format (spec).

    • Apache-2.0; original programs only, nothing copied.

    • At least 2 cases per trap:

      1. HANDLE CONDITION / HANDLE ABEND jumps (including IGNORE CONDITION, PUSH/POP HANDLE, RESP overriding HANDLE)
      2. Raw hex attribute bytes in BMS maps (MOVE X'..' TO xxxA, DFHBMSCA vs literals, the 3270 attribute bits)
      3. COMMAREA length mismatch on XCTL / LINK (EIBCALEN, short and long commareas, LENGTH vs FLENGTH)
      4. START TRANSID ... INTERVAL/TIME with FROM data and RETRIEVE
      5. Pseudo-conversational RETURN TRANSID COMMAREA chains across screens

      Each case has programs, copybooks, BMS, a CSD, scenarios, expected events and doc citations.

    Phase 2: gitgalaxy runner

    • cics_crucible tool: scan, refract, generate Java, compile, then run the equivalence harness per case against the expected events.
    • Baseline ratchet ledger (like the Unicode gauntlet), pin (CICS_CRUCIBLE_REF + a PINNED_TAG constant), CI job, docs/ecosystem.md entry.

    Phase 3: close the gaps

    • Each failing cell becomes an issue: engine facts, forge output, or harness/stub semantics. The harness does not yet model LINK, START/RETRIEVE, EIBCALEN padding/truncation or attribute bytes.
    • Fix until the baseline is empty.

    🤖 Generated with Claude Code

  3. added 3 commits that reference this issue on Sep 29, 2026
  4. squid-protocol commented on Sep 29, 2026

    @squid-protocol
    OwnerAuthor

    Phase 1 and 2 done; phase 3 filed

    • Phase 1: the crucible is released as cics-crucible v0.1.0: 10 cases, 37 scenarios, 5 traps.
      • An independent review of the oracle found 0 wrong expected logs. Its 2 doubts were fixed in the SPEC and CSDs without changing any log.
    • Phase 2: the runner, baseline ratchet and CI job merged in #3989 phase 2: CICS crucible runner, baseline ratchet and CI #4000. The baseline is 94 cells: 20 pass, 12 fail, 62 unsupported.
      • engine-facts: 10 of 10 pass
      • forge-compile: 10 of 10 pass
      • cobol-stub: 0 of 37 pass, all 37 unsupported
      • java: 0 of 37 pass, 12 fail and 25 unsupported

    Phase 3 lane A:

    Phase 3 lane B:

    The Java cells can pass only once the generated runTask bodies are ported. That is porting work (#3753), beyond these harness issues. The issues above make every cell measurable, and they make the COBOL-on-stub side match the oracle.

    🤖 Generated with Claude Code

  5. added 8 commits that reference this issue on Sep 29, 2026
  6. 22 remaining items

  7. added 8 commits that reference this issue on Sep 29, 2026
  8. squid-protocol commented on Sep 29, 2026

    @squid-protocol
    OwnerAuthor

    Phase 3 harness work complete (main a9a1a25c)

    All 11 phase-3 issues are closed. PRs: #4012, #4013, #4014, #4015, #4016, #4017, #4018, #4019, #4020, #4021, #4022.

    side pass fail unsupported
    engine-facts 10 / 10 0 0
    forge-compile 10 / 10 0 0
    cobol-stub 37 / 37 0 0
    java 0 / 37 37 0

    Summary:

    • The COBOL side now matches every expected log in the crucible. The stub CICS models all of these:
      • terminal RECEIVE and TS queues
      • HANDLE/IGNORE CONDITION, RESP/NOHANDLE, HANDLE ABEND with the upward exit search, and PUSH/POP
      • LINK levels with a by-reference COMMAREA
      • START/RETRIEVE/CANCEL on a virtual clock (SPEC §4)
      • XCTL RESP/LENGTH, HANDLE AID, and BMS output/input fidelity
    • No expected log was changed and no oracle error was found. The CardDemo account-view equivalence still passes.
    • The crucible found no engine defects. Engine facts and forge compile were 10/10 from the first run.
    • Two harness bugs that could affect the existing equivalence cases were found and fixed (Equivalence harness: layout_fields drops a nested COPY silently and shifts later fields #4010, Equivalence harness: dto_shape finds a class by simple name and picks the wrong one #4011).
    • The Java side is now fully measurable (0 unsupported). All 37 cells fail because the generated runTask bodies are skeletons.

    Remaining for this epic's goal ("compiles and runs with 100% equivalence"): port the runTask bodies through the porting loop (#3753). The crucible is now the test bed for that.

    Deferred and refused by name in the harness: READQ/WRITEQ TS SET/SYSID; START AFTER/AT/RTRANSID/QUEUE; RETRIEVE SET/WAIT; HANDLE ABEND PROGRAM; LINK SYSID/CHANNEL; RECEIVE NOTRUNCATE/SET. Crucible known gaps (FLENGTH, file control, validator cross-checks) are listed in its README.

    🤖 Generated with Claude Code

  9. added 3 commits that reference this issue on Sep 29, 2026
  10. squid-protocol commented on Oct 3, 2026

    @squid-protocol
    OwnerAuthor

    All three phases are complete: cics-crucible v0.2.0 is pinned (#4032), every scenario passes on the COBOL stub (44/44) and on the ported Java (44/44), with 0 unsupported cells and full paragraph and branch coverage of all 17 programs. The 44 remaining baseline cells are the generated skeletons with empty task bodies, which can't pass by design. Mutation testing continues in #4024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    legacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingtestingUnit, integration, and E2E pipeline verification

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions