Repository navigation
Make two script tests independent of the host language - #724
luisleo526 wants to merge 1 commit into
Conversation
test_cmake_version_source and test_check_doc_reverts compare git's own
English messages ("No names found", "CONFLICT (content)"). On a host whose
locale is not English, git answers in that language, so both tests failed
there (seen on an arm64 box running zh_TW.UTF-8) although the code under
test was fine and the same binaries pass under an English locale.
Each test now runs its git subprocesses with LC_ALL=C: the version-source
test through its shared git environment, the doc-reverts test in the merge
helper that reads the conflict message. No assertion changed or loosened;
only the language git speaks is pinned.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Pins LC_ALL=C for the git subprocesses in the doc-revert and CMake version-source tests, so they stop depending on the host locale. Both suites assert on git's English output (CONFLICT (content) and No names found), so a non-English locale would make them fail even when the code under test is fine.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 86 functions depend on the 86 functions this change touches.
Health — grade A; no new coupling hotspots.
Verification — 86 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 86 function(s) in the blast radius were not formally verified this run
What
scripts/test_cmake_version_source.pyandscripts/test_check_doc_reverts.pyassert on git's own English messages (No names found,CONFLICT (content)). On a machine whose locale is not English, git answers in that language and both tests fail, although the code under test is fine.This change pins the message language for the git subprocesses these two tests read:
test_cmake_version_source.py:LC_ALL=Cin the sharedgit_env()helper (3 lines).test_check_doc_reverts.py:LC_ALL=Cin the merge helperconflict_with_mainwhose output is matched (3 lines).No assertion is changed, loosened or skipped; only the language git speaks is fixed.
How it was found
A full Debug and Release
ci_verifyrun on an arm64 machine withLANG=zh_TW.UTF-8failed exactly these two tests (test_cmake_version_source,test_doc_reverts, five sub-cases) and nothing else. The same binaries pass underLC_ALL=C.Proof (red first, then green)
Run on that arm64 machine (git 2.43.0, cmake 3.28.3), each script run directly with only
LANGset (LC_ALLunset):LANGtest_cmake_version_sourcetest_check_doc_revertszh_TW.UTF-8'No names found' not found in 'fatal: 沒有發現名稱…''CONFLICT (content)' not found in '…衝突(內容)…'en_US.UTF-8Czh_TW.UTF-8en_US.UTF-8CRisk
Test-only; two scripts, six added lines, one changed line. Nothing under
src/ortests/(C++) is touched.🤖 Generated with Claude Code