Skip to content

fix(docs): preserve localized navigation route parity - #114993

Merged
vincentkoc merged 1 commit into
mainfrom
audit/docs-localization-nav-20260728
Jul 28, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
audit/docs-localization-nav-20260728

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where Simplified Chinese docs navigation omitted hundreds of current pages, while generated locale navigation could retain stale page lists or English labels.

Why This Change Was Made

Publish sync now always clones the current canonical English navigation routes, prefixes them for each generated locale, and overlays translated tab and group labels by matching shared page anchors. Locale metadata can translate labels without owning or replacing the route tree.

User Impact

Localized docs keep complete navigation coverage as English docs evolve. Simplified Chinese no longer loses current pages, and locales with starter navigation metadata retain translated labels without hand-maintaining duplicate route lists.

Evidence

  • node scripts/run-vitest.mjs test/scripts/docs-sync-publish.test.ts: 4 tests passed.
  • Generated config proof: zh-Hans, de, ja, and es each contain all 551 canonical non-ClawHub pages.
  • Representative labels remain localized: 快速开始, Loslegen, はじめに, and Comenzar.
  • node scripts/docs-list.js: passed.
  • git diff --check: passed.
  • Fresh branch autoreview: clean, no accepted or actionable findings.

@vincentkoc vincentkoc self-assigned this Jul 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts labels Jul 28, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 28, 2026 06:25
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 28, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Jul 28, 2026
@clawsweeper

clawsweeper Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 2:30 AM ET / 06:30 UTC.

ClawSweeper review

What this changes

The PR updates documentation publish synchronization so every generated locale inherits the current English navigation routes while retaining translated tab and group labels.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this active PR open for its normal maintainer review. It is a focused repair for localized documentation navigation, and the protected maintainer label prevents cleanup closure; the branch is also behind current main, so its merge result should be refreshed before landing.

Priority: P2
Reviewed head: 6540c52ca42cb7868d665397a18eeb586f175bf9

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is narrowly scoped with targeted route-parity coverage, while the reported generated-output proof is summarized in the PR body rather than attached as inspectable output.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This repository-member PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless reports generated locale-route parity and localized-label checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This repository-member PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless reports generated locale-route parity and localized-label checks.
Evidence reviewed 4 items Focused route-parity implementation: The proposed publish-sync change clones canonical English navigation for each generated locale and applies locale metadata as a label overlay rather than allowing locale files to replace the route tree.
Regression coverage added: The PR adds a docs-sync test that compares generated locale navigation against the English route set and checks that representative translated labels remain present.
Declaration contract updated: The script declaration file exposes the new composition and label-overlay helpers, matching the repository requirement that exported script helpers have declarations.
Findings None None.
Security None None.

How this fits together

The documentation publish script composes Mintlify navigation from the canonical English route tree and per-locale metadata. Its output feeds the published localized documentation sites, where navigation must lead users to the same current pages as English.

flowchart LR
  A[English documentation navigation] --> C[Publish synchronization]
  B[Locale label metadata] --> C
  C --> D[Clone and prefix locale routes]
  D --> E[Overlay localized tab and group labels]
  E --> F[Published localized navigation]
  F --> G[Localized documentation readers]
Loading

Before merge

  • Resolve merge risk (P1) - Because the branch is behind current main, maintainers should refresh the merge result and rerun the locale-route parity assertions before landing; this is a review-refresh need, not evidence that the merge will delete current-base behavior.
  • Complete next step (P2) - The active, maintainer-labeled PR needs normal owner review and a base refresh rather than an automated repair job.
Agent review details

Security

None.

PR surface

Tests +63, Docs 0, Other +94. Total +157 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 64 1 +63
Docs 1 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 98 4 +94
Total 4 164 7 +157

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep English navigation as the sole route authority, overlay only locale labels, and land the rebased PR after verifying route parity and translated labels against the current canonical navigation.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep English navigation as the sole route authority, overlay only locale labels, and land the rebased PR after verifying route parity and translated labels against the current canonical navigation.

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

Unclear whether a failing published-site reproduction was independently observed during this review; the supplied PR evidence and focused regression test provide a source-level reproduction path for stale or incomplete locale route trees.

Is this the best way to solve the issue?

Yes, provisionally: deriving locale routes from the canonical English tree and treating locale navigation as a label overlay avoids duplicate route inventories and the associated drift.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 28ecf953f382.

Labels

Label changes:

  • add P2: A localized documentation navigation regression can hide substantial documentation coverage, but it does not affect the core runtime or message delivery.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This repository-member PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless reports generated locale-route parity and localized-label checks.

Label justifications:

  • P2: A localized documentation navigation regression can hide substantial documentation coverage, but it does not affect the core runtime or message delivery.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This repository-member PR is exempt from the external-contributor real-behavior-proof gate; its body nevertheless reports generated locale-route parity and localized-label checks.

Evidence

What I checked:

  • Focused route-parity implementation: The proposed publish-sync change clones canonical English navigation for each generated locale and applies locale metadata as a label overlay rather than allowing locale files to replace the route tree. (scripts/docs-sync-publish.mjs:400, 6540c52ca42c)
  • Regression coverage added: The PR adds a docs-sync test that compares generated locale navigation against the English route set and checks that representative translated labels remain present. (test/scripts/docs-sync-publish.test.ts:96, 6540c52ca42c)
  • Declaration contract updated: The script declaration file exposes the new composition and label-overlay helpers, matching the repository requirement that exported script helpers have declarations. (scripts/docs-sync-publish.d.mts:13, 6540c52ca42c)
  • Active protected review state: GitHub metadata marks this PR with the protected maintainer label; the review policy requires it to remain open for explicit maintainer handling. The PR is currently mergeable but behind its base branch.

Likely related people:

  • vincentkoc: The PR metadata identifies this repository member as the author of the current localized-navigation implementation and its sole commit; no separate current-main provenance trail was available in the supplied review data. (role: current docs-sync contributor; confidence: low; commits: 6540c52ca42c; files: scripts/docs-sync-publish.mjs, test/scripts/docs-sync-publish.test.ts, docs/.i18n/README.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase or refresh the branch against current main and rerun the generated locale navigation parity check before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move disposition: I am not rewriting the branch solely because GitHub reports BEHIND. The exact PR head completed the full hosted CI run successfully against the current merge candidate, and the repo-native prepare/merge flow will re-check mainline drift before landing. Per the requested landing policy, this will use a merge commit rather than squash or rebase.

@vincentkoc
vincentkoc merged commit 2f5c70e into main Jul 28, 2026
141 of 153 checks passed
@vincentkoc
vincentkoc deleted the audit/docs-localization-nav-20260728 branch July 28, 2026 15:45
@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

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant