You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Test suites assert hardcoded English strings and fail on non-English locales #440
pnpm verify fails at test:capabilities on any machine whose locale is not English. The failures are not caused by the code under test: they are assertions that compare against hardcoded English strings while the product returns a localized string.
The last one is worth separating out, because it is not caused by any local change — it reproduces on upstream main unmodified:
$ git checkout upstream/main
$ npx vitest run packages/tui/test/unit/tui-status-line-items.test.ts
AssertionError: expected '\n轻量模式 │ ~/repo │ ◇ Ship status line …' to contain 'Lightweight'
Test Files 1 failed (1)
Tests 1 failed | 94 passed (95)
The assertion expects Lightweight; the status line renders 轻量模式. This one arrived with #436 (opt-in lightweight context mode).
Why CI does not catch it
The Source verification workflow runs in an English locale, so every one of these assertions passes there. A contributor working in any other locale cannot get a green local pnpm verify, which makes it impossible to tell whether a change they made broke something.
Suggested direction
I am not certain of the intended fix, so I would rather report the symptom than guess. Two options that look reasonable:
Assert on a locale-independent key (an i18n message id) instead of the rendered string.
Pin the locale for the affected suites, so they test one language deliberately rather than inheriting the developer's.
Either is fine with me — I mainly wanted to flag that the current state makes local verification unusable outside English.
Activity