test(tools): pin timeline CLI encoding #15340
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15340"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-03T00:39:22Z.
What
Use an explicit UTF-8 subprocess transport in the timeline CLI tests. A child inheriting
PYTHONIOENCODING=utf-8emits UTF-8, whilesubprocess.run(text=True)decodes using the host code page. On CP1252 Windows, an output path containingétherefore becomeséand the existing directory-validation assertion fails.Copy the child environment with
PYTHONIOENCODING=utf-8and decode both captured streams as UTF-8. Add a real CLI regression checking Unicode path diagnostics with inherited UTF-8 and CP1252 settings. The production tool and its CLI behavior are unchanged.Related to the Python Unicode-TEMP failures reported in #13083; this does not close that issue's broader C++ temporary-stream report. Compared the actual patch of open #9258 at
e62a0f26040d95b8fb35200348ef4e8bfc5c01e0: its JSON BOM support and two separate tests do not implement or change this subprocess helper.Tested
Windows x86-64 / Python 3.12, host code page CP1252. Local commit
197cd5cfd218be3db4443ab3f29b90e10b014d99, tree870ed64a499db6134cac679a36eb29c76529c405, based on live-verified upstream main7feb37ee3e30e10139b483fb4df689d5b5b69ab8. Published heada9c2ae754c37a646ac6a45ce3779a6206ed13226has exactly this validated tree.test_output_directory_validationfails by assertion on pinned main with UnicodeTEMPand a UTF-8 child stream: the captured path is mojibake.tools.tests.test_pad_timelinesuite under normalTEMP/ inherited CP1252: 25 tests, 24 passed, one existing POSIX-permissions skip; no failures or errors.TEMPcontainingé/ inherited UTF-8: 25 tests, 24 passed, the same platform skip; no failures or errors. Both runs exercise the real subprocess and preserve existing alias/error/output checks.pr_overlap.pycomparison used the shared public REST snapshot and verified all 1,726 exact open PR heads against the live upstream base. The one shared-file candidate merges cleanly; no overlap or unverified branch was reported.Test-harness-only validation. No runtime build, title, GPU or hosted CI qualification is claimed.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T00:47:11Z.
Review: COMMENTED
Reviewed — no blocking findings
The exact-head test change passes its focused suite on Linux; the CP1252-specific failure is not reproduced here because this host's preferred encoding is UTF-8.
What I ran
Reviewed the one-file diff at head
a9c2ae754c37a646ac6a45ce3779a6206ed13226, based on7feb37ee3e30e10139b483fb4df689d5b5b69ab8. The current-base merge preview was clean. Environment: Debian Linux x86_64, Python 3.11.2, locale encoding UTF-8. The exact-head no-build precheck ran the full 25-test timeline suite and Python test-registration check. I did not build or compile.The author reports separate Windows x86-64 / Python 3.12 runs with CP1252, including a pre-change failure and a negative control; those results are not independent runs by me.
Results
Precheck table and unedited output
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 7feb37ee3e30e10139b483fb4df689d5b5b69ab8...a9c2ae754c37a646ac6a45ce3779a6206ed13226/usr/bin/python3 tools/check_conventions.py --base 7feb37ee3e30e10139b483fb4df689d5b5b69ab8 --head a9c2ae754c37a646ac6a45ce3779a6206ed13226 --title test(tools): pin timeline CLI encoding --body /tmp/anyps5-pr-precheck/15340-session-20261103/pr-body.mdNo changed source or public header under core/libs/prx.No changed Python implementation files./usr/bin/python3 -m unittest tools.tests.test_pad_timeline/usr/bin/python3 tools/check_test_registration.py --scripts/usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15340 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/15340-session-20261103/stackNo C/C++ implementation or test files changed./usr/bin/python3 /tmp/anyps5-pr-precheck/15340-session-20261103/head-a9c2ae754c37-ab1e31a3/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/15340-session-20261103/head-a9c2ae754c37-ab1e31a3 --json tools/tests/test_pad_timeline.pyA pass means every candidate failed by assertion on base; a failure means at least one did not discriminate or could not run. See per-test results.Exact-head unit-test output:
Base negative-control output:
The precheck recorded:
Convention output:
Test-registration output:
Locale output:
Hosted-check output:
Negative control
The base run does not exercise the reported CP1252 Windows mismatch. The author reports that the regression fails on Windows before this change; I did not reproduce that platform-specific result.
Findings
Blocking
None found in the reviewed test change.
Non-blocking
The negative control did not distinguish the change on this Linux UTF-8 host. The changed test explicitly normalizes the child encoding and captured decoding to UTF-8, and checks that the Unicode path survives in the diagnostic.
Sources
Not verified
I did not reproduce the Windows CP1252 failure or run the author's Windows test suite. Four hosted checks were pending at the final refresh.
To get this to a good state
No code change is requested from this review. I will recheck the exact head after the pending hosted checks complete; the Windows CP1252 result remains author-reported.