Skip to content

det facade: a DTO-only answer of a RETURN COMMAREA refuses bytes the DTO cannot hold (Part of #4817) - #5328

Merged
squid-protocol merged 1 commit into
mainfrom
churn/4817-20261017T1032Z
Oct 17, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/4817-20261017T1032Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4817.

A RETURN TRANSID COMMAREA reaches the next task as its bytes (#4871); the byte-carrying handleTransaction(.., byte[]) answers them. The DTO-only answer (the one-arg handleTransaction, and the REST endpoint over it) could not: a numeric DISPLAY field holding spaces and digits came back as digits. This closes the issue's "or refused by name at the facade, never silently changed" arm.

Fix. CicsTask.returned() (runtime in cobol_to_java_transaction_forge.py) refuses by name when the task's bytes were not taken through returnedBytes() and the answered DTO's toCommarea() differs from a byte the RETURN passed (cut at LENGTH), unless the DTO's byte is a space (0x20 / 0x40: FILLER, an unset field). No emission change: both facade emitters already read returnedBytes() first in the byte overload. A DTO with no layout, a RETURN with no bytes beside the DTO, and byte[] answers are unchanged. The check is a lower bound (a loss under a DTO space byte is not seen). Register X51 updated.

Class member Status
RETURN TRANSID, DTO-only answer refused by name (here)
RETURN IMMEDIATE, DTO-only answer same path (here)
det stub one-arg handleTransaction same returned() (here)
byte overload / lastAnswerBytes() answers as before
LINK / XCTL bytes done (#4806, #4818)
#5060 model-port String/number XCTL sibling gap (needs a static mark in the generator; no burned-estate program known to need it)

Evidence. New tests/cobol_mainframe/test_return_dto_lossless_4817.py (fails without the fix): lossy / Object / bytes taken / clean / FILLER / EBCDIC space / LENGTH cut past and inside / no layout / no bytes / nothing returned, for RETURN and RETURN IMMEDIATE. Neighbouring commarea/facade/endpoint tests: 676 passed. pr_gates --fast 6/6; --ratchets 8/8, none skipped. det_port.py check: 103 of 119 ports change only in CicsTask.java (+36 lines). Re-proved with det_port.py run: carddemo-cardupdate, cbsa-bnk1cca, carddemo-signon PROVED; cbsa-bnk1uac DIFFERS only by the existing #5076 byte[] refusal (not this change). The other ports were not re-proved here.

Cross-repo: none.

🤖 Generated with Claude Code

…DTO cannot hold (Part of #4817)

CicsTask.returned() refuses by name when the DTO's layout bytes differ from a byte the RETURN passed
(spaces excepted) and the bytes were not taken through returnedBytes().

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 17, 2026 10:52
@squid-protocol
squid-protocol enabled auto-merge (squash) October 17, 2026 10:53
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant