Repository navigation
train: #4464 opaque DFHCOMMAREA + #3804 generated inputs - #4524
Merged
Merged
Conversation
… inputs - carddemo-posttran-generated: CBTRN02C on generated accounts, cross-references, category balances and daily transactions (all four reject reasons, the posting paths). - carddemo-acctview-generated: COACTVWC on generated files and 24 generated COMMAREA / map-input scenarios, typed account ids that are on file, not on file, or not numbers. - mortgage-mlist-generated: EPSMLIST on generated inputs alone (the estate ships no data). - equivalence_inputs.prepare_cics_case: `@generate` CICS files (key and length from the program's file) and `scenario_generate`; a `digits` rule for numeric text; dotted dataset names as join sources. - det_sweep_baseline: the two CICS cases join the #4465 facade entries. - Found: the acct-view port throws on non-digit card numbers where COBOL's MOVE does not (#4491). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
) COSGN00C's LINKAGE DFHCOMMAREA is an opaque ODO byte area, and the engine pairs no COMMAREA with it (every XCTL into it is data-driven; its RETURN TRANSID(CC00) to itself is unresolved because the CSD also pairs CC00 with COCRDLIC via a DEFINE PROGRAM ... TRANSID). Its facade took none, so the equivalence harness's java-facade side refused 11 of 12 scenarios. The CICS forge now gives a program with an opaque DFHCOMMAREA the record that its RETURN TRANSID to its own transactions (and any resolved flow into it) passes, as the estate's single DTO for that record (name, file, width, field count). It refuses by name in the commarea gap when the flows disagree, a data-driven site names another record, or no single DTO carries it. A RETURN TRANSID to the sender's own transaction counts as a self-RETURN in the #4427 conversation typing. carddemo-signon resurfaced (port_surface.py equivalence) and re-proven: runTask 12/12, java-facade 12/12; stale mark cleared, dropped from facade_baseline.json. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop carddemo-signon from det_sweep_baseline and facade_baseline; re-prove its evidence record. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
| import cobol_coverage as cov # #4023 | ||
| import equivalence_common as common | ||
| import equivalence_db2 | ||
| import equivalence_inputs # #3804 |
| gen = case.get("scenario_generate") | ||
| if not gen: | ||
| return case | ||
| import equivalence_cics as cx |
Contributor
squid-protocol
marked this pull request as ready for review
October 6, 2026 00:29
This was referenced Oct 6, 2026
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.
Supersedes #4499 and #4492 (built once on main 5544b8a so generated files regenerate a single time). Closes #4464. Closes #3804.
Note: #4504 makes #4499's own-transaction (CC00) rule redundant but harmless (same facade output).
Regenerated on the combined tree: det sweep 37/40, carddemo-signon dropped from det_sweep_baseline.json and facade_baseline.json; carddemo-signon evidence re-proved. Ratchets 5/5 pass; full pr_gates 7/7 pass.
#4499 (opaque DFHCOMMAREA)
Closes #4464.
Problem
CardDemo's COSGN00C declares an opaque DFHCOMMAREA (
LK-COMMAREA PIC X(01) OCCURS 1 TO 32767 DEPENDING ON EIBCALEN) and continues its pseudo-conversation withRETURN TRANSID(CC00) COMMAREA(CARDDEMO-COMMAREA). The engine pairs no COMMAREA with it for two reasons. Every XCTL into it is data-driven (via: moves). Its RETURN's callee is unresolved because the CSD also pairs CC00 with COCRDLIC throughDEFINE PROGRAM(COCRDLIC) ... TRANSID(CC00). So the generated façade washandleTransaction(String)/handleLink(), and the java-facade side refused 11 of 12 scenarios.Change (generator only:
cobol_to_java_transaction_forge.py)New
CicsForge._plan_opaque_commareaspass. It runs for a program with no COMMAREA, no channel, and a LINKAGE DFHCOMMAREA that is an opaque byte area (one alphanumeric leaf, e.g. ODOPIC X). The program's COMMAREA becomes the record that flows into it pass:RETURN TRANSIDto one of its own transactions (callee unresolved or itself)That record is given as the estate's one DTO matching it on name, file, width and field count. Extended copies such as
Cobil00cCarddemoCommareado not match.The gap names the reason when it refuses: the flows pass different records, a data-driven site into it
passesanother record name, or no DTO (or several) carries the record.In the Generator: CICS facades type the COMMAREA per program, but a pseudo-conversation carries it across programs #4427 conversation typing, a RETURN TRANSID to the sender's own transaction counts as a self-RETURN, and the crossing notes name it.
COSGN00C now generates
public Object handleTransaction(String transid, CarddemoCommarea request)andpublic CarddemoCommarea handleLink(CarddemoCommarea request). Its response isObjectbecause the task can XCTL into programs with other DTOs, the same as COMEN01C. Nothing is special-cased for COSGN00C.Generated-output impact, regenerated before and after:
src/.Evidence
tests/cobol_mainframe/test_cics_opaque_commarea_4464.pycovers the shape (opaque ODO DFHCOMMAREA plus RETURN TRANSID(own) COMMAREA(record) with an unresolved callee), the cases that are not opaque, and each refusal by name. The Generator: CICS facades type the COMMAREA per program, but a pseudo-conversation carries it across programs #4427, endpoints and region tests still pass.port_surface.py equivalence --cases carddemo-signonreplaced handleTransaction and handleLink.evidence.py prove carddemo-signongives proven: runTask 12/12, java-facade 12/12. The provenancestalemark (Equivalence harness: prove CICS ports through their deployed entry points (java-facade side) (#4449) #4455) is cleared, with areprovenhistory event. carddemo-signon is dropped fromtests/equivalence/facade_baseline.json.--det-only --skip-db2): as expected, 10/37.Follow-up owed
#4490 (det façades copy the stub's signature) has not merged. Once it does, merge main and drop carddemo-signon from
det_sweep_baseline.jsonwithproof_sweep.py --det-only --skip-db2 --update-baseline. The det port of COSGN00C should then take the COMMAREA with no det change.Note
The engine's
_transaction_programresolves CC00 ambiguously because it treatsDEFINE PROGRAM ... TRANSIDas a transaction pairing. An explicitDEFINE TRANSACTION ... PROGRAMarguably outranks it. This PR doesn't change the engine; the generator copes either way.#4492 (generated inputs)
Closes #3804.
Remaining "done when" items of #3804, on top of #3808 (
@generate, INTCALC):carddemo-posttran-generated, batch CBTRN02C): generated accounts, cross-references, category balances and 100 daily transactions. All four reject reasons (100/101/102/103) and the posting paths run; every output equal, RETURN-CODE 4 on both sides.carddemo-acctview-generated, CICS COACTVWC): generated files and 24 generated scenarios (below). Proven, runTask and java-facade, on the hand-written port. Hand-written cases are untouched.mortgage-mlist-generated; the dbb-mortgage-application estate ships no data): the ESDS and 12 COMMAREAs are generated, nothing from@case. No hand port exists, so it is proven through the det port (det_port.py run: runTask 12/12 scenarios equal); the java-facade half fails for the known det-facade stub (det translator: CICS facades are stubs (handleLink throws, void handleTransaction does nothing), not the region-run facade #4465), so it joins that baseline entry.equivalence_inputs.prepare_cics_case."input": "@generate"works for CICS files (record length and key from the program's file; an ESDS is unkeyed), and ascenario_generateblock makes scenarios: a map field is typed as a value on file, one not on file (miss), or not a number (bad: letters, blanks, signs, a decimal point), and COMMAREA fields takevalues,edge(the PICTURE's edge values) orfrom.digitsrule (numeric text a PICTURE cannot say) and dotted dataset names asfromsources.Finding, filed as #4491: the acct-view port
Long.parseLongs the cross-reference card number, which COBOL'sMOVE X(16) TO 9(16)does not; the first generated run failed there. Real data is all digits, so the case steersXREF-CARD-NUMtodigitsand says so.Ratchets:
det_sweep_baseline.jsongets the two CICS cases (#4465, same cause as their hand-written siblings).pr_gates --ratchets: estate, fact-crosscheck, completeness, ground-truth pass;portscould not run (the cics-crucible checkout here is off-pin, not touched). New unit tests intest_equivalence_inputs.py, plus E2E tests (EQUIVALENCE_E2E=1) that passed locally.Touches
equivalence_cics.pyin 8 lines only (an import, generated files at load, one call inrun_case);equivalence.pyis not touched.🤖 Generated with Claude Code
https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR