Skip to content

facade: expose RETURN TRANSID COMMAREA bytes on the generated facade (follow-up to #4817; needs port_surface overload support) #4870

Closed

Description

@squid-protocol

Follow-up to #4817 (the runtime + det translator part lands in the PR that references this issue).

State after that PR. A level-1 RETURN TRANSID ... COMMAREA now records the COMMAREA's bytes beside the DTO (CicsTask.returnedBytes()), and Region.transaction(transid, commarea, bytes) (a default method) starts the next task with them as its link area, so a det program's DFHCOMMAREA gets every byte back (spaces in a numeric DISPLAY field too). The generated facade still answers the DTO only (handleTransaction(String transid, T request)), so a deployed pseudo-conversation driven through the facade still loses bytes the DTO cannot decode.

Ask. Expose the bytes on the generated facade without changing the existing signature (the equivalence harness reads it: det/cics.py target_contract). For example, an overload handleTransaction(String transid, T request, byte[] area) plus lastAnswerBytes(), or refuse by name at the facade when the answer holds bytes its DTO cannot carry.

Why this is its own PR. Any facade change changes every committed port's surface. The port-surface ratchet then lists ~25 equivalence ports (CardDemo, CBSA, GenApp; measured on the #4817 branch), and:

  1. tests/tools/port_surface.py matches facades by NAME (FACADE regex), so it cannot tell two handleTransaction overloads apart, and it does not know lastAnswerBytes (a field + method the overload needs): resurfaced ports would not compile. It needs overload-aware matching first.
  2. Then port_surface.py equivalence --work DIR and re-prove each changed case (evidence.py prove, Docker).
  3. The det facade rebuild (det/program.py facades()) must emit the overload and the field too (a version was written and reverted on the det/facade: a RETURN TRANSID COMMAREA crosses to the next task as its DTO only -- a numeric field holding spaces comes back as digits #4817 branch: commits bb71f9f / 6aefbc8 show it).

Measured reach (burned estates, scout 2026-10-11): 36 programs RETURN TRANSID with a COMMAREA; 4 can put non-digits in a numeric DISPLAY field of it (GenApp LGTESTP1-4: unguarded MOVE of a map PIC X field to CA-CUSTOMER-NUM PIC 9(10)), 2 possible (CardDemo COCRDUPC, DBB EPSCMORT first entry). The issue's CBSA example did not reproduce.

Part of #4270.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    legacy-modernization
    priority: low
    on Oct 11, 2026
  2. squid-protocol commented on Oct 12, 2026

    @squid-protocol
    OwnerAuthor

    Sibling gap filed from the #4960 review: #4965 (crucible/harness never drives the byte overload; 5 survivors triaged unreachable).

  3. added a commit that references this issue on Oct 12, 2026
    be6b2a2
  4. added
    scope:sweep
    era:2
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugera:2legacy-modernizationpriority: lowscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions