Skip to content

det port / entities: keep the record bytes beside the typed columns; carddemo-cardupdate proves (#4875) - #4954

Merged
squid-protocol merged 5 commits into
mainfrom
churn/4875-20261012T0319Z
Oct 12, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/4875-20261012T0319Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #4875

Problem

A generated VSAM entity round-tripped through its typed columns lost any record bytes the typed fields don't carry (FILLER, redefined areas, non-canonical numerics). carddemo-cardupdate DIFFERED on pf5-confirms-and-rewrites because the rewrite changed bytes the program never touched.

Design

Every generated entity keeps byte[] vsamRecord (column VSAM_RECORD, length = reclen), set by fromRecord. toRecord starts from those bytes and re-encodes only the fields whose typed value differs from what the kept bytes decode to. Lombok: no getter/setter, excluded from equals/hashCode/toString. Change is in gitgalaxy/tools/cobol_to_java/cobol_to_java_repository_forge.py (_codec, _codec_get(rec=...)). No proof was loosened; the comparator is unchanged.

Class

Entity round-trip losing bytes the typed fields don't carry. All generated entities share the one codec, so every member is covered by this change; tests: tests/cobol_mainframe/test_generated_record_layer.py (two #4875 tests).

Proof

  • carddemo-cardupdate: PROVED, 43/43 scenarios equal on port and java-facade (was DIFFERS). Coverage 45/45 paragraphs, 175/189 branches; the rest are 14 reviewed entries in infeasible_outcomes.json. Its det_sweep_baseline.json entry is dropped and det_sweep_coverage/carddemo-cardupdate.json added.
  • det_port.py check (re-run after merging main): 61/104 ports moved (entity files only), 43 unchanged. All 61 re-proved PROVED, including Db2 cases.

Gates

pr_gates.py --fast: 5/5 pass. pr_gates.py --ratchets: 7 pass, 0 fail, 0 skipped. Both run via heavy-run.sh with JDK 17. Main merged (git merge, no rebase); the two incoming commits don't touch the translator.

Cross-repo

None; no companion PRs.

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 11, 2026 23:25
…4875)

toRecord writes back each unchanged field as the bytes it was read from and
re-encodes only what changed: spaces in a PIC 9, a non-preferred packed
sign and FILLER survive a READ / REWRITE, as VSAM keeps them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rop its det-sweep baseline entry (Part of #4875)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s, 175/189 branches) (Part of #4875)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol and others added 2 commits October 12, 2026 02:38
…unit test does not depend on the live det baseline (Part of #4875)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 07:33
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 2a87fa6 into main Oct 12, 2026
60 checks passed
@squid-protocol
squid-protocol deleted the churn/4875-20261012T0319Z branch October 12, 2026 07:33
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.

carddemo-cardupdate: COCRDUPC writes spaces into a PIC 9(3) CVV; the entity-backed file cannot hold them (+ 30 uncovered branches)

1 participant