Repository navigation
Name undeclared raw EBCDIC instead of decoding it silently as cp1252 (Part of #8412) - #8559
Conversation
…(Part of #8412) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #8559 @ 35daa12: 2 failed check(s) == crucible (failure) -- real == measure (shard 3/4) (failure) -- real |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (3fe64b4) is not the one a maintainer labelled |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
Part of #8412.
Without
--source-encoding, raw EBCDIC bytes fell through the decode ladder to cp1252 / Latin-1 and came out as garbage with no finding.source_text.looks_like_ebcdic(a byte-distribution sniff: EBCDIC letter/digit/blank bytes dominate, a blank every few bytes, next to no printable ASCII) now setsSourceText.ebcdic_undeclaredon a guessed decode when no code page was declared.galaxyscopecarries it asebcdic_undeclared(only when true) and the LLM report's 4.1 SOURCE ENCODINGS prints anUNDECLARED EBCDICline naming the files and the--source-encodingto declare. It is a hint, never a decode: the engine does not pick a code page.read_source's CRLF fold now keeps the flag (andcjk_candidates, which it used to drop).Checklist: done [c:99fb366a]
Class / Sibling gaps
Class: source bytes decoded through the guess ladder without the reader being told. Members: raw EBCDIC with no declaration (this PR, FB80 and NEL layouts, cp037 / cp500 / cp1047 / cp273, COBOL and JCL text; negatives: ASCII, UTF-8, cp1252, Latin-1 accents, Shift-JIS,
@runs, all-bytes binary, short input); CJK guess (handled, #3878). Sibling gaps: RECFM=V RDW-prefixed exports (not here: a different mechanism, framing not code page; own checklist line, c:8e893dfa); EBCDIC in a mixed file (one declared glob, others not) is flagged per file, as designed. An EBCDIC file under 16 bytes or heavy in punctuation/lowercase-only text is not flagged (sniff thresholds 60% EBCDIC text bytes, 4% blanks, at most 40% printable ASCII).Remaining slices
None for this line. Other #8412 lines are untouched.
Gates
New test file plus
test_source_text,test_cjk_encoding_hint,test_source_encoding_record,test_source_reads: 89 passed.audit_check.py: all clear.crucible_check.py(both legs): PASS, no golden change.pr_gates --ratchets: 5 pass; ports, fact-crosscheck, completeness and ground-truth FAIL here because the worktree has no fetched mainframe corpora (example-health-apis is not fetched at its pinned ref); not re-run against main, left to CI.🤖 Generated with Claude Code