Repository navigation
fix(ui): prevent generated locale rebase conflicts - #109393
Conversation
There was a problem hiding this comment.
💡 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".
| timeout --signal=TERM --kill-after=10s 60s \ | ||
| gh pr merge "${published_pr_url}" --repo "${GITHUB_REPOSITORY}" \ | ||
| --auto --squash --match-head-commit "${published_commit}" |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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".
| git fetch --no-tags origin \ | ||
| "refs/heads/${HEAD_BRANCH}:refs/remotes/origin/${HEAD_BRANCH}" |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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".
| timeout --signal=TERM --kill-after=10s 60s \ | ||
| gh pr merge "${published_pr_url}" --repo "${GITHUB_REPOSITORY}" \ | ||
| --auto --squash --match-head-commit "${published_commit}" |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
* 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
* 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
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
pnpm build, including the Control UI bundle and performance gates.pnpm check:workflowspassed.pnpm ui:i18n:check: 20 locales clean, zero fallbacks.