[Bug]: test:release-tools fails on a Windows host with a non-English regional format, which blocks pnpm verify --profile windows
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- build-system, cli, testing
Research direction
Read the locale assertion in test/source-sync.test.mjs and the environment setup in scripts/run-vitest-suite.mjs. Run pnpm test:release-tools on Windows with a non-English regional format to reproduce the mismatch. Update the test's expected locale using a probe run in the pinned child environment, while keeping the four C assertions; done when the release tools test and Windows verification gate pass.
Written by the indexing model from the issue text.
Description
Labels requested: bug, needs-triage, cli
Product or interface
Source build or repository tooling
Version
- Source:
main@3c21163(repository version0.7.2), tagv0.7.2=c6c7f28 - Node.js v24.18.0, pnpm 9.12.0
Platform
Windows
OS version and architecture
Windows 11 x64 (build 26200), regional format de-DE
Issue area
Build / CI / source distribution
What happens
pnpm test:release-tools fails on a Windows host whose regional format is not en-US, and with it the whole pnpm verify --profile windows gate chain. The failure is invisible in CI because the hosted runners use an en-US regional format.
✖ suite runner pins its locale, preserves gate arguments and canonicalizes Windows temporary paths
+ actual - expected
+ locale: 'de-DE'
- locale: 'en-US'
Steps to reproduce
-
On a Windows host with a non-English regional format (this report: de-DE), run:
pnpm test:release-tools -
Observe the failure above (exit code 1).
For reference, the same command exits 0 on an en-US Windows host and on Linux/macOS.
Expected and actual behavior
- Expected: the gate passes on every host, because the test asserts what the runner is supposed to guarantee — that the suite runner pins the locale sources it controls.
- Actual: the assertion compares the resolved ICU locale against a hardcoded
'en-US', which on Windows is the host's regional format rather than something the runner controls.
Why this is not a locale-setting problem
The suite runner pins four locale sources before Vitest starts (scripts/run-vitest-suite.mjs):
environment.LANG = "C";
environment.LANGUAGE = "C";
environment.LC_ALL = "C";
environment.LC_MESSAGES = "C";
and the test spawns that runner with a deliberately hostile environment (zh_CN.UTF-8) and asserts the child reports 'C' for all four. That part of the assertion is correct and worth keeping.
The failing assertion is the fifth one:
locale: Intl.DateTimeFormat().resolvedOptions().locale
On Linux and macOS the C pins make ICU resolve to en-US. On Windows, ICU ignores the POSIX locale variables and follows the operating system's regional format — so the resolved locale is de-DE here, and no environment variable or Node flag changes it. I looked for one and did not find it: LANG, LANGUAGE, LC_ALL, LC_MESSAGES, LC_TIME, LC_NUMERIC, NODE_ICU_DATA, ICU_DATA, NODE_DEFAULT_LOCALE, --icu-data-dir and the V8 options all leave Intl.DateTimeFormat().resolvedOptions().locale at de-DE on this host.
So the current expectation cannot be satisfied on such a host, and the test's own comment — "Pin every locale source before Vitest starts" — overstates what the pins achieve on Windows.
Where it happens
test/source-sync.test.mjs— the assertion, in the test named "suite runner pins its locale, preserves gate arguments and canonicalizes Windows temporary paths".scripts/run-vitest-suite.mjs— the runner whose locale handling the test describes.
The test simulates three platforms by overriding process.platform in a preloaded module; the real ICU environment of the host stays in place, so the expectation happens to hold for all three simulated platforms on an en-US host and only for the POSIX ones elsewhere.
Suggested fix
Derive the expected locale from a probe that runs in the same pinned environment as the child process, instead of hardcoding 'en-US'. On POSIX the probe yields 'en-US' — the previous expectation — so the change is a no-op there. The four 'C' pin assertions stay untouched and keep their strictness.
A branch with the fix and a regression test is available: test/release-tools-locale-portability on Ralle1976/minimax-code, rebased onto main @ 3c21163 (commit 9c07d9e).
pnpm test:release-tools: exit 1 before, exit 0 after (55 passing, 0 failing, 2 skipped).pnpm verify --profile windows: 9 of 9 gates pass on this host after the change.- The pin assertions remain sharp: removing the pins makes the test fail again (
lang: 'zh_CN.UTF-8'instead of'C'), and restoring the hardcoded expectation makes it fail on this host as well.
Note on the environment
This host also has LongPathsEnabled enabled and a de-DE regional format, so the Windows-specific paths are exercised as a non-en-US contributor would see them. The hosted Windows runners use en-US, which is why CI does not surface this.
Before submitting
- I have searched existing issues.
- I have included my version and removed sensitive information.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 315
- Avg merge
- 3h 54m
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/minimax-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#639 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MiniMax-AI/minimax-code#636 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MiniMax-AI/minimax-code#556 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MiniMax-AI/minimax-code#507 ·
Maintainers usually reply within 1 day
-
bug needs-triage tui
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MiniMax-AI/minimax-code#481 · 1 comment ·
Maintainers usually reply within 1 day
All issues in MiniMax-AI/minimax-code
Similar issues
-
area:api bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Doezer/Questarr#1486 · 1 comment ·
Maintainers usually reply within 1 day
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Sergey-Bar/Penny#245 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mihazs/lazysh#3377 · 2 comments ·
Maintainers usually reply within 1 day
-
Approve the Cloudflare agent plugin for harness sessionsPossibly taken @joshtsch claimed this today. Openenhancement ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day