Repository navigation
det port / entities: keep the record bytes beside the typed columns; carddemo-cardupdate proves (#4875) - #4954
Merged
Merged
Conversation
…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]>
Contributor
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…unit test does not depend on the live det baseline (Part of #4875) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
squid-protocol
marked this pull request as ready for review
October 12, 2026 07:33
Owner
Author
|
No description provided. |
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.
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-cardupdateDIFFERED onpf5-confirms-and-rewritesbecause the rewrite changed bytes the program never touched.Design
Every generated entity keeps
byte[] vsamRecord(columnVSAM_RECORD, length = reclen), set byfromRecord.toRecordstarts 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 ingitgalaxy/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 ininfeasible_outcomes.json. Itsdet_sweep_baseline.jsonentry is dropped anddet_sweep_coverage/carddemo-cardupdate.jsonadded.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