Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe PR limits three non-English translation assertions to locales with generated translation memory, allowing source-only locale contributions to pass validation during their intentional English bootstrap period. Review scores
Merge readiness✅ Ready for maintainer review This PR remains useful: current main and the latest release still contradict the documented source-only locale contribution flow. No actionable patch defect remains, and the updated terminal evidence addresses the earlier proof request. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI localization loads registered language catalogs through Vite, using English until generated translation memory arrives. These tests check the loaded catalogs before locale contributions can merge. flowchart TD
A[Registered locales] --> B[Vite locale loader]
C[Translation memory] --> B
B --> D[Loaded catalogs]
D --> E[Memory file present]
E -->|Yes| F[Localized text assertions]
E -->|No| G[Bootstrap loading checks]
Technical reviewBest possible solution: Keep bootstrap locales loadable and automatically restore all localized-text assertions when their generated memory arrives. Do we have a high-confidence way to reproduce the issue? Yes: registering a locale without memory makes the production loader return English, necessarily failing the current three non-English assertions. Contributor before/after output demonstrates that scenario; this read-only review did not execute it. Is this the best way to solve the issue? Yes: matching assertion scope to the loader’s existing absent-memory boundary preserves generated-locale checks without changing runtime behavior or adding permanent locale exemptions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ee88721f043. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +12. Total +12 across 1 file. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 2, 2026, 6:35 AM ET / 10:35 UTC (Revision 4). |
…k invariants The shipped-locale invariants in translate.test.ts started deriving their locale sweep from SUPPORTED_LOCALES (openclaw#159292), which accidentally broke the source-only locale flow from openclaw#131015: a locale registered before the post-merge control-ui-locale-refresh workflow commits its translation memory intentionally bootstraps from English copy, so the three "localized in shipped locale bundles" tests fail for it. Hold only locales with committed <locale>.tm.jsonl memory to those invariants. The exemption derives from the memory file's presence, so it retires itself once the refresh workflow lands translations and cannot hide a regression for any memory-backed locale. Unblocks the Catalan locale PR (openclaw#139033).
34535e2 to
6762826
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Same change as openclaw#163442. Hebrew ships without translation memory until the post-merge locale refresh, so its catalog intentionally falls back to English. Co-authored-by: Jesús Corrius <[email protected]>
Same change as openclaw#163442 (same author); drops out on rebase if openclaw#163442 merges first. Source-only locales bootstrap from English until the post-merge locale refresh commits their translation memory, so the English-inequality invariants cannot hold for them yet.
What Problem This Solves
A locale registered without committed translation memory fails the three "localized in shipped locale bundles" invariants in
ui/src/i18n/test/translate.test.ts, so any source-only locale contribution PR is red onchecks-uibefore the post-merge refresh can generate its translations.Why This Change Was Made
#131015 established the source-only locale flow: a locale contribution registers its adapter and wiring in a source PR, and the serialized
control-ui-locale-refreshworkflow commits generated translation memory (<locale>.tm.jsonl) only after merge. Until then,ui/config/control-ui-locales.tsintentionally serves the English catalog for that locale ("Source PRs omit generated memory until the post-merge refresh runs").#159292 later derived the invariant tests' locale sweep from
SUPPORTED_LOCALES(replacing the explicit locale lists). That sweep now automatically includes newly registered locales, so the invariants fire against the intentional English bootstrap copy and contradict the #131015 flow. No locale has been added since, so the conflict only surfaces now (first exercised by the Catalan locale PR #139033).Summary of changes
ui/src/i18n/test/translate.test.ts: derive amemoryBackedLocalessubset from the presence of committedui/src/i18n/.i18n/<locale>.tm.jsonland iterate it instead ofshippedLocalesin the three English-fallback invariants (login failure guidance, mobile pairing copy, chat composer attachment action).The exemption is derived, not listed: once the refresh workflow lands a locale's memory, that locale is automatically subject to the full invariants again, so the change cannot hide a regression for any memory-backed locale. On current
mainthe subset equals the full set (all 20 locales have memory), so this change is a verified no-op today and only affects future source-only locale PRs.User Impact
None directly. Test scoping only; no runtime behavior changes.
Evidence
All runs below were executed on reviewed head
6762826418fthrough the production Vite locale loader (node scripts/run-vitest.mjs run --config ui/vitest.config.ts --project unit src/i18n/test/translate.test.ts), with the environment pinned viaPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHto the Playwright chromium headless shell. Full raw terminal transcripts (ANSI) are attached to the fork release proof-163442-bootstrap-invariants; all output is synthetic — no credentials, private endpoints, or personal data.mainstate: on the pristine reviewed head (no scratch locale),src/i18n/test/translate.test.ts+src/i18n/lib/registry.test.tspass 28/28 (8.85s). Transcript: 3-pristine-head.log.pnpm ui:i18n:verifypasses.Real behavior proof
The source-only locale contribution flow was exercised on the reviewed head by registering a memory-less
calocale through the real production path —ui/src/i18n/lib/registry.tslazy entry,scripts/lib/control-ui-i18n-config.jsonlocale entry, and thevirtual:openclaw-control-ui-locale/caadapter — with noca.tm.jsonl, exactly as the Catalan PR (#139033) ships it. The scratch registration was left uncommitted; only the test file differs between the two runs.Run 1 — without this patch (main's
translate.test.ts), scratch locale registeredThe three invariants fail against the intentional English bootstrap catalog, reproducing the #139033 CI failures verbatim. Transcript: 1-without-patch-scratch-locale.log
Run 2 — with this patch (reviewed head), same scratch locale registered
The same production load now passes; the memory-backed locales keep full invariant coverage. Transcript: 2-with-patch-scratch-locale.log
The scratch locale was then removed (
git statusclean) before Run 3 above, confirming the reviewed tree itself is unchanged.Unblocks #139033, whose
checks-uilane is otherwise red on exactly these three tests until its post-merge refresh lands.