Repository navigation
The records' code page: declared once, generated, stated in every ticket, set by the harness (#4060) - #4065
Merged
Conversation
…every ticket, set by the harness Re-running the porting loop on CBTRN03C (#4056), attempt 1 decoded every record as IBM037 while the data is ISO-8859-1: nothing told the model which code page the record bytes are in, and the ticket's only code-page words are about EBCDIC key collation. - Target config: data.record_charset (default latin-1: what an ASCII transfer gives, and what ran before), validated at load. - Generated runtime: CobolRecords.charset() -- the declared charset, unless the system property gitgalaxy.data.charset names another. - Porting rule: record bytes (datasets, files, COMMAREAs) are in CobolRecords.charset(); never Charset.forName, StandardCharsets or a guessed EBCDIC page for record data. - Equivalence harness: every Java run (batch, CICS, CALL) sets gitgalaxy.data.charset from the case's data encoding -- the bytes the COBOL side wrote -- so a port that hard-codes another fails a non-Latin-1 case. Unchanged by default: the committed ports, the generated snapshots and both CardDemo proofs re-run here (CSUTLDTC, COMEN01C) stay as they were. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Contributor
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 #4060.
When the porting loop re-ran on CBTRN03C (#4056), attempt 1 decoded every record as IBM037 while the data is ISO-8859-1. Nothing told the model which code page the record bytes are in. The ticket's only code-page words are about EBCDIC key collation.
Fix: the records' code page is a deployment fact, declared once.
data.record_charset, defaulting tolatin-1(what an ASCII transfer gives, and what ran before), validated at load.CobolRecords.charset()returns the declared charset, unless the system propertygitgalaxy.data.charsetnames another.CobolRecords.charset(). NeverCharset.forName,StandardCharsets, or a guessed EBCDIC page for record data.gitgalaxy.data.charsetfrom the case's data encoding, so a port that hard-codes another charset fails a non-Latin-1 case.Nothing changes by default. The committed ports are untouched. The generated snapshots pass (excerpts and the full corpora). CSUTLDTC and COMEN01C are proven again end to end with the new runtime.
Tests:
tests/cobol_mainframe/test_record_charset.pycovers the config validation, the generated method per charset (ISO-8859-1, IBM037, UTF-8), the ticket rule, and the harness property.tests/cobol_mainframeandtests/cics_cruciblepass (1,186), andaudit_checkis clear.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ