Repository navigation
CICS online programs in the equivalence harness; CardDemo account view proven 9/9 (#3754) - #3801
Merged
Merged
Conversation
…-derived file table, acctview case Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
…ON mapping, event diff, tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
…events (#3754) COBOL side (tests/tools/equivalence_cics.py, tests/equivalence/cics/): - a per-command EXEC CICS translator: READ, RECEIVE MAP, SEND MAP / TEXT, RETURN, XCTL, ABEND, HANDLE ABEND become CALLs into a C stub runtime (ggcics.c); DFHRESP(x) becomes its number; RESP / RESP2 / NOHANDLE honoured, an untested condition abends as CICS does; an unmodelled command is refused by name; - EIB / AID / BMS-constant stand-in copybooks (documented layouts and values); - the stub's file table from the engine's facts: CSD FILE -> DSNAME -> IDCAMS KEYS, a PATH through its AIX (CardDemo's CXACAIX: KEYS(11 25) over the xref cluster); - each scenario (COMMAREA, key pressed, screen input) runs as one task; its events (SEND MAP, SEND TEXT, RETURN, XCTL, ABEND) are recorded with their bytes. Java side: - generator: CicsTask (package cics) and runTask(CicsTask) on each CICS program's service with a transaction -- the port's target, like runBatch; a porting rule mapping EXEC CICS onto the task, and one that a partial port is not proven; - harness: a generated JUnit runs every scenario as a CicsTask; COMMAREAs map to COBOL names through the generated DTOs' own comments, screens by BMS field. Case tests/equivalence/carddemo-acctview (CardDemo COACTVWC, CAVW), 5 scenarios: the generated Java 0/9 events; the case's hand port 9/9 -- 236 fields compared, 92 non-blank. Gemini 3.1 Pro did not produce a port on this 268 KB ticket (two empty answers, one sketch the harness proved 1/10). run_java split into prepare_project / run_maven; layout_fields takes a named REDEFINES root. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
…L cyclic import, #3801) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
…CodeQL cyclic import, #3801) equivalence_cics imported the batch harness, which dispatches CICS cases to it -- a cycle whether the import was module-level or lazy. The paths, the GnuCOBOL image, the corpus-input helpers, decode_field and layout_fields move to equivalence_common, which imports no harness module; equivalence.py re-exports them unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
squid-protocol
added a commit
that referenced
this pull request
Sep 26, 2026
…CodeQL cyclic import, #3808) equivalence_inputs builds on equivalence_common instead of importing the batch harness that calls it. The module is byte-identical to #3801's, so the two merge cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
…L unused import) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
squid-protocol
added a commit
that referenced
this pull request
Sep 26, 2026
) * Equivalence harness: inputs generated from record layouts (#3804) A dataset's input may be "@generate": records built from its copybook layout (tests/tools/equivalence_inputs.py) -- per PICTURE, edge values first (zero, one, the maximum and its negative, the smallest fraction), then spread; text at full width, short and blank; YYYY-MM-DD for date-shaped fields; FILLER blank. Primary keys are unique and never blank, an indexed dataset is in key order; "from" draws a field from another generated file (with "miss" for the not-found path), "values" with "every" fills a cartesian product; seeded, byte-identical per seed. A case may prove another case's port ("port_from"). carddemo-intcalc-generated: the CBACT04C port -- written against CardDemo's data -- on generated accounts, cross-references, category balances and disclosure groups (one group without rates: the DEFAULT fallback ran 11 times): ACCTFILE 30/30, TRANSACT 37/37, RETURN-CODE 0 = 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g * Equivalence: shared primitives in a leaf module, equivalence_common (CodeQL cyclic import, #3808) equivalence_inputs builds on equivalence_common instead of importing the batch harness that calls it. The module is byte-identical to #3801's, so the two merge cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g * Equivalence: re-export only the primitives equivalence.py uses (CodeQL unused import) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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 #3754. Part of epic #3755.
What it does
The equivalence harness now proves CICS online programs, not only batch. A scenario is:
Each scenario runs as one task on both sides, and the tasks' outputs are compared field by field.
COBOL side: a per-command translator plus a stub CICS runtime
tests/tools/equivalence_cics.py). EachEXEC CICSblock becomes aCALLintotests/equivalence/cics/ggcics.c:READ,RECEIVE MAP,SEND MAP/SEND TEXT,RETURN,XCTL,ABENDandHANDLE ABENDso far.DFHRESP(x)becomes its number, andRESP/RESP2/NOHANDLEare honoured. A condition the program neither tests nor ignores abends the task, as CICS does.RETURN,XCTLandABENDend the task.DFHAIDandDFHBMSCA. They follow the documented layouts and values; no IBM text is copied.DEFINE FILEto its DSNAME, then to the IDCAMSDEFINEthat keys it, following a PATH through its AIX. CardDemo'sCXACAIXresolves toKEYS(11 25)over the card-xref cluster.layout_fieldsnow accepts a named root thatREDEFINES).Java side
CicsTaskclass (packagecics) holds a task's inputs and records, in order,sendMap,sendText,returnTransid,xctlandabend.runTask(CicsTask), the port's target, likerunBatch.CicsTaskthroughrunTask.XCTLpasses onlyCARDDEMO-COMMAREA).screenValues(), keyed by BMS field.run_javais split intoprepare_projectandrun_maven, shared by both paths.Measured: CardDemo account view (COACTVWC, transaction CAVW)
+ 2,020.00), the SSN, names, dates and messages, and the COMMAREA's ids and card number.tests/equivalence/carddemo-acctview/port/) is a hand translation. It keeps two of CardDemo's own defects, each commented with its one-line fix:Not modelled yet (refused by name when met)
STARTBR/READNEXT),WRITE/REWRITE/DELETE, TS/TD queues,LINK, channels andSYNCPOINT.RESP2values are the stub's (0), not CICS's.Tests
test_equivalence_cics.py: the translator per command; a whole program translated; an unknown command refused with its line; the stub's file table from a real scan (CSD + IDCAMS, a PATH through its AIX); field round trips; map input; DTO shape; the event diff. Plus a gated end-to-end run (EQUIVALENCE_E2E=1), which passes locally.test_cics_endpoints.py:runTask/CicsTaskgeneration.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g