Skip to content

The records' code page: declared once, generated, stated in every ticket, set by the harness (#4060) - #4065

Merged
squid-protocol merged 1 commit into
mainfrom
fix/ticket-code-page-4060
Oct 1, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/ticket-code-page-4060

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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.

  • Target config: data.record_charset, defaulting to latin-1 (what an ASCII transfer gives, and what ran before), validated at load.
  • Generated runtime: CobolRecords.charset() returns 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, 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.py covers the config validation, the generated method per charset (ISO-8859-1, IBM037, UTF-8), the ticket rule, and the harness property. tests/cobol_mainframe and tests/cics_crucible pass (1,186), and audit_check is clear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

…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
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 2373bdd into main Oct 1, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/ticket-code-page-4060 branch October 1, 2026 09:22
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.

Porting ticket: the records' code page is never stated -- a model guessed IBM037 for Latin-1 data

1 participant