Skip to content

tests: Maven-spawned JVMs and mvn output use UTF-8 (Closes #5161) - #5173

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5161-20261015T0120Z
Oct 15, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5161-20261015T0120Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #5161. Class: Maven-spawned JVM output decoded with the locale charset (siblings of #5128 / #5109).

Member Status
equivalence_java.py run_maven: surefire -DargLine fixed: UTF-8 flags lead the argLine (an env's own file.encoding still follows); encoding="utf-8"; MAVEN_OPTS
mutation.py mvn compile -X (classpath is parsed from stdout) fixed
cics_crucible.maven, java_target_matrix.build, scip_callgraph._run, test_no_jcl_batch_controller fixed (same mechanism)
dp.run callers (devin_port, thirdparty_port), det_survey, ibm_wca4z_port exempt: capture bytes or redirect to a file, no locale decode
Guard test_java_subprocess_utf8.py now covers mvn argv: text= without encoding=, and a literal -DargLine= without the UTF-8 flags

Shared helper: maven_exe.maven_utf8_env / JVM_UTF8_FLAGS.

Sibling gaps: java_target_matrix.build runs gradle the same way (it now decodes as UTF-8 but the Gradle daemon JVM is not told its charset). Windows cp1252 behaviour not verified (Linux box).

No engine code changes, so no golden bless. pr_gates --fast 6/6; audit_check clear; targeted tests pass (53).

🤖 Generated with Claude Code

run_maven's surefire argLine and every mvn subprocess that captured text now name
their charset (MAVEN_OPTS via maven_utf8_env, encoding="utf-8"); the #5128 AST guard
covers mvn argv.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 15, 2026 02:22
@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 15, 2026 02:30
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5173 @ bc22b9f: 1 failed check(s)

== full-suite part 3/3 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38670632063/job/116212675392
repro: python -m pytest -q tests/test_source_reads.py::test_no_source_read_loses_a_byte
failing tests: tests/test_source_reads.py::test_no_source_read_loses_a_byte
errors:
fail-on-cache-miss: false
E AssertionError: #3813: decode through gitgalaxy.core.source_text (read_source / open_source / decode_bytes) instead of a lossy errors= handler or a text-mode read of an estate file:
tests/test_source_reads.py:137: AssertionError
FAILED tests/test_source_reads.py::test_no_source_read_loses_a_byte - AssertionError: #3813: decode through gitgalaxy.core.source_text (read_source / open_source / decode_bytes) instead of a lossy errors= handler or a text-mode read of an e
##[error]Process completed with exit code 1.
log tail:
SKIPPED [1] tests/tools/test_ctags_reader_qualify.py:75: ctags not on PATH
SKIPPED [1] tests/tools/test_cache_keys.py:62: owner-protected (#4935): hashes gitgalaxy/pyproject.toml alone
SKIPPED [2] tests/tools/test_cache_keys.py:62: owner-protected (#4935): hashes pyproject.toml alone
SKIPPED [1] tests/tools/test_evidence_report.py:60: #4703: per-PR CI is advisory (smoke-test.yml / full-suite-gate.yml print the level deltas); the evidence-refresh bot regenerates the reports on main and the release gate (publish.yml) runs
SKIPPED [1] tests/tools/test_pin_requirements.py:28: uv executable not installed in this environment
SKIPPED [1] tests/tools/test_pin_requirements.py:94: uv executable not installed in this environment
SKIPPED [1] tests/tools/test_unicode_gauntlet_vs_treesitter.py:52: keyword-rosetta corpus not available
XFAIL tests/extraction/languages/test_jcl.py::test_jcl_func_start_invalid[//SYSUDUMP DD DATA,DLM=$$\n//BAD EXEC PGM=X\n$$] - Known limitation: No block shielding for instream data in JCL
XFAIL tests/extraction/languages/test_jcl.py::test_jcl_class_start_invalid[//SYSIN DD \n//FAKE JOB 1\n/] - Known limitation: No block shielding for instream data in JCL
XFAIL tests/extraction/languages/test_zig.py::test_zig_args_invalid["fn (a: i32, b: i32)"] - Known limitation: No block shielding for args inside strings
XFAIL tests/extraction/languages/test_zig.py::test_zig_args_invalid[// fn (a: i32, b: i32)] - Known limitation: No block shielding for args inside comments
XPASS tests/extraction/languages/test_jcl.py::test_jcl_args_valid["//STEP1 EXEC PGM=PROG,PARM='THIS STRI"...len102-1d86da8b-"'THIS STRING CONTINUES "...len72-7c3fedb5] - Known limitation: Engine cannot parse JCL line con
XPASS tests/extraction/languages/test_jcl.py::test_jcl_dependency_invalid[//DD DATA \n INCLUDE MEMBER=NOPE \n/*] - Known limitation: No block shielding for instream data in JCL
XPASS tests/extraction/languages/test_jcl.py::test_jcl_dependency_invalid['//STEP1 EXEC PGM=PROG1 THIS COMMENT CO'...len69-d3e393cd] - Known limitation: Inline comments aren't stripped before dependency capture
FAILED tests/test_source_reads.py::test_no_source_read_loses_a_byte - AssertionError: #3813: decode through gitgalaxy.core.source_text (read_source / open_source / decode_bytes) instead of a lossy errors= handler or a text-mode read of an e
tests/cobol_mainframe/test_no_jcl_batch_controller.py:191 in test_the_generated_project_compiles() [lossy-errors]
tests/tools/cics_crucible.py:434 in maven() [lossy-errors]
tests/tools/equivalence_java.py:629 in run_maven() [lossy-errors]
tests/tools/java_target_matrix.py:232 in build() [lossy-errors]
tests/tools/mutation.py:305 in baseline_classpath() [lossy-errors]
tests/tools/scip_callgraph.py:484 in _run() [lossy-errors]
assert not [('tests/cobol_mainframe/test_no_jcl_batch_controller.py', 'test_the_generated_project_compiles', 'lossy-errors', 191)...tation.py', 'baseline_classpath', 'lossy-errors', 305), ('tests/tools/scip_callgraph.py', '_run', 'lossy-err
1 failed, 8090 passed, 20 skipped, 4 xfailed, 3 xpassed, 2 warnings in 627.04s (0:10:27)
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/fca60168-ecd9-4c54-bc43-218cdf6d082c' 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
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 15, 2026
… (Part of #5161)

Six Maven subprocess captures used text=True + errors="replace", which the
#3813 source-read gate rejects. maven_exe.run_decoded captures bytes and
decodes through gitgalaxy.core.source_text.decode_bytes; the timeout
handlers use decode_output. Tests cover UTF-8, BOM, cp1252 and empty/None.

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

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (12c6d92) 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 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 02:44
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 929dc49 into main Oct 15, 2026
56 checks passed
@squid-protocol
squid-protocol deleted the churn/5161-20261015T0120Z branch October 15, 2026 03:10
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 #5128: Maven-spawned JVM output decoded with the locale charset

1 participant