Skip to content

det: D2 re-check -- Lossless keeps X'25' under the IBM037 family, a hex literal refuses bytes a multi-byte record charset cannot hold (Part of #4702) - #5513

Merged
squid-protocol merged 4 commits into
mainfrom
churn/4702-20261018T1737Z
Oct 18, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
churn/4702-20261018T1737Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4702. Checklist: done [c:3e5c0f84]

What

Re-check of #4698 (non-latin-1 batch DISPLAY bytes + line terminator) against D2 as updated in #5396. The line terminator holds (new test pins one plain LF per DISPLAY, none after WITH NO ADVANCING, batch and standalone Sysout, 5 charsets). The bytes did not hold in two places:

Class member Before Now
Hex literal X'25' under the IBM037 family (IBM037/500/273/01140: X'15' and X'25' both decode to U+000A) Lossless round trip wrote X'15' duplicate byte reads as U+E000+byte, encodes back to itself (all 256 values identity)
Hex literal X'80'..X'FF' alone under UTF-8 silently EF BF BD refuses by name (UnsupportedOperationException); decodable sequences (X'C3A9') kept
ISO-8859-1, IBM1047, windows-1252 identity identity (now pinned for all 256)

D2.md corrected ("every single-byte record charset"; multi-byte refuses). No burned estate runs a multi-byte record charset.

Class table

Same mechanism (Lossless text<->byte view): hex literal, record reads/writes, Sysout. All covered by the 256-value round trip. Not touched: generated overlay copy tests/cics_crucible/ports/pc-wizard/PCCONF/overlay/cobolrt/Lossless.java (non-burned estate).

Gates

  • register.py --check ok; pr_gates --fast 6/6; new test 15 passed (~1 s, JDK only); test_det_bytes_4690 E2E (Docker cobc) 17 passed; cobolrt, cobolrt_rules, record_charset, sysout_attrs, source_reads, test_evidence pass.
  • det_port.py check: 125/125 ports unchanged. No golden bless (scan engine untouched).
  • pr_gates --ratchets: 8 pass, 0 fail, 0 skipped (cics-spec, ports, port-surface, estate, fact-crosscheck, completeness, ground-truth, time).

Lessons for agents

  • new String(b, cs) is not injective for the JDK's IBM037 family (X'15' and X'25' both U+000A): any "lossless" charset view must handle duplicate decodes, not only unmapped bytes.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 18, 2026 13:43
…ses bytes a multi-byte record charset cannot hold (Part of #4702)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 18, 2026 18:01
@squid-protocol
squid-protocol enabled auto-merge (squash) October 18, 2026 18:07
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5513 @ 704471f: 2 failed check(s)

== ground-truth (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39152277138/job/117753214059
repro: python tests/tools/pr_gates.py --ratchets --only-ratchets ground-truth (when a ground-truth part failed too, run that part's repro)
errors:
##[error]Process completed with exit code 1.
log tail:
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {4b6241fc-3289-4247-a1df-a473f6fcde10}
Region: westcentralus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: ground-truth
##[group]Run echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
echo "ground-truth parts: $PARTS (tested-tree skip: $SKIP, plan mode: $MODE)"
# #4935: "skipped" is a pass only when the gate proved this tree green on the PR; otherwise it is a failure
# #5164: ... or when the plan found no ground-truth input in the PR (mode none). An empty mode is not none.
test "$PARTS" = "success" || { test "$PARTS" = "skipped" && { test "$SKIP" = "true" || test "$MODE" = "none"; }; }
shell: /usr/bin/bash -e {0}
env:
PARTS: failure
SKIP:
MODE: full
##[endgroup]
ground-truth parts: failure (tested-tree skip: , plan mode: full)
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39152277138/job/117749392401
repro: python -m pytest -q tests/cobol_mainframe/test_java_subprocess_utf8.py::test_no_java_subprocess_in_tests_decodes_with_locale_charset
failing tests: tests/cobol_mainframe/test_java_subprocess_utf8.py::test_no_java_subprocess_in_tests_decodes_with_locale_charset
errors:
fail-on-cache-miss: false
E AssertionError: tests/cobol_mainframe/test_det_sysout_bytes_4702.py:108: java/javac uses text= without encoding='utf-8'; capture bytes and decode, or pass encoding
tests/cobol_mainframe/test_java_subprocess_utf8.py:253: AssertionError
FAILED tests/cobol_mainframe/test_java_subprocess_utf8.py::test_no_java_subprocess_in_tests_decodes_with_locale_charset - AssertionError: tests/cobol_mainframe/test_det_sysout_bytes_4702.py:108: java/javac uses text= without encoding='utf-8
##[error]Process completed with exit code 1.
log tail:
archive: true
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
GITGALAXY_MAINFRAME_CORPORA: /home/runner/work/gitgalaxy/gitgalaxy/.mainframe_corpora
PYTHONUTF8: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-ground-truth-part-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 87304
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 145fbf9dd45b23646d1b702df60dbb364940b22c6e2d4f5f122334b07bbcd1e1
Finalizing artifact upload
Artifact test-times-ground-truth-part-1 successfully finalized. Artifact ID 12146186406
Artifact test-times-ground-truth-part-1 has been successfully uploaded! Final size is 87304 bytes. Artifact ID is 12146186406
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/39152277138/artifacts/12146186406
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/756501ae-7f8b-47b6-ab55-da65dbd19a5f' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 18, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (dc9340d) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 18, 2026 19:03
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 138d1e7 into main Oct 18, 2026
53 checks passed
@squid-protocol
squid-protocol deleted the churn/4702-20261018T1737Z branch October 18, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant