Repository navigation
Conversation
The shipped text-I/O guard fails on main for this line, and the shard lane
reports it on every branch:
tests/test_loopx_text_io_utf8.py::test_shipped_runtime_pins_utf8_for_every_text_file_read_and_write
E Left contains one more item: 'loopx/capabilities/benchmark_toolkit/native_codex_process.py:71'
Path.read_text() without a codec uses the process locale, which is exactly the
shape the guard exists to reject. Pin the codec the runtime already uses
everywhere else.
The failure semantics do not change: a process name that is not valid UTF-8
raises UnicodeDecodeError, which is a ValueError, and the existing
except (OSError, ValueError, IndexError) already leaves the start identity
unknown.
Signed-off-by: xiaoan17 <anbc1224@gmail.com>
xiaoan17
requested review from
huangruiteng,
loopx-agent and
songoow
as code owners
October 31, 2026 02:08
Contributor
Author
The one red check is a main-side flake, not this change
That is not this branch's code. The same smoke fails the same way on Other branches' runs of the same lane succeed, so the smoke is intermittent in The change in this branch is a single codec argument on a |
huangruiteng
added a commit
that referenced
this pull request
Oct 31, 2026
Signed-off-by: huangruiteng <huangrt01@163.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal and source
mainis red on the sharedtest-shardlane for a reason that has nothing todo with the runtime path: the repository's own text-I/O guard fails
deterministically.
The guard is the acceptance for the #4941 locale bug: every text-mode read or
write in the shipped runtime has to pin UTF-8 explicitly, because an implicit
locale codec reopens that failure. The offending line arrived with the native
process evidence work (#7707, merged as
04c5799b8):Path.read_text()without a codec uses the process locale, so this read isexactly the shape the guard exists to reject. The same shard lane reports it
on every branch, including
main, which is why the repository's shard runsare red for everyone at the moment.
The change
One line, pinning the codec the repository already uses everywhere else:
The failure semantics do not change: a process name that is not valid UTF-8
raises
UnicodeDecodeError, which is aValueError, and the existingexcept (OSError, ValueError, IndexError)already swallows it and leaves thestart identity unknown — the same outcome the implicit locale codec produced
for a non-UTF-8 locale.
Validation
The guard is the acceptance; no new test is needed, and no other file changes.
Boundary
This changes one call in one file and no behaviour, budget, protocol or state.
It is a repair of the acceptance that
maincurrently fails, so everybranch's shard lane stops carrying that failure. It does not touch the two
other failures observed in the same shard runs
(
test_dashboard_launcher_selects_*andtest_native_restart_uses_real_accepted_work_fence_before_app_quit), whichare environment and native-host failures in their own lanes.