Skip to content

fix(ci): preflight locale publisher permissions#103671

Merged
steipete merged 1 commit into
mainfrom
codex/fix-locale-publisher-contents-app
Jul 10, 2026
Merged

fix(ci): preflight locale publisher permissions#103671
steipete merged 1 commit into
mainfrom
codex/fix-locale-publisher-contents-app

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #103570

What Problem This Solves

Fixes an issue where the Control UI and native locale refresh workflows completed their translation matrices but could not publish the generated branch because the available GitHub App tokens did not have repository contents-write permission.

Why This Change Was Made

The workflows now mint two exact-repository, least-privilege tokens: a ClawSweeper token for generated branch contents and a Mantis token for pull-request mutation. A mandatory token preflight runs before either provider-backed locale matrix, and a main-only preflight mode gives maintainers a cheap permission-drift diagnostic without exposing App secrets to branch-controlled workflow code.

The shared publisher delegates token creation to one composite action, and both workflows include that action in their trigger and stale-input paths. Guard tests lock the token scopes, dispatch boundary, preflight dependency, publisher wiring, and changed-test routing.

User Impact

Automated locale refreshes fail before spending translation-provider capacity when App installation permissions drift, and successful runs can publish reviewable generated pull requests again. There is no direct product behavior change.

Evidence

  • Before: Control UI locale run 29088903227 passed all 20 locale jobs and validation, then failed while requesting contents-write App tokens.
  • Testbox-through-Crabbox tbx_01kx5x3a4nqphdnex9yte298jj: 229/229 focused workflow and changed-target tests passed.
  • pnpm check:workflows
  • Exact-path pnpm check:changed -- <7 touched files>
  • Targeted oxfmt --check and local actionlint
  • Fresh structured autoreview: no accepted or actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Jul 10, 2026
@steipete steipete self-assigned this Jul 10, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head febd373d175ccd5cdbe36522b85b7e88024833b8:

  • Main CI 29090602734: 44 jobs passed; 11 expected skips; no failures.
  • Blacksmith Testbox 29090602755, ARM 29090602725, Build Artifacts 29090602693, and CodeQL 29090602687: passed.
  • Focused Testbox-through-Crabbox tbx_01kx5x3a4nqphdnex9yte298jj: pnpm test test/scripts/ci-workflow-guards.test.ts test/scripts/test-projects.test.ts passed 229/229 tests; pnpm check:workflows and exact-path pnpm check:changed passed.
  • Targeted oxfmt --check, local actionlint, and git diff --check: passed.
  • Fresh structured autoreview after the main-only dispatch security correction: no accepted/actionable findings.
  • Repo-native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 103671: passed exact-head hosted gates and validated review/prep artifacts.

Known live-proof gap: ClawSweeper contents-token issuance plus generated branch/PR mutation can only be proven from trusted main. Immediately after landing, the main-only token probe and both path-triggered locale workflows must pass through publication/reconciliation before #103570 is closed.

@steipete
steipete merged commit 1381999 into main Jul 10, 2026
107 of 112 checks passed
@steipete
steipete deleted the codex/fix-locale-publisher-contents-app branch July 10, 2026 11:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant