Fix locale-sensitive Windows tests and technical token formatting - #785
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 20, 2026, 4:08 PM ET / 20:08 UTC. Summary Reproducibility: yes. Source inspection shows current main uses culture-sensitive count formatting and English suffix assertions for localized Windows folders, and the contributor supplied current-head Portuguese Windows validation. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this narrowed locale/test baseline if maintainer review agrees, then rebase and review the MXC runtime-policy and Gateway-proof follow-up PRs separately. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main uses culture-sensitive count formatting and English suffix assertions for localized Windows folders, and the contributor supplied current-head Portuguese Windows validation. Is this the best way to solve the issue? Yes. The narrowed PR fixes the behavior at the right boundary by using invariant formatting, OS-resolved folder expectations, and test serialization without changing MXC runtime policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c0514bd2d026. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Status update after latest push (debafff):
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Current-head validation was repeated for Scope:
Validation:
Note:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Correction and current-head proof for PR1. I previously posted a re-review request for the stale PR1 head
What changed since
Current-head validation on Windows Release Preview 25H2 build
Safe claim:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
a81719b to
0555bfa
Compare
|
@clawsweeper re-review PR1 was narrowed again in response to the previous review's merge-risk note. What changed:
Current PR1 head:
Current-head validation on Windows Release Preview 25H2 build
Safe claim:
|
Tracking issue: #784
Summary
This PR makes a small set of Windows test/formatting paths safe on localized Windows installations:
InvariantCulture, so regional decimal separators do not change test-facing output.AppVersionInfo.TestOverride, includingWindowsNodeClientTests, to avoid parallel shared-state races.This is PR1 in the Windows 25H2 / MXC validation tracking issue. It is independent from the MXC runtime enablement PR and can be reviewed separately.
Why
On a Portuguese Windows setup, known folders can resolve to localized or redirected locations such as
DocumentosandAmbiente de Trabalho. The previous tests assumed English path suffixes likeDocuments,Desktop, orDownloads, which makes otherwise correct behavior look broken on localized Windows.The compact token count formatter also used current-culture numeric formatting. That can produce comma decimals such as
15,3Kin locales where the technical/test contract expects stable dot-decimal output.Changed Files
src/OpenClaw.Tray.WinUI/Chat/ChatUsageFormatter.cstests/Directory.Build.propstests/OpenClaw.Shared.Tests/AppVersionInfoTestCollection.cstests/OpenClaw.Shared.Tests/AppVersionInfoTests.cstests/OpenClaw.Shared.Tests/Mxc/MxcPolicyBuilderTests.cstests/OpenClaw.Shared.Tests/WindowsNodeClientTests.csValidation
Current-head validation was repeated for commit
0555bfa52c0de1d6b88055260d24995d2c2b7782on Windows Release Preview 25H2 build26200.8728, Portuguese Windows locale:./build.ps1: passed; all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: passed;2262passed,29skipped,0failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: passed;1088passed,0skipped,0failed.openclaw-autoreview --mode branch --base upstream/main --engine codex --model gpt-5.5 --thinking high: clean; no accepted/actionable findings; overallpatch is correct (0.86).Validation note: this was run in a fresh worktree at the exact PR head. The first
--no-restoretest command hit the repository-documented first-runproject.assets.jsongotcha, so the test projects were restored and the full required validation sequence was repeated.Notes
This PR intentionally does not change MXC availability,
system.run, Gateway pairing, WSL Gateway setup, release versioning, build automation, validation helper scripts, or installed Companion behavior.The MXC runtime and Gateway proof are split into #786 and #787. This PR remains only the locale/test baseline and intentionally does not claim MXC runtime behavior.