Repository navigation
det: read declared code pages and free format; refuse national text by name (#4462) - #4522
Merged
Merged
Conversation
…ional text by name (#4462) - The det source reader decodes the program and each COPY member with the code page the engine decoded it with (the estate's --source-encoding declaration): GalaxyIR.copy_pages, the skeleton's / port ticket's copy_pages, EngineCopies.pages. A COPY member name may hold national letters (COPY 'KUNDEÅ'). The CBL-card read for TRUNC / NUMPROC uses the same page. - >>SOURCE FORMAT FREE (until ... FIXED): code from column 1, any length, up to a *> comment. - Refused by name before the parser (source.unmodelled -> LayoutError / ExprError): text beyond Latin-1 (KYUYJP raised UnicodeEncodeError), a national letter in a name, DECIMAL-POINT IS COMMA; a VALUE number that is no Decimal is a LayoutError, never InvalidOperation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… text refused by name Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks
Contributor
squid-protocol
marked this pull request as ready for review
October 6, 2026 00:54
This was referenced Oct 6, 2026
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.
Part of #4462 (the code-page, free-format and KYUYJP-crash causes; the remaining causes stay ledgered under #4462).
What changed
Code pages, decoded the way the engine decodes them. The det source reader decodes the program and each COPY member with the code page the estate declares for that file, which is also the page the engine used (
--source-encoding,file_data.source_decode = 'declared'). That page now flows throughGalaxyIR.copy_pages(path)(new) →EngineCopies.pages(from the IR, or from the skeleton / port ticket'scopy_pages, which is written only when the estate declares a page). A COPY member name can now hold national letters (COPY 'KUNDEÅ'). The CBL-card read for TRUNC / NUMPROC uses the same page.Free format. After
>>SOURCE FORMAT FREE(until... FIXED), a line is code from column 1, of any length, up to a*>comment.Refused by name, never a crash.
source.unmodelledruns before the parser and raises a LayoutError / ExprError that names the file, line and character for:UnicodeEncodeError.BETRÄGE). The grammar reads ASCII words only.DECIMAL-POINT IS COMMA, so0,5is never read as integers.Comments and IDENTIFICATION DIVISION comment entries are exempt. A VALUE number that is not a valid Decimal now raises LayoutError instead of InvalidOperation.
Effect on estate-crucible (fact cross-check)
FUNCTION CURRENT-DATE (1:4))The keyed corpora are unchanged. Ledger: a new cause
translator-refuses-national-text(4 entries), KØBREG moves totranslator-refuses-grammar, and 8 entries plus the causetranslator-copy-statement-formsare dropped.Remaining causes (not fixed here, recommendation)
as_fixed_rowsre-wraps every long joined literal, so a long'...'literal is refused. This may explain the "long continued literals" grammar refusals. Recommend an issue; a possible fix is to re-wrap with double quotes.PROGRAM-ID LNCALC.with no period): trivial to tolerate, but out of scope here. RPTHDR, CardDemo / GenApp / DSF grammar gaps, andFUNCTION ... (refmod): grammar work.Evidence
pr_gates.py: 7/7 pass (lint, audits, secrets, xray, gauntlet, golden, suite). Golden is unchanged, so nothing was re-blessed.pr_gates.py --ratchets: 5/5 pass (ports, estate, fact-crosscheck, completeness, ground-truth). The ledger was updated with an unscopedfact_crosscheck.py updateand has 0 untriaged entries.proof_sweep.py --det-only --skip-db2): 34/37 proven. The one unexpected result is thatcarddemo-signonis now proven locally. Its baseline entry (Generator: COSGN00C's facade takes no COMMAREA, but its pseudo-conversation RETURNs one to itself (opaque ODO DFHCOMMAREA) #4464, the facade COMMAREA) came from fix(det): CICS facades run the program in the region (#4465) #4490, and fix(det): CICS facades run the program in the region (#4465) #4490's CI det-sweep passed with it unproven. My diff does not touch facades or COSGN00C's reading path, so I did not re-bless the baseline.tests/cobol_mainframe/test_det_source_4462.py(10 tests, translator extra installed, no skips).🤖 Generated with Claude Code
https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR