Skip to content

feat(i18n): refresh all native locale artifacts#97113

Merged
vincentkoc merged 20 commits into
mainfrom
codex/i18n-native-refresh
Jul 1, 2026
Merged

feat(i18n): refresh all native locale artifacts#97113
vincentkoc merged 20 commits into
mainfrom
codex/i18n-native-refresh

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jun 26, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Native app locale work needs the same provider-backed translation process as Control UI, not a separate manual path or a Russian/Hindi-only workflow.

Why This Change Was Made

Reuse the existing translation client, provider/model environment, glossary prompt, batching, retries, and authenticated CI commit/rebase loop for the complete 21-locale native matrix. The workflow refreshes deterministic translation-memory artifacts under apps/.i18n/native whenever Android or Apple source changes and correctly commits first-run artifacts.

Argument validation happens before writes, placeholder signatures preserve counts while allowing grammatical reordering, and Swedish uses the same protected-brand glossary process as the other locales.

User Impact

Native inventory changes are translated through the Control UI process for Simplified Chinese, Traditional Chinese, Brazilian Portuguese, German, Spanish, Japanese, Korean, French, Hindi, Arabic, Italian, Turkish, Ukrainian, Indonesian, Polish, Thai, Vietnamese, Dutch, Persian, Russian, and Swedish.

Evidence

  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts test/scripts/native-app-i18n.test.ts (35 tests)
  • node --import tsx scripts/native-app-i18n.ts check (2,318 entries)
  • Workflow matrix: 21 locales, max-parallel: 2, authenticated fetch/rebase/push retry loop
  • git diff --check
  • Fresh autoreview: no accepted/actionable findings

This PR is stacked on #97110.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Jun 26, 2026
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 1, 2026, 8:57 AM ET / 12:57 UTC.

Summary
The branch adds a main-only native app locale refresh workflow, extends native i18n tooling to translate and persist per-locale artifacts through the Control UI translation client, adds Swedish glossary data, and expands workflow/native i18n tests.

PR surface: Source +42, Tests +168, Config +121, Other +209. Total +540 across 6 files.

Reproducibility: not applicable. for the requested feature: this is new maintainer native i18n automation rather than a reported current-main bug. The patch defect is reproducible from CI: checks-node-compact-small-whole-2 fails the top-level temp-dir helper routing guard after the new test import.

Review metrics: 1 noteworthy metric.

  • Write-Capable Workflow: 1 added with contents: write. The new workflow can push generated native locale artifacts to the default branch, so maintainers should review its trigger, permission, and retry model before merge.

Stored data model
Persistent data-model change detected: persistent cache schema: scripts/control-ui-i18n.ts, serialized state: test/scripts/native-app-i18n.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix the test-helper routing failure introduced by the new temp-dir helper import.
  • [P2] Get explicit maintainer acceptance of the contents-write native locale refresh workflow before merge.

Risk before merge

  • [P1] The current head has a concrete failing CI check because the new shared temp-dir helper import changes test-helper routing without updating the expected route plan.
  • [P1] The new native locale refresh workflow uses translation-provider secrets plus contents: write to push generated artifacts to main, so maintainers need to explicitly accept that automation model before merge.

Maintainer options:

  1. Repair Routing, Then Review Workflow (recommended)
    Update the changed-test routing expectation or avoid the shared helper import so CI is green, then have maintainers explicitly review the guarded contents-write native refresh workflow.
  2. Accept The Write-Capable Refresh
    Maintainers can intentionally accept the main-only workflow after reviewing its provider-secret use, artifact push loop, and retry behavior.
  3. Pause Native Auto-Refresh
    If the repository-writing workflow is not worth the operational surface yet, pause or close this PR and keep native artifact refreshes manual until the operating model is settled.

Next step before merge

  • [P2] A narrow automated repair can address the failing test-helper routing guard, while workflow acceptance remains a maintainer decision.

Security
Cleared: The workflow is security-sensitive because it uses provider secrets and contents-write, but the reviewed triggers are main-repo/main-branch guarded and no concrete secret exposure or untrusted-code execution defect was found.

Review findings

  • [P2] Update the helper routing guard — test/scripts/native-app-i18n.test.ts:11
Review details

Best possible solution:

Land the native refresh workflow only after the test-routing guard is repaired and maintainers explicitly accept the guarded contents-write artifact refresh model.

Do we have a high-confidence way to reproduce the issue?

Not applicable for the requested feature: this is new maintainer native i18n automation rather than a reported current-main bug. The patch defect is reproducible from CI: checks-node-compact-small-whole-2 fails the top-level temp-dir helper routing guard after the new test import.

Is this the best way to solve the issue?

No, not merge-ready as-is. Reusing the Control UI translation path is a reasonable owner-boundary shape, but the PR needs the test-routing repair plus maintainer acceptance of the contents-write workflow before it is the best merge path.

Full review comments:

  • [P2] Update the helper routing guard — test/scripts/native-app-i18n.test.ts:11
    This import makes test/scripts/native-app-i18n.test.ts an affected importer of test/helpers/temp-dir.ts, but the expected route list in src/scripts/test-projects.test.ts was not updated. The current CI run fails routes top-level test helpers to importing repo tests; either include this test in the expected tooling route or avoid the shared helper import here.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5e4d71686a6a.

Label changes

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor real behavior proof gate does not apply because this is a MEMBER-authored PR; the PR body and comments provide command-level validation summaries.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is normal-priority native i18n workflow/tooling work with a CI blocker and limited user-facing blast radius.
  • merge-risk: 🚨 automation: The diff adds a GitHub Actions workflow that uses provider secrets and pushes generated locale artifacts back to the default branch.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor real behavior proof gate does not apply because this is a MEMBER-authored PR; the PR body and comments provide command-level validation summaries.
Evidence reviewed

PR surface:

Source +42, Tests +168, Config +121, Other +209. Total +540 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 42 0 +42
Tests 2 169 1 +168
Docs 0 0 0 0
Config 1 121 0 +121
Generated 0 0 0 0
Other 2 214 5 +209
Total 6 546 6 +540

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/scripts/test-projects.test.ts test/scripts/native-app-i18n.test.ts test/scripts/ci-workflow-guards.test.ts.
  • [P1] node --import tsx scripts/native-app-i18n.ts check.
  • [P1] git diff --check.

What I checked:

  • Repository policy applied: Root AGENTS.md and scoped scripts, test, test/helpers, and UI guides were read; the applicable guidance affected the review through protected maintainer handling, generated i18n artifact alignment, and automation-risk surfacing for workflow changes. (AGENTS.md:1, 5e4d71686a6a)
  • Live PR state: Live GitHub reports the PR as open, MERGEABLE but UNSTABLE at head 9e1cf3b, with one failing CI check: checks-node-compact-small-whole-2. (9e1cf3b46e5f)
  • Blocking CI failure: The failing CI job reports src/scripts/test-projects.test.ts > routes top-level test helpers to importing repo tests, which matches the PR's new import of test/helpers/temp-dir from test/scripts/native-app-i18n.test.ts without updating the expected routing plan. (src/scripts/test-projects.test.ts:856, 5e4d71686a6a)
  • Changed test-helper dependency: The PR changes test/scripts/native-app-i18n.test.ts to import the shared temp-dir helper, making the top-level helper routing expectation need an update or a different local cleanup strategy. (test/scripts/native-app-i18n.test.ts:11, 9e1cf3b46e5f)
  • Write-capable workflow: The added workflow runs on main, grants contents: write, checks provider secrets, translates 21 locales, and commits/pushes apps/.i18n/native artifacts back to the default branch with fetch/rebase retry logic. (.github/workflows/native-app-locale-refresh.yml:20, 9e1cf3b46e5f)
  • Native refresh implementation: The PR head adds syncNativeLocale, per-locale JSON artifact rendering, placeholder/line-break validation, and command parsing for sync --write --locale. (scripts/native-app-i18n.ts:918, 9e1cf3b46e5f)

Likely related people:

  • vincentkoc: Recent main history shows vincentkoc authored the native i18n inventory, Android/Apple localization stack, native i18n CI routing, and the current PR head. (role: recent native i18n feature owner; confidence: high; commits: 6497c3ca1b7b, 9eae0b4d3883, a53b6823c631; files: scripts/native-app-i18n.ts, .github/workflows/native-app-locale-refresh.yml, test/scripts/native-app-i18n.test.ts)
  • xialonglee: The recent shared temp-dir helper migration updated src/scripts/test-projects.test.ts routing expectations, which is the guard now failing after this PR imports the helper from native-app-i18n.test.ts. (role: recent test-helper routing contributor; confidence: medium; commits: b9ae0a76fa0c; files: src/scripts/test-projects.test.ts, test/helpers/temp-dir.ts)
  • steipete: History shows steipete touched the Control UI i18n docs/script area that this PR reuses as the native translation client and workflow model. (role: adjacent Control UI i18n owner; confidence: medium; commits: b311fd607f6c, b8d08f0cfd0c; files: scripts/control-ui-i18n.ts, ui/AGENTS.md, test/helpers/temp-dir.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 26, 2026
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-pipeline branch from a4df614 to ab24f11 Compare June 26, 2026 23:51
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from b5f5005 to 1db1647 Compare June 26, 2026 23:52
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-pipeline branch from ab24f11 to 1545198 Compare June 26, 2026 23:55
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from 1db1647 to f29aade Compare June 26, 2026 23:56
@vincentkoc vincentkoc changed the title feat(i18n): refresh native locale artifacts feat(i18n): refresh all native locale artifacts Jun 26, 2026
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from f29aade to 99b9d20 Compare June 27, 2026 00:03
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from 182a399 to f7b80e1 Compare June 27, 2026 00:09
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 27, 2026
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from f7b80e1 to d425288 Compare June 27, 2026 00:13
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 27, 2026
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from d425288 to c643026 Compare June 27, 2026 00:17
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from c643026 to b2296f6 Compare June 27, 2026 00:22
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 27, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 1, 2026
@vincentkoc
vincentkoc force-pushed the codex/i18n-native-refresh branch from 29ef192 to 1ec0ae5 Compare July 1, 2026 13:04
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof for 1ec0ae59e3c4e03152dff023142b8d1669986ca7:

  • Preserves the full 20-commit stack; no squash.
  • Final scope is 8 files: shared native translation-memory refresh, glossary-hash invalidation, placeholder validation, Swedish glossary coverage, test-project routing, and bot-safe concurrency for both locale refresh workflows.
  • Exact-head CI run 28519644155: 68 successful, 29 skipped, 0 failed. The changed-surface native-i18n, workflow sanity, Blacksmith Testbox/ARM, build artifacts, QA smoke, lint, type, guard, and compact test lanes all passed.
  • Local proof: all four i18n integrity checks; 161 focused changed-surface tests; latest regression pass 122 passed / 2 skipped; actionlint v1.7.11 for both locale workflows; targeted oxfmt, oxlint, and git diff --check.
  • Fresh autoreview is clean with no accepted/actionable findings.

Earlier CI attempts exposed one transient gateway startup timeout and a stale shared-temp-dir routing expectation. The timeout cleared on rerun; the routing expectation and its native sibling are fixed in this stack.

@vincentkoc
vincentkoc merged commit be2c4c6 into main Jul 1, 2026
99 checks passed
@vincentkoc
vincentkoc deleted the codex/i18n-native-refresh branch July 1, 2026 13:16
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant