Repository navigation
det: RETURN TRANSID COMMAREA carries its bytes to the next task (Part of #4817) - #4871
Merged
Merged
Conversation
A level-1 RETURN TRANSID COMMAREA passes the bytes to the next task of the pseudo-conversation (like #4806 XCTL). Bytes the DTO cannot decode are preserved rather than replaced by decoded fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
…RETURN helper, facade round-trip test) 1. CicsTask.Region.transaction with byte[] is a default method in the interface to prevent FacadeRegion compile breaks. 2. Javadoc ordering corrected in CicsTask / CicsSpec. 3. Removed stray blank line before public CicsTask linked(...). 4. _return_call helper extracts the duplicated RETURN/RETURN IMMEDIATE code in det/cics.py, respecting the <= 120 character limit and file style. 5. tests/cobol_mainframe/test_return_transid_commarea_bytes_4817.py is cleaned up (renamed function, added module docstring, updated _jdk to use mark.skipif, trailing whitespaces removed). 6. Note: Infrastructure for testing the generated facade in javac does not exist in these unit tests, so I kept the unit test as-is as permitted by the instructions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
…ted, facade overload test - forge: returned()'s javadoc back directly above returned(); the default Region.transaction(..., byte[]) copies on its own line. - det/cics.py: _return_call documented and moved out of the RESP section. - test_facade_layout_4449: the generated facade keeps handleTransaction (transid, request) unchanged, adds the byte[] overload and lastAnswerBytes(), and the det facade rebuilt from that stub keeps both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
…only) Exposing the bytes on the generated facade (a handleTransaction overload, lastAnswerBytes) changes every committed port's surface: port_surface would have to resurface ~25 equivalence ports (and it matches facades by name, so it cannot yet tell two handleTransaction overloads apart) and each would be re-proven. That is its own follow-up. This PR keeps the runtime (returnedBytes, the returnTransid / returnImmediate overloads, the default Region.transaction(..., bytes)) and the det translator passing the bytes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 11, 2026 02:01
squid-protocol
enabled auto-merge (squash)
October 11, 2026 02:01
Contributor
Owner
Author
|
No description provided. |
This was referenced Oct 11, 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.
Part of #4817 · follow-up: #4870
Why
IBM: a level-1
RETURN TRANSID ... COMMAREApasses the COMMAREA's bytes to the next task of the pseudo-conversation (a copy). Every byte arrives as it was. GitGalaxy carried only the typed DTO, so a numeric DISPLAY field holding spaces was decoded as a number (spaces → -16), and the next task got digits where the previous task left spaces.Change (the same approach #4806 used for LINK / XCTL: the bytes travel beside the DTO)
CicsTask, emitted bycobol_to_java_transaction_forge.py):returnedBytessits besidereturnedArea;returnTransid(..., byte[] area)andreturnImmediate(..., byte[] area)are new overloads (the old ones are unchanged, and the bytes are recorded at level 1 only);returnedBytes()returns a copy;Region.transaction(transid, commarea, bytes)is a default method. It starts the next task with the bytes as its link area, so the det program's existing entry code (task.linkArea()) restores every byte into DFHCOMMAREA. Because it's a default method, the harness's twoFacadeRegionimplementations compile unchanged.det/cics.py): one helper,_return_call, serves RETURN TRANSID and RETURN IMMEDIATE. It passes the COMMAREA's bytes beside the DTO. The past-the-DTO path (det: LINK RESP2, RETURN TRANSID LENGTH past the DTO, and onward pass-through of opaque COMMAREA bytes (follow-up to #4501) #4679/det: ca-xctl-versions length-range: XCTL COMMAREA bytes past the DTO are refused (#4009); the COMP-5 VALUE half is fixed #4501,DetCics.commareaOut) already carries a byte[] and is unchanged.handleTransactionoverload pluslastAnswerBytes()) would change every committed port's surface (~25 equivalence ports failport-surface).port_surface.pycan't yet resurface overloads, so that work is facade: expose RETURN TRANSID COMMAREA bytes on the generated facade (follow-up to #4817; needs port_surface overload support) #4870. Until then, a pseudo-conversation driven through the facade still answers the DTO only. That's why this PR says "Part of".Reach (measured on the burned estates)
CA-CUSTOMER-NUM PIC 9(10).Tests
test_return_transid_commarea_bytes_4817.py(javac, JDK 17): spaces RETURNed with TRANSID reach the next task's link area byte for byte, through RETURN and RETURN IMMEDIATE; the old 2-arg path still gives none.test_det_translate.py: the emitted RETURN TRANSID / IMMEDIATE calls passCobol.commarea(...).bytes, and the past-the-DTO path still usescommareaOut.test_facade_layout_4449.py: the facade still has exactly onehandleTransaction(pinned until facade: expose RETURN TRANSID COMMAREA bytes on the generated facade (follow-up to #4817; needs port_surface overload support) #4870).Checks
pr_gates --fast: PASS.--ratchets: 7/7 PASS, nothing skipped (including ports, estate and port-surface).det_port.py check: 23 of 104 det ports changed (81 unchanged), all programs with RETURN TRANSID COMMAREA. CI's det sweep re-proves exactly those: carddemo-adminmenu carddemo-billpay carddemo-menu carddemo-report carddemo-signon carddemo-tranadd carddemo-tranlist carddemo-tranview carddemo-useradd carddemo-userdel carddemo-userlist carddemo-userupd cbsa-bnk1cac cbsa-bnk1cra cbsa-bnk1dac cbsa-bnk1dcs cbsa-bnkmenu genapp-lgtestc1 genapp-lgtestp1 genapp-lgtestp2 genapp-lgtestp3 genapp-lgtestp4 mortgage-cmort --work DIRProvenance
The first implementation and one review round were done by agy (Gemini) in its own worktree, following a code map and a count from two Haiku scouts. My review then found and fixed:
🤖 Generated with Claude Code
https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX