beads/tools/rbe
Julian Knutsen b3cdbf9e46
ci(rbe): auto-PR a worker-env pin sync when gascity main re-pins (mc-gv9fk) (#7455)
rbe-west's pool workers advertise gastownhall/gascity main's worker-env
pin; when gascity re-pins (a Go/dolt/OS bump, e.g. #7387) beads' copy
falls out of step and every remote-execution run stops in bazel.yml's
preflight until a human notices and copies the fix by hand (#7419 took
~100 minutes). This adds a scheduled workflow (every 15 minutes, plus
workflow_dispatch) that runs tools/rbe/worker-env-sync against gascity
main, and on a real mismatch (exit 1) copies the manifest and pin with
the new tools/rbe/worker-env-sync-copy, opens/updates a PR on a fixed
branch with status/needs-review-auto, and arms auto-merge.

GitHub never runs checks on a PR a plain GITHUB_TOKEN opens, so this
needs a GitHub App token -- but gastownhall-autofix (contents:write on
this repo) cannot open or label a PR. Two Apps split the two write
roles instead: gastownhall-autofix mints push-token (contents:write
only) and does the git push of bot/worker-env-sync via plain git;
gascity-autofix (pull-requests:write only) mints pr-token and does
everything PR-shaped -- create/update, the label, and arming
auto-merge -- via gh. peter-evans/create-pull-request takes one token
for the whole flow, so it can't honor this split; plain git and gh
replace it. Every ${{ }} is resolved into a step's env: first, never
written inside a run: script.

Both Apps' id/private-key secrets live in the same autofix environment,
gated by its deployment-branch policy to main; schedule and
workflow_dispatch are never fork events, so neither key is ever
readable by a fork.

Needs admin setup: the gascity-autofix App (id 5259233) installed on
gastownhall/beads (and gascity) with pull-requests:write and metadata
read, and its GASCITY_AUTOFIX_APP_ID / GASCITY_AUTOFIX_APP_PRIVATE_KEY
secrets added to the autofix environment alongside the existing
AUTOFIX_APP_ID / AUTOFIX_APP_PRIVATE_KEY.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-10 05:58:24 +00:00
..
worker-env-sync ci(rbe): fail remote runs fast on a stale worker-env pin; nightly opens an issue (#7373) 2026-10-08 00:55:02 +00:00
worker-env-sync-copy ci(rbe): auto-PR a worker-env pin sync when gascity main re-pins (mc-gv9fk) (#7455) 2026-10-10 05:58:24 +00:00
worker-env-sync-issue ci(rbe): fail remote runs fast on a stale worker-env pin; nightly opens an issue (#7373) 2026-10-08 00:55:02 +00:00
worker-env.txt build(rbe): re-pin worker-env to gascity's go1.26.9 worker host (#7411) 2026-10-09 07:38:56 +00:00