Skip to content

COMMAREA basis: a program's concrete declaration outranks a disagreeing caller record (#3688) - #3702

Merged
squid-protocol merged 2 commits into
mainfrom
fix/commarea-basis-3688
Sep 26, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
fix/commarea-basis-3688

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3688.

The decision

A CICS program's COMMAREA can be described in two places: by each caller (the record it passes) and by the program itself (its LINKAGE DFHCOMMAREA). The engine always preferred the caller's. That's right for CardDemo, whose programs declare an opaque byte run (PIC X OCCURS … DEPENDING ON EIBCALEN) and unpack it by hand. It's wrong when the program declares a real layout the callers disagree with.

Agreed rule: the program's own concrete declaration wins over a caller that disagrees, and every disagreement is flagged for a person instead of being settled silently.

caller record vs a concrete own declaration basis flagged?
same layout caller's record (unchanged) no
a coarser view (same bytes, some fields as one PIC X block) own declaration (more detail) no: compatible
disagrees in length or field shape own declaration conflict, with sizes and the first differing field
unknown or variable width own declaration fact-gap: "has no known width"
the declaration is opaque, or a coarser view of the caller's caller's record (unchanged) no

A concrete declaration has a fixed length, a known width and 2 or more elementary fields.

What it changes on the reference estates

  • GENAPP lgacvs01 / lgapvs01 / lgdpvs01 / lgucvs01 / lgupvs01: the generated Java used to read COMMAREA: DFHCOMMAREA (lgacdb01.cbl, None bytes). The DTO was built from a caller record whose size the engine couldn't determine. Each program now uses its own declared 32,500-byte layout, and the callers' unknown width is a fact-gap item.
  • CBSA BNK1UAC (declares 103 bytes, hands itself a 99-byte WS-COMM-AREA) and UPDACC (declares 99, receives BNK1UAC's 103): genuine clashes in the sample application. Each now uses its own layout, and both clashes are conflict items. The call site says so too: this site passes DFHCOMMAREA (103 bytes); UPDACC declares DFHCOMMAREA (… 99 bytes).
  • CardDemo COPAUS2C: its caller passes the 200-byte authorization record as one PIC X(200) where COPAUS2C declares it field by field. That's a coarser view, so the detailed declaration is used and nothing is flagged.

Migration worklist: CBSA +3 conflicts, GENAPP +5 fact-gaps, CardDemo unchanged.

Changes

  • GalaxyIR._declared_over_callers and _coarser_view (engine, IR reader only, so no rescan is needed).
  • The transaction forge's commarea_alternative_todos says how each caller disagrees.
  • The call forge's site check judges by layout when the callee kept its declaration. Before, two areas both named DFHCOMMAREA could never mismatch.
  • The worklist categories cover the new TODO wording; the drift guard enforces this.
  • field_testing.json: D025.

Evidence

  • ir_join_diff: only program_interfaces changes: CBSA 2, GENAPP 5, CardDemo 1. zECS, zopeneditor and DSF are unchanged.
  • Generated Java changes only for those programs, their callers and GENAPP's remote client (DTO type).
  • Compiles: 39/39 (CBSA, GENAPP and CardDemo × all 13 configs).
  • The full suite passes: 11,788. Preflight --java is all PASS. The refraction snapshots and the ground-truth ledger are unchanged.
  • test_commarea_basis.py covers each row of the table above in a real scan, plus the Java and worklist output.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

squid-protocol and others added 2 commits September 25, 2026 21:42
…ng caller record (#3688)

A resolved caller's record used to outrank the program's own LINKAGE DFHCOMMAREA
unconditionally. GENAPP's five lg*vs01 were built from a caller record of UNKNOWN width
instead of their declared 32,500 bytes, and CBSA's BNK1UAC / UPDACC silently took a caller
layout of another size.

A CONCRETE own DFHCOMMAREA (fixed length, known width, 2+ elementary fields) now wins when
the best caller record is of unknown or variable width, or disagrees in length or field
shape. Each caller record becomes an alternative carrying its mismatches.

A caller record that matches, or a finer view of an opaque declaration, stands as before.
A caller that keeps some of the declared fields as one PIC X block (CardDemo COPAUS1C's
200-byte authorization record) is a COARSER VIEW: compatible, the declaration's detail is
used, and nothing is flagged.

Java:
- the controller and the calling site get a TODO naming both layouts, or the unknown width;
- the call-site check now judges by layout, not name (two DFHCOMMAREAs can differ);
- the migration worklist files these as conflict / fact-gap items.

Effect:
- 8 programs change basis; 39/39 compiles pass (3 corpora x 13 configs);
- worklist: CBSA +3 conflicts, GENAPP +5 fact-gaps;
- snapshots and ledger unchanged; field_testing D025.

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

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 175410f into main Sep 26, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the fix/commarea-basis-3688 branch September 26, 2026 01:56
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.

COMMAREA basis: a caller's record outranks a concrete declared LINKAGE DFHCOMMAREA of a different width

1 participant