Skip to content

fix(ui): prevent generated locale rebase conflicts - #109393

Merged
steipete merged 9 commits into
mainfrom
codex/bot-owned-control-ui-i18n
Jul 17, 2026
Merged

steipete merged 9 commits into
mainfrom
codex/bot-owned-control-ui-i18n

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where Control UI pull requests that add or change English strings repeatedly conflict with deterministic generated locale artifacts after rebases or locale-refresh merges.

Why This Change Was Made

Source pull requests now own English strings and source inputs only. The serialized locale-refresh workflow owns foreign bundles and metadata, publishes a strictly validated isolated pull request, and enables squash auto-merge only for the exact generated head. Release preparation runs the same repair before the Code SHA is frozen if automation has not landed yet.

Generated-only changes remain behind the strict zero-fallback catalog gate. Canonical release branches may include output produced by release preparation.

User Impact

Contributors and coding agents no longer resolve generated locale conflicts during ordinary rebases. Releases still fail closed unless all 20 locales are clean with zero fallbacks.

Evidence

  • AI-assisted implementation; Codex autoreview repeated until no actionable findings remained.
  • Full pnpm build, including the Control UI bundle and performance gates.
  • 450 focused tests across i18n, generated-PR publication, changed-scope routing, release preflight, and project planning.
  • Final generated-PR guard suite: 72 tests passed.
  • pnpm check:workflows passed.
  • pnpm ui:i18n:check: 20 locales clean, zero fallbacks.
  • Synthetic English placeholder-change flow: source-only verification passed, the strict generated check rejected stale output, and scoped bot sync repaired it.

@steipete
steipete requested a review from a team as a code owner July 16, 2026 22:39
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a069ecde5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +363 to +365
timeout --signal=TERM --kill-after=10s 60s \
gh pr merge "${published_pr_url}" --repo "${GITHUB_REPOSITORY}" \
--auto --squash --match-head-commit "${published_commit}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a merge-capable token for auto-merge

When auto-merge: "true" is used by control-ui-locale-refresh, this gh pr merge --auto runs under GH_TOKEN, which this action sets to the PR token; create-generated-pr-tokens only mints that token with permission-pull-requests: write, while the GitHub CLI documents gh pr merge as the merge operation and GitHub's Pulls API requires Contents write for merging. In that context the generated PR can be created, then this final step fails or cannot arm auto-merge, leaving the locale repair PR open instead of self-merging.

Useful? React with 👍 / 👎.

@steipete
steipete requested a review from a team as a code owner July 16, 2026 22:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f50cbfcb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +398 to +399
git fetch --no-tags origin \
"refs/heads/${HEAD_BRANCH}:refs/remotes/origin/${HEAD_BRANCH}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Force-fetch the generated branch before comparing the head

When this action runs from a checkout that already has refs/remotes/origin/${HEAD_BRANCH} (the control/native locale finalize jobs use all-history checkouts) and a previous generated run force-pushed the automation branch to a non-descendant commit, this plain fetch rejects with non-fast-forward before the new output can be published. I confirmed the Git contract with git fetch -h: --force is what allows overwriting a local reference, so this verification fetch should use a forced refspec like the existing base fetch does.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 306f6a1fc6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +446 to +448
timeout --signal=TERM --kill-after=10s 60s \
gh pr merge "${published_pr_url}" --repo "${GITHUB_REPOSITORY}" \
--auto --squash --match-head-commit "${published_commit}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle auto-merge landing before re-arming

When an inherited auto-merge lands after verify_publication records published_pr_url but before this call, the PR can already be merged with the same headRefOid and no active auto-merge request; this then runs gh pr merge --auto on an already-merged PR and fails the workflow even though the generated output reached the base branch. Re-check the remote/base desired tree, as the earlier reconciliation paths do, before invoking gh pr merge when the observed method is empty.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 067635c into main Jul 17, 2026
124 checks passed
@steipete
steipete deleted the codex/bot-owned-control-ui-i18n branch July 17, 2026 01:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
* ci(ui): make locale refresh bot-owned

* test(ui): keep locale gate coverage scoped

* fix(ci): preserve generated PR merge policy

* fix(ci): wait for generated PR head convergence

* fix(ci): retry transient guard API failures

* fix(ci): enforce locale isolation across CI events

* fix(ci): harden generated PR publication

* fix(ci): validate release gate merge tree

* fix(ci): allow trusted main locale output
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* ci(ui): make locale refresh bot-owned

* test(ui): keep locale gate coverage scoped

* fix(ci): preserve generated PR merge policy

* fix(ci): wait for generated PR head convergence

* fix(ci): retry transient guard API failures

* fix(ci): enforce locale isolation across CI events

* fix(ci): harden generated PR publication

* fix(ci): validate release gate merge tree

* fix(ci): allow trusted main locale output
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant