Skip to content

Generator: CICS facades carry the COMMAREA a pseudo-conversation passes across programs (#4427) - #4435

Merged
squid-protocol merged 2 commits into
mainfrom
fix/4427-facade-commarea
Oct 5, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
fix/4427-facade-commarea

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Draft. Fixes #4427.

Generator

handleTransaction was typed with the program's own COMMAREA DTO in both directions. Now each direction is typed from the estate's RETURN TRANSID flows (the skeleton's commarea_contracts rows):

  • request: the program's own DTO only when every RETURN TRANSID into its transactions presents no other class. A flow can present the sender's record or the receiver's, because COBOL passes bytes.
  • response: the own DTO only when every RETURN TRANSID its task can end in does the same. That includes the program's own RETURNs and the RETURNs of every program an XCTL chain from it reaches, because an XCTL keeps the task.
  • Otherwise that direction is Object. runTask reads it through task.commarea(..), which is what the ports already do. The Javadoc lists each crossing flow.
  • The REST endpoint's @RequestBody stays the program's own record, because JSON needs a concrete class. It answers ResponseEntity<Object> where the facade does.
  • No new methods. handleLink is unchanged: on LINK / XCTL the caller presents the target's DTO, as the call forge's xctlX already does.
  • A program that only converses with itself keeps its facade byte for byte. A shared copybook DTO, such as CardDemo's CarddemoCommarea, also stays typed.
  • Regression tests: tests/cobol_mainframe/test_cics_conversation_4427.py covers the pc-wizard shape, the pc-aid-menu shape, the self-only case and the shared-copybook case.

Ports, regenerated by the tools only

  • port_surface.py crucible changed only PCCONF, PCWIZ, PCMENU and PCDETL (handleTransaction replaced). The other 13 report "surface is the generator's".
  • crucible_port_provenance.py reprove re-proved all 4 at v0.2.0 (java-ported + java-facade). Their stale marks are replaced by reproven entries.
  • evidence.py prove + render: all 4 are now proven, unapproved. evidence.py status --ci passes.
  • cics_crucible.py --update-baseline drops the 6 java-facade cells. coverage.json is unchanged.
port java-facade before → after
PCCONF (pc-wizard) 0/5 → 5/5
PCWIZ (pc-wizard) 1/6 → 6/6
PCMENU (pc-aid-menu) 3/4 → 4/4
PCDETL (pc-aid-menu) 2/3 → 3/3
13 others all pass → all pass

Full run (JDK 17, cics-crucible v0.2.0): 152 pass, 44 fail, 196 cells. java-ported is 44/44 and java-facade is 44/44, up from 38/44. The 44 failures are the generated-stub java side, as on main.

Facades that change outside the crucible

  • 20 CardDemo programs: their handleTransaction now answers Object. The request stays typed. They are COACTUPC, COACTVWC, COADM01C, COBIL00C, COCRDLIC, COCRDSLC, COCRDUPC, COMEN01C, COPAUS0C, COPAUS1C, CORPT00C, COTRN00C/01C/02C, COTRTLIC, COTRTUPC and COUSR00C/01C/02C/03C.
  • Why: each one XCTLs to other screens (the menu's options, PF3 back), and those screens RETURN their own extended COCOM01Y copies. Those are different DTO classes (CoactvwcCommarea, Cotrn00cCarddemoCommarea, ...). The old typed facade would throw in returned(), the same bug as PCMENU.
  • CBSA and GenApp facades do not change.
  • 14 committed CardDemo equivalence ports still carry the old typed facade: acctview, adminmenu, billpay, cardlist, cardview, menu, report, tranadd, tranlist, tranview, useradd, userdel, userlist and userupd.
  • Evidence records are marked stale on generator (a scheduled input, not blocking), as with any generator change.

Checks

  • ruff_audit and mypy_audit --ci are clean. tool_regex_redos --ci passes. refraction_snapshot check shows 0 diffs.
  • Test suites: tests/cics_crucible, test_proof_reach, test_evidence, test_cics_endpoints, test_cics_region_4342, test_porting_loop_tooling.
  • pr_gates --vs-main: 5/7 gates pass. golden fails because the local language-crucible is off-pin. suite fails with 11 test_security_auditor failures because pandas/xgboost are missing locally. Both are pre-existing on main@367ad9068.
  • Mutation scores and the proof_reach test are untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…es across programs (#4427)

handleTransaction takes the program's own COMMAREA DTO only when every
RETURN TRANSID into its transactions presents no other class, and answers
with it only when every RETURN TRANSID its task can end in (its own, and
those of programs an XCTL chain reaches) does the same; otherwise that side
is Object. Crucible PC ports resurfaced with port_surface.py, re-proven
(reprove + evidence prove); 6 java-facade cells leave the baseline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
@squid-protocol squid-protocol changed the title WIP: Generator: CICS facades carry the COMMAREA a pseudo-conversation passes across programs (#4427) Generator: CICS facades carry the COMMAREA a pseudo-conversation passes across programs (#4427) Oct 5, 2026
@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 12:17
@squid-protocol
squid-protocol merged commit d97bd26 into main Oct 5, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4427-facade-commarea branch October 5, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generator: CICS facades type the COMMAREA per program, but a pseudo-conversation carries it across programs

1 participant