Skip to content

fix(docs): continue partial i18n batches after file errors#91642

Merged
clawsweeper[bot] merged 4 commits into
mainfrom
codex/docs-i18n-allow-partial-continue
Jun 9, 2026
Merged

fix(docs): continue partial i18n batches after file errors#91642
clawsweeper[bot] merged 4 commits into
mainfrom
codex/docs-i18n-allow-partial-continue

Conversation

@hxy91819

@hxy91819 hxy91819 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix doc-mode --allow-partial so a per-file translation failure does not cancel the remaining docs queue.
  • Keep the failed file unwritten, continue writing later successful localized docs, and preserve fail-fast behavior when --allow-partial is disabled.
  • Preserve run-cancellation semantics: if the run context is canceled, --allow-partial still stops instead of continuing through the rest of the queue.

Root Cause

--allow-partial only allowed already-written outputs to survive a later error. If a body translation failed early in the ordered docs list, sequential mode returned immediately and parallel mode canceled the worker context, so unrelated later docs never had a chance to regenerate.

This matches the recent docs CI symptom: Translate All run https://github.com/openclaw/docs/actions/runs/27182895507 used the frontmatter fallback fix from #91578, then zh-CN hit body translate failed for agent-runtime-architecture.md, finished with processed=0, and never reached channels/line.md. The publish repo therefore kept the stale localized LINE page even though the glossary and source sync were current.

Verification

  • Temporarily reverted the implementation change while keeping the new tests; the new allow-partial continuation tests failed on the old behavior with processed=0.
  • cd scripts/docs-i18n && go test . -count=1 -run 'TestRunDocsI18NAllowPartial|TestRunDocsI18NRewritesLineTitle'
  • cd scripts/docs-i18n && go test . -count=1
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local clean after fixing the cancellation finding

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

clawsweeper Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed. Reviewed June 9, 2026, 4:10 AM ET / 08:10 UTC.

Summary
This PR passes the existing docs-i18n --allow-partial flag into sequential and parallel doc-mode scheduling, preserves cancellation as terminal, adds regression tests, and removes one non-null assertion in Microsoft Foundry onboarding.

PR surface: Source 0, Other +286. Total +286 across 3 files.

Reproducibility: yes. at source level: current main returns from sequential doc mode on the first processFileDoc error and cancels parallel workers on any file error, so an early failed doc can prevent later docs from regenerating despite --allow-partial. I did not run Go tests because this review is read-only, but the PR adds direct regression cases for that path.

Review metrics: 1 noteworthy metric.

  • Existing flag behavior: 1 existing docs-i18n flag behavior changed. --allow-partial now continues later doc-mode files after per-file translation errors, which is the intended docs-publish automation behavior maintainers should notice before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Next step before merge

  • No ClawSweeper repair job is needed because there are no actionable patch findings; the remaining action is normal automerge or maintainer merge gating.

Security
Cleared: No concrete security or supply-chain concern found; the diff changes Go docs tooling control flow/tests and one TypeScript assertion, with no workflow, dependency, secret, or package-source changes.

Review details

Best possible solution:

Land the scheduler change through the normal automerge and CI gates at the exact head, keeping --allow-partial as the opt-in behavior and preserving cancellation as terminal.

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

Yes at source level: current main returns from sequential doc mode on the first processFileDoc error and cancels parallel workers on any file error, so an early failed doc can prevent later docs from regenerating despite --allow-partial. I did not run Go tests because this review is read-only, but the PR adds direct regression cases for that path.

Is this the best way to solve the issue?

Yes; passing the existing flag into the two doc schedulers and centralizing the stop predicate is the narrow owner-boundary fix. Moving this into processFileDoc or postprocessing would not control queue continuation or cancellation semantics.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against c5171625369e.

Label changes

Label justifications:

  • P2: This is a normal-priority bugfix for the docs i18n publish tooling with limited blast radius and focused regression coverage.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Not applicable: The external contributor proof gate does not apply to this maintainer-labeled member PR; the body lists focused Go tests, full docs-i18n tests, diff check, and local autoreview evidence.
Evidence reviewed

PR surface:

Source 0, Other +286. Total +286 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 294 8 +286
Total 3 295 9 +286

What I checked:

  • Repository policy read: Root AGENTS.md plus scoped scripts, docs, and extensions guides were read; their review-scope, scripts-wrapper, docs-i18n, and extension-boundary guidance shaped the review. (AGENTS.md:1, c5171625369e)
  • Current-main behavior: Current main does not pass allowPartial into the doc schedulers, sequential mode returns on the first processFileDoc error, and parallel mode cancels on any file error. (scripts/docs-i18n/main.go:204, c5171625369e)
  • PR implementation: The PR head passes cfg.allowPartial into both doc schedulers, records the first non-terminal file error, continues later docs, and keeps context cancellation/deadline errors terminal. (scripts/docs-i18n/main.go:209, b66c0983b494)
  • Regression tests: The added tests cover later sequential success after an early failed doc, queued/in-flight parallel success after a failed doc, and cancellation remaining terminal with allowPartial=true. (scripts/docs-i18n/main_test.go:256, b66c0983b494)
  • Callee boundary: processFileDoc writes only after frontmatter and body translation both succeed, so continuing the scheduler leaves the failed file unwritten while later successful files can be emitted. (scripts/docs-i18n/doc_mode.go:59, b66c0983b494)
  • Codex contract check: The PR does not change Codex CLI invocation; dependency inspection confirmed codex exec still exposes --output-last-message, --skip-git-repo-check, and --ignore-rules, matching the existing translator integration shape. (../codex/codex-rs/exec/src/cli.rs:26, 14660c22d143)

Likely related people:

  • hxy91819: The related merged frontmatter resilience PR was authored by this GitHub user and touched the same docs-i18n translator/test area immediately before this follow-up. (role: recent docs-i18n contributor; confidence: high; commits: 162957565a3f; files: scripts/docs-i18n/main_test.go, scripts/docs-i18n/process.go, scripts/docs-i18n/translator.go)
  • Ayaan Zaidi: Blame attributes the current run-loop, sequential fail-fast path, and parallel cancellation path to the commit that introduced the docs-i18n script files in this checkout history. (role: introduced docs-i18n scheduler behavior; confidence: medium; commits: aa935ddeb23f; files: scripts/docs-i18n/main.go, scripts/docs-i18n/doc_mode.go, scripts/docs-i18n/doc_chunked_raw.go)
  • Vincent Koc: The incidental Microsoft Foundry line sits inside recent Foundry deployment filtering work attributed to this commit. (role: recent Foundry adjacent contributor; confidence: medium; commits: 1240de7588d4; files: extensions/microsoft-foundry/onboard.ts, extensions/microsoft-foundry/shared.ts, extensions/microsoft-foundry/index.test.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: 🐚 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. P2 Normal backlog priority with limited blast radius. labels Jun 9, 2026
@hxy91819

hxy91819 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper automerge

@clawsweeper

clawsweeper Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=b66c0983b4943eebbfc09d911dfe02051f1637d4)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-06-09T08:10:54Z
Merge commit: 257b251e2690

What merged:

  • This PR passes the existing docs-i18n --allow-partial flag into sequential and parallel doc-mode schedulin ... ion as terminal, adds regression tests, and removes one non-null assertion in Microsoft Foundry onboarding.
  • PR surface: Source 0, Other +286. Total +286 across 3 files.
  • Reproducibility: yes. at source level: current main returns from sequential doc mode on the first `processFi ... d not run Go tests because this review is read-only, but the PR adds direct regression cases for that path.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix(docs): continue partial i18n batches after file errors
  • PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-9164…

The automerge loop is complete.

Automerge progress:

  • 2026-06-09 07:25:00 UTC review queued 099006e24a5f (after repair)
  • 2026-06-09 07:35:19 UTC review passed 099006e24a5f (structured ClawSweeper verdict: pass (sha=099006e24a5f81798ef4bc3f9bbf9a10ad0f0...)
  • 2026-06-09 08:00:14 UTC review queued b66c0983b494 (after repair)
  • 2026-06-09 08:10:37 UTC review passed b66c0983b494 (structured ClawSweeper verdict: pass (sha=b66c0983b4943eebbfc09d911dfe02051f163...)
  • 2026-06-09 08:10:57 UTC merged b66c0983b494 (merged by ClawSweeper automerge)

@clawsweeper clawsweeper Bot added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label Jun 9, 2026
@clawsweeper clawsweeper Bot force-pushed the codex/docs-i18n-allow-partial-continue branch from 8abebcb to 099006e Compare June 9, 2026 07:25
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. 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 9, 2026
@clawsweeper clawsweeper Bot force-pushed the codex/docs-i18n-allow-partial-continue branch from 099006e to b66c098 Compare June 9, 2026 08:00
@clawsweeper clawsweeper Bot merged commit 257b251 into main Jun 9, 2026
151 checks passed
@clawsweeper clawsweeper Bot deleted the codex/docs-i18n-allow-partial-continue branch June 9, 2026 08:10
@hxy91819

hxy91819 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Post-merge verification for 257b251e26905f7dd8eb5c4b31615093876c8aa8 completed.

Result: expected.

  • The merge commit triggered the expected push workflows on main: CI, Workflow Sanity, Plugin NPM Release, and ClawSweeper Dispatch. The relevant runs completed successfully.
  • Docs and Docs Sync Publish Repo were not expected to run for this merge commit because the PR did not change docs/** or markdown publish inputs.
  • Docs Agent was triggered from the successful CI workflow_run, but its gate skipped execution because a docs-agent run had already run or was running within the configured hourly window. That matches the workflow cadence guard.

Follow-up: this verifies the post-merge CI trigger behavior. The openclaw/docs translation matrix is not expected to run directly from this source-repo merge; it is covered by publish-repo sync, release, manual, or scheduled translation events.

markfietje pushed a commit to markfietje/openclaw that referenced this pull request Jun 9, 2026
Summary:
- This PR passes the existing docs-i18n `--allow-partial` flag into sequential and parallel doc-mode schedulin ... ion as terminal, adds regression tests, and removes one non-null assertion in Microsoft Foundry onboarding.
- PR surface: Source 0, Other +286. Total +286 across 3 files.
- Reproducibility: yes. at source level: current main returns from sequential doc mode on the first `processFi ... d not run Go tests because this review is read-only, but the PR adds direct regression cases for that path.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(docs): continue partial i18n batches after file errors
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-9164…

Validation:
- ClawSweeper review passed for head b66c0983b4943eebbfc09d911dfe02051f1637d4.
- Required merge gates passed before the squash merge.

Prepared head SHA: b66c0983b4943eebbfc09d911dfe02051f1637d4
Review: openclaw/openclaw#91642 (comment)

Co-authored-by: Mason Huang <masonxhuang@tencent.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: hxy91819
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 10, 2026
…91642)

Summary:
- This PR passes the existing docs-i18n `--allow-partial` flag into sequential and parallel doc-mode schedulin ... ion as terminal, adds regression tests, and removes one non-null assertion in Microsoft Foundry onboarding.
- PR surface: Source 0, Other +286. Total +286 across 3 files.
- Reproducibility: yes. at source level: current main returns from sequential doc mode on the first `processFi ... d not run Go tests because this review is read-only, but the PR adds direct regression cases for that path.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(docs): continue partial i18n batches after file errors
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-9164…

Validation:
- ClawSweeper review passed for head b66c098.
- Required merge gates passed before the squash merge.

Prepared head SHA: b66c098
Review: openclaw#91642 (comment)

Co-authored-by: Mason Huang <masonxhuang@tencent.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: hxy91819
Co-authored-by: hxy91819 <8814856+hxy91819@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: M status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant