Skip to content

Fix #4009: CicsTask records SEND TEXT length/options, RECEIVE MAP, and EIBCALEN - #4017

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4009-cicstask-event-model
Sep 29, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4009-cicstask-event-model

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4009
Part of #3989 (phase 3, lane A)

What changed

Forge: the generated CicsTask (cobol_to_java_transaction_forge.CICS_TASK_JAVA). Every existing signature is kept.

  • SEND TEXT: sendText(String text, int length, String... options) records the FROM data, LENGTH and the sorted options (ERASE, FREEKB, ...). sendText(text) keeps working, with the text's own length and no options.
  • RECEIVE MAP: receive(map, mapset, type) records a RECEIVE-MAP event with map, mapset and resp: NORMAL, or MAPFAIL when nothing was received. receive(map, type) records one too, with a null mapset.
  • COMMAREA length (EIBCALEN):
    • A new constructor, CicsTask(transid, aid, commarea, Integer eibcalen, received), and eibcalen() carry the length beside the DTO, so a short or long COMMAREA can be represented. It is 0 without a COMMAREA, and null means the whole record.
    • returnTransid(transid, commarea, Integer length) records RETURN ... LENGTH. The two-argument form means the whole record.
  • Port tickets: the port-ticket paragraph on runTask names the new calls.

Runner (tests/tools/cics_crucible.py, cics_crucible_compare.py)

  • The generated Java driver carries each RETURN's length into the next task's CicsTask and reports each task's eibcalen. An XCTL passes on its length when the event has one; CICS harness: XCTL RESP/RESP2 and LENGTH semantics #4008 adds that.
  • JAVA_CAPS now models SEND-TEXT {text, length, options} and RECEIVE-MAP {map, mapset, resp}. java_actual maps them.
  • Lengths:
    • A DTO area carries the length CicsTask gave it.
    • With no length, a DTO area is FULL, and the comparison resolves FULL against the expected layout's record size, for both a task's eibcalen and an area. A shorter expected COMMAREA is now a fail: the port passed its whole record without a LENGTH. Before, it was unsupported: a DTO has no EIBCALEN, and that excuse is gone now that CicsTask carries the length.

CardDemo equivalence (equivalence_cics.cobol_events): the COBOL side's stub already logged RECEIVE-MAP. It now lists it too, so both sides compare it. The account-view scenarios that type into the screen go from 2 to 3 compared events, all equal. test_carddemo_account_view_is_equivalent_end_to_end is updated to match.

Crucible cells

Rebased on #4013 (5c6d17f, after #4002 and #4005). The cell verdicts are unchanged: 22 pass, 38 fail, 34 unsupported. No cell's status or reason moves, because each needs other work too; the report's "alone" column already showed 0 for this piece. What changes is the features the cells need. docs/language_status/cics_crucible.md is regenerated with --update-baseline, and baseline.json is byte-identical.

  • CicsTask: SEND-TEXT length / options (28 cells each) and CicsTask: RECEIVE-MAP event (9 cells) are no longer missing features.
  • The rows "SEND TEXT length and options" and "RECEIVE MAP recorded as an event" leave the java harness-work table.
side pass fail unsupported
engine-facts 10 0 0
forge-compile 10 0 0
cobol-stub 2 1 34
java 0 37 0

(As on main after #4002; unchanged by this PR.)

Generated output

java_target_matrix.py --same-as origin/main on CardDemo (default) reports exactly one changed build input, cics/CicsTask.java. That change is intended; the API is described above. Every project that has a CICS transaction gets the new CicsTask. It compiles in all 10 crucible cases (forge-compile 10/10) and runs the Java side there. The java-compile workflow compiles it across the corpora. No golden-master fixtures change.

Tests

  • test_cics_endpoints: the generated CicsTask has the new signatures and the RECEIVE-MAP event.
  • test_cics_crucible_runner:
    • java_actual maps RECEIVE-MAP, SEND-TEXT length/options and RETURN LENGTH, and turns an absent EIBCALEN into FULL;
    • a task's eibcalen of FULL passes against its layout's size and fails against a shorter one;
    • a DTO area with a stated length compares exactly.
  • test_equivalence_cics (E2E): CardDemo account view is equal on every event, RECEIVE MAP included.

Verification

  • pytest tests/cics_crucible tests/cobol_mainframe/test_equivalence_cics.py tests/cobol_mainframe/test_cics_endpoints.py passes, with EQUIVALENCE_E2E=1 for the CardDemo account view.
  • cics_crucible.py --update-baseline rewrites only the report.
  • The ruff, mypy and dead-key audits show no new findings. ruff format is clean on the touched files, and tool_regex_redos --ci reports 0 offenders.

🤖 Generated with Claude Code

@squid-protocol
squid-protocol force-pushed the fix/4009-cicstask-event-model branch from b6e1123 to f245b36 Compare September 29, 2026 18:37
…d EIBCALEN

The generated CicsTask now records what the CICS crucible compares:
- sendText(from, length, options...): SEND TEXT's LENGTH and sorted options;
  sendText(text) keeps its own length and no options.
- receive(map, mapset, type) records a RECEIVE-MAP event with its RESP
  (NORMAL, or MAPFAIL when nothing was received); receive(map, type) too.
- EIBCALEN beside the DTO: CicsTask(transid, aid, commarea, eibcalen,
  received) and eibcalen(); returnTransid(transid, commarea, length) records
  RETURN ... LENGTH. Null means the whole record.

The crucible runner's Java driver carries each RETURN's length into the next
task, JAVA_CAPS models SEND-TEXT length/options and RECEIVE-MAP, and the
comparison resolves a whole-record COMMAREA against its layout (a shorter one
must state its LENGTH, else it fails rather than being unsupported). The
CardDemo account-view equivalence compares RECEIVE MAP on both sides. The port
tickets describe the new API. Cell verdicts are unchanged; the report drops
the SEND TEXT and RECEIVE MAP features.

Part of #3989.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol force-pushed the fix/4009-cicstask-event-model branch from f245b36 to 2ff4a4a Compare September 29, 2026 18:44
@squid-protocol
squid-protocol merged commit 70e6420 into main Sep 29, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4009-cicstask-event-model branch September 29, 2026 18:55
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.

CicsTask event model: SEND TEXT length/options, RECEIVE-MAP event, COMMAREA length (Java side, 28+ cells)

1 participant