Skip to content

tests: decode java/javac subprocess output as UTF-8 (agy-authored, Sonnet-checked) (Fixes #5109) - #5127

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5109-20261014T1621Z
Oct 14, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5109-20261014T1621Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

agy-authored, Sonnet-checked. Test-only; no golden/ledger impact.

Fixes #5109 (siblings of #5091 / #5108).

Design: copy the #5108 pattern: javac -encoding UTF-8, java -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8, capture bytes and .decode("utf-8"), so a non-ASCII byte (e.g. the not sign) no longer breaks the reader thread on Windows.

Class table (test helpers running bare java/javac on PATH):

member status
test_cobol_compare.py, test_facade_layout_4449.py fixed here (named in the issue)
test_time_zones.py, test_floating_insertion.py fixed here (found by the sweep)
test_cics_runtimes.py, test_bidi_layout, test_dbcs_widths, test_cobol_records_digits, test_runtimes_always already fine
~30 files running str(jdk / "java") with text=True (test_det_, test_link_, test_sql_*, test_key_collation, ...) and tests/tools adapters NOT here: different mechanism (resolved JDK path), listed as sibling gaps

New test_java_subprocess_utf8.py: an AST guard over the literal-java/javac test files, plus a real javac/java round-trip of the not sign and multibyte text.

Evidence: 36 tests pass in the 5 touched files; pr_gates --fast 6/6; --ratchets 7 pass, 0 skipped.

Cross-repo: none.

🤖 Generated with Claude Code

…5109)

Adopt PR #5108 pattern (javac -encoding UTF-8, java -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8, capture bytes and decode as UTF-8) in test_cobol_compare.py, test_facade_layout_4449.py, test_time_zones.py, and test_floating_insertion.py to prevent reader thread failures on Windows.

Add tests/cobol_mainframe/test_java_subprocess_utf8.py to verify test helpers specify UTF-8 encoding flags and round-trip UTF-8 characters including the not-sign.
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 14, 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 14, 2026 16:52
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 14, 2026 17:04
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 5eb36b0 into main Oct 14, 2026
47 checks passed
@squid-protocol
squid-protocol deleted the churn/5109-20261014T1621Z branch October 14, 2026 17:33
squid-protocol added a commit that referenced this pull request Oct 14, 2026
…the whole class (Closes #5128) (#5160)

* tests: resolved-JDK java/javac subprocess output decoded as UTF-8; guard covers the whole class (Part of #5128)

Same pattern as #5127 on the str(jdk / "java"), jdk / "bin" / "java", _JDK,
JAVA_BIN, java_bin and dp.tool(None, "java") forms: javac -encoding UTF-8,
java -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8, text captures pass
encoding="utf-8". test_java_subprocess_utf8.py now scans every tests/**/*.py
for these forms (and argv lists built into a variable via dp.tool), with a
synthetic-source self-test so it cannot go vacuous.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* tests: the direct-java mutation test expects the UTF-8 flags first (Part of #5128)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Siblings of #5091: java/javac subprocess output decoded with the Windows locale charset

1 participant