fix(scripts): route i18n formatter through pnpm runner#95534
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 1:06 PM ET / 17:06 UTC. Summary PR surface: Other +7. Total +7 across 1 file. Reproducibility: yes. I did not rerun Windows locally, but current main and Review metrics: none identified. 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. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused shared-formatter change after exact-head checks finish, keeping formatter command resolution owned by Do we have a high-confidence way to reproduce the issue? Yes. I did not rerun Windows locally, but current main and Is this the best way to solve the issue? Yes. Reusing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1cd6f81a46ae. Label changesLabel justifications:
Evidence reviewedPR surface: Other +7. Total +7 across 1 file. View PR surface stats
What 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
|
a123a0b to
68e97c8
Compare
|
Addressed the review finding by reusing the shared generated-module formatter instead of adding a parallel resolver, then reran the requested focused tests and pnpm ui:i18n:check. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
68e97c8 to
ae58239
Compare
Summary
control-ui-i18ngenerated TypeScript formatting through the sharedscripts/lib/format-generated-module.mjshelper.oxfmtplus pnpm-runner fallback path instead of spawning barepnpmfromcontrol-ui-i18n.What Problem This Solves
On Windows,
pnpm ui:i18n:checkcan fail during generated locale formatting withspawn pnpm ENOENTeven when pnpm is available through the usual.cmdshim. The script fell back to spawning barepnpm, bypassing the repository's existingscripts/pnpm-runner.mjsportability logic.The fix keeps generated formatter command resolution in the existing shared formatter helper, avoiding a second ownership path for
oxfmtand pnpm-runner behavior.Linked context
check-test-typesis red before fix(scripts): type windows taskkill helper #95527 merges, that is the separate missingwindows-taskkill.mjsdeclaration fixed by fix(scripts): type windows taskkill helper #95527, not this formatter runner change.Real behavior proof (required for external PRs)
control-ui-i18nformatting could reach a barespawn("pnpm", ...)fallback on Windows, causingspawn pnpm ENOENTinstead of using the repo's Windows-safe pnpm runner.F:\openclaw\worktrees\openclaw-control-ui-i18n-pnpm-runner, rebased onto currentorigin/main, hydrated withpnpm install --frozen-lockfile.pnpm ui:i18n:checkfa: clean (fallbacks=0), withoutspawn pnpm ENOENT..cmdexecution through the repo pnpm runner.control-ui-i18nprocess behavior and the sharedformat-generated-moduleWindows pnpm-runner contract; the real command validates the end-to-end i18n check on Windows.spawn pnpm ENOENT.Evidence
After this patch,
pnpm ui:i18n:checkcompletes on Windows:The focused test run also includes
test/scripts/format-generated-module.test.ts, whose Windows pnpm-runner coverage asserts the formatter resolves throughcmd.exe /d /s /c ... pnpm.cmd exec oxfmt ...withwindowsVerbatimArgumentsenabled.Tests and validation
node scripts/run-vitest.mjs test/scripts/control-ui-i18n.test.ts test/scripts/format-generated-module.test.tspnpm ui:i18n:checkgit diff --checkRisk checklist
node_modules/.bin/oxfmtexists.Current review state
Ready for ClawSweeper re-review and maintainer review. If type CI is still blocked by the current-main
windows-taskkill.mjsdeclaration gap, rebase after #95527 merges rather than duplicating that declaration in this PR.