Repository navigation
fix(forge): name a LINKed program's COMMAREA DTO after its own DFHCOMMAREA - #4390
Merged
Merged
Conversation
…MAREA, not the caller's record Prepares #4329. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
Contributor
squid-protocol
marked this pull request as ready for review
October 5, 2026 01:34
This was referenced Oct 5, 2026
squid-protocol
added a commit
that referenced
this pull request
Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol
added a commit
that referenced
this pull request
Oct 5, 2026
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
squid-protocol
added a commit
that referenced
this pull request
Oct 5, 2026
) * test: evidence records for the four Db2 equivalence cases (#4048) Proven with the real harness against the pinned oracle (GITGALAXY_ORACLE_STRICT=1) and a rebuilt gitgalaxy-gnucobol-db2:3. Three ports followed #4390's DTO rename (callee's own DFHCOMMAREA): AbndprocDfhcommarea, LgstsqDfhcommarea. Drops the four cases from the MISSING ratchet. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo * test: genapp-lgapvs01 port follows #4390's DTO rename; record re-proven Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 5, 2026
Merged
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.
Prepares #4329.
Rule
A program reached by LINK / XCTL gets a COMMAREA contract DTO named after its OWN
DFHCOMMAREA(its LINKAGE SECTION), never after the caller's record: CICS hands the callee only its own linkage. A program reached only by RETURN TRANSID (including to itself) keeps the record it carries (HxattrWsCa,PcdetlWsCa, ... which the committed ports reference).Root cause
program_interfaces(gitgalaxy/tools/cobol_to_cobol/galaxy_ir.py, theelif options:caller_record branch, ~l.2538) setscommarea.recordto the caller's record whenever a caller's layout is usable and agrees with the callee's DFHCOMMAREA;CicsForge._plan(cobol_to_java_transaction_forge.py, ~l.1789) then names the DTO fromcommarea["record"]. Until now a caller record that was unusable (e.g. WS-CA with a leaked USAGE POINTER) fell through to_declared_over_callers, which names itDFHCOMMAREA. With #4329 the leak is gone, WS-CA becomes a usable record, and HCSUB'shandleLinktookHcsubWsCa, so the 5hc-abend-link/*/java-portedcells failedmvn compileagainst the overlay that usesHcsubDfhcommarea.Fix
The engine adds
declared_record(the callee's own DFHCOMMAREA name) to a caller_record commarea when a LINK/XCTL source exists; the forge names the DTO from it, owned by the callee. Layout and field names are unchanged. Tests: new forge and engine tests (caller recordWS-CAvs calleeDFHCOMMAREA; RETURN-only keeps its name); three existing assertions that pinned the old caller-derived names (AcctCommarea,MenuWsComm) are updated.Evidence
(a) On plain main, regenerated (refactor + cobol-to-java, h2) CardDemo, CBSA, GenApp and all 10 cics-crucible cases at the pin, before vs after: CardDemo and all 10 crucible cases are byte-identical, so no generated code for any committed crucible port changes. CBSA (52 files) and GenApp (54 files) differ only in contract DTO class names and references to them (
Lgacus01CommArea->Lgacus01Dfhcommarea, etc.); no committed port (crucible overlays,tests/cobol_mainframe/port_invariance) references any renamed class, and the refraction snapshots are unchanged.(b) With
origin/fix/4329-usage-leakmerged in a scratch copy: before the fix HCSUBhandleLink(HcsubWsCa), hc-abend-link forge-compile pass butjava-ported0/5 (mvn compile error); after,handleLink(HcsubDfhcommarea request)andjava-ported5/5 pass, forge-compile and cobol-stub pass (JDK 17, GITGALAXY_ORACLE_STRICT=1, gitgalaxy-gnucobol:3, cics-crucible v0.2.0). Thejavacells fail as before, ledgered in the baseline.Local: ruff/mypy/dead_key audits
--ciclean; tests/cobol_mainframe, tests/cics_crucible, tests/tools: 1694 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo