ci: land the changelog as soothfast-bot via the broker - #161
Merged
Merged
Conversation
Contributor
soothfast gate |
Verdenroz
force-pushed
the
feat/soothfast-bot-land
branch
2 times, most recently
from
September 6, 2026 00:34
00259f0 to
65d8256
Compare
6 tasks
Verdenroz
force-pushed
the
feat/soothfast-bot-land
branch
from
September 6, 2026 01:34
65d8256 to
c37b1a6
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-land
branch
from
September 6, 2026 01:35
c37b1a6 to
46e8e17
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-land
branch
2 times, most recently
from
September 6, 2026 02:02
18732ed to
e003b9d
Compare
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 02:06 — with
GitHub Actions
Failure
- changelog.yml is the first workflow off the App private key; the token comes from action/bot-token.sh after the build finishes, so no step that compiles the tree ever holds it. - land.sh replaces create-pull-request with plain git and gh so the same script serves this repo and the adopter action, and revokes the token on every exit path. - The concurrency group makes the newest regeneration the only one that lands, which is the fix #145 asks for. Closes #145
- History-only rules leave the PR clean and --auto refuses it; only status-check, pull-request and merge-queue rules mean there is something to wait for. - The push token now travels through a credential helper, so a git error cannot print it, and HEAD is restored after the push for callers that run further steps.
Verdenroz
force-pushed
the
feat/soothfast-bot-land
branch
2 times, most recently
from
September 6, 2026 02:12
d30b95b to
d6a7682
Compare
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 02:34 — with
GitHub Actions
Failure
Verdenroz
added a commit
that referenced
this pull request
Sep 6, 2026
## What changed After this, no workflow in the repo mints an App token. `spec.yml` and the `docs-regen` job in `ci.yml` land through `action/bot-token.sh` and `action/land.sh` the same way `changelog.yml` does. `deploy-docs` and the release step use `github.token`. `soothfast-gate.yml` drops the App entirely and becomes something another repo can call. - Rewrote the `generate` job in `spec.yml` and `docs-regen` in `ci.yml`: `environment: soothfast-bot`, permissions `contents: read` and `id-token: write`, checkout with `persist-credentials: false`, a `concurrency` group each, and the token minted after the generation step. `docs-regen` keeps its llms.txt churn filter. - Switched `deploy-docs` (`peaceiris/actions-gh-pages`) and the `gh release create` step in `release.yml` to `github.token`. Attribution-only change: the gh-pages push and the release show github-actions instead of soothfast-bot. - Made `soothfast-gate.yml` callable cross-repo. The PR comment uses `github.token` under `pull-requests: write`, the PR number reaches the shell through `env`, `CHANGELOG_APP_PRIVATE_KEY` stays declared but optional and unused for one release so existing callers keep validating, and a new `cli-artifact` input selects a prebuilt CLI from the run or falls back to the setup action. - Pointed the `gate` matrix in `ci.yml` at `cli-artifact: cargo-soothfast-bin` and stopped passing the secret. - Rewrote the CI section of `CLAUDE.md` around the broker and added a reusable-gate example to the README's "In CI" section. Part of #158 and #14. ## Why The App private key was minted in six places. Once the changelog proves the broker path, keeping the other five on the key means two credential paths to reason about and a secret that still has to exist. Moving them together lets the `CHANGELOG_APP_*` variable and secret be deleted after this merges. The release and gh-pages pushes never needed a bot identity, only write permission, which `github.token` already grants. A tag push is not a default-branch ref, so the broker would refuse it by design, and that rule stays as is. ## How was this tested - `zizmor` 1.29.0 across every workflow in `.github/workflows/`: no findings. - No App references remain in the workflows outside the unused secret declaration in `soothfast-gate.yml`. - Not run end to end: the spec and docs bot PRs fire on the first merge to master after this lands. The gate matrix runs on this PR itself with `cli-artifact` set, which exercises the artifact path; the setup-action fallback is exercised by the first cross-repo caller. - `make check` and `make gate` were not run for this layer. It changes no Rust. After merge, by hand: delete the `CHANGELOG_APP_CLIENT_ID` variable and `CHANGELOG_APP_PRIVATE_KEY` secret from this repo. That can happen right away; finance-query holds its own copy of the secret and the reusable workflow now ignores it. The first master push after this lands runs spec generate and docs-regen through the broker, so it needs the same prerequisites as #161: broker deployed, `soothfast-bot` environment created, smoke run green. Watch that push's `deploy-docs` too: it now pushes gh-pages with `github.token`, and if the Pages build does not fire the fallback is the official `upload-pages-artifact` + `deploy-pages` pair in a separate PR. ## Checklist - [ ] `make check` passes (fmt, clippy `-D warnings`, `cargo test --workspace`) - [ ] `make gate BASE=master` passes, or any intentional cost change is explained above - [ ] Tests added/updated for new behavior (not required for docs/CI-only changes) - [ ] Public API items have `///` doc comments - [x] No new dependency, or its justification is included above (see [Dependency Policy](../CONTRIBUTING.md#dependency-policy)) - [x] Docs (`README.md`, `docs/`, `soothfast:bind`/`soothfast:claim` markers) updated if behavior changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
changelog.ymlis the first workflow off the App private key. It now asks the broker for a soothfast-bot token after the build has finished, and lands the regenerated file withaction/land.shinstead ofpeter-evans/create-pull-request. The same script will serve the adopter action, so the bot flow is exercised on this repo first.action/land.sh. StagesPATHS, exits cleanly when nothing changed, commits asAPP_SLUG[bot]with a per-command identity, force-pushes toBRANCHwith the token on the push URL only, opens or refreshes the PR, and merges with--autowhen the default branch has a required-check, review, or merge-queue rule, or immediately when it has none. The push token travels through a credential helper, never a URL, and HEAD is restored after the push. The token is revoked on every exit path.changelogjob: no App mint, no user-id lookup, checkout withpersist-credentials: false,environment: soothfast-bot, permissionscontents: readandid-token: write.concurrency: {group: changelog, cancel-in-progress: true}so only the newest regeneration lands.Closes #145. Part of #158 and #14.
Why
The changelog bot fires on every merge to master, so it is the cheapest place to prove the broker path on a real ruleset before the other workflows follow. The token is minted after the build on purpose: no step that compiles the tree ever holds a write credential. A cancel between mint and land leaves a one-hour token unrevoked; that is accepted, since the alternative is a stale changelog winning the race #145 describes.
How was this tested
shellcheck0.11.0 onaction/land.shandaction/bot-token.sh: clean.zizmor1.29.0 onchangelog.yml,bot.yml,bot-smoke.yml: no findings.bash -non both scripts.make checkandmake gatewere not run for this layer. It changes no Rust.Checklist
make checkpasses (fmt, clippy-D warnings,cargo test --workspace)make gate BASE=masterpasses, or any intentional cost change is explained above///doc commentsREADME.md,docs/,soothfast:bind/soothfast:claimmarkers) updated if behavior changed