feat: soothfast-bot identity for comments, pages, releases - #165
Merged
Merged
Conversation
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Failure
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Verdenroz
had a problem deploying
to
soothfast-bot
September 6, 2026 01:09 — with
GitHub Actions
Error
Contributor
soothfast gate |
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 01:13
16db9f0 to
dc23ff4
Compare
6 tasks
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 01:14
dc23ff4 to
8f140cb
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 01:20
8f140cb to
83d0a05
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 01:35
556a1eb to
96176f2
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 02:01
96176f2 to
ce2e925
Compare
Verdenroz
force-pushed
the
feat/soothfast-bot-identity
branch
from
September 6, 2026 02:02
ce2e925 to
e15b3cd
Compare
- Every write soothfast makes now carries the bot identity, and a pull request job still never holds a token: it sends the gate comment to the broker's /comment, which posts as the bot and revokes its own token. - Tags are judged by the commit that ran (the OIDC sha), accepted only when it is already on the default branch, so a moved tag changes nothing and a release equals a dispatch from master. - Release creation moves to its own job: a job carries one environment and publish already needs the release approval gate.
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
Three writes were still attributed to github-actions after #164: the gate comment on pull requests, the gh-pages push in
deploy-docs, andgh release create. All three now carry the soothfast-bot identity. Pull request jobs never receive a token for it: the broker posts the gate comment itself. Release creation moves to its own job because a job carries one environment andpublishalready needs thereleaseapproval gate.POST /commentto the broker. Apull_requestrun from the repository itself, in thesoothfast-botenvironment, sends{pull_request, marker, body}over its OIDC identity; the broker checks the number against the run's own merge ref, mints apull_requests: writetoken for itself, creates or updates the comment that starts with the marker, and revokes the token. The job holds nothing./tokenrefusespull_requestruns outright.shareportsbehindoridentical. The commit that ran is what is judged, never the tag name, so moving a tag after the run starts changes nothing. Revoked on any other status.action/oidc.shholds the broker URL and OIDC fetch shared bybot-token.shandcomment.sh.comment.shtries the broker first and falls back to the caller's token;gate.shruns the gate before any comment and passes no token into it.soothfast-gate.ymlruns in thesoothfast-botenvironment withid-token: write, checks out this repository'saction/atgithub.job_workflow_shaso a cross-repo caller gets matching scripts, installs the CLI through that checkout instead of a pinned self-reference, and posts its comment through the broker with the same fallback.deploy-docspushes gh-pages with a landing token and revokes it.release.ymlgains areleasejob (report, changelog extraction,gh release createas soothfast-bot) betweenpublishandbinaries;publishdrops the rustdoc pin it no longer needs./commentbody before it authenticates, so a malformed request costs no mint.docs/ci.mdandCLAUDE.mddescribe the flow. The App's permission list is unchanged.Part of #158.
Why
Harvey's requirement is that soothfast-bot is the only identity soothfast writes with. A pull request runs unmerged code, so it must never hold a write credential; having the broker post the comment keeps the identity without handing the job anything. A tag push was excluded because a tag is not the default branch; requiring the tagged commit to already be on it makes the release equivalent to a
workflow_dispatchon master. The sameenvironmentopt-in gates every request.How was this tested
npm test: 64 passed, 0 failed. New coverage:/commentcreates or updates by marker and ignores other bots' comments, refuses a different pull request number, validates the body and size, revokes its token on every path;/tokenrefusespull_request; a tag is judged bysha(the fake asserts the compared head);pull_request_target,issue_comment, and head refs stay refused.tsc --noEmit: clean.shellcheck -xon all eight scripts: clean.zizmor1.29.0 on every workflow andaction.yml: no findings.bot-token.shfails loudly with no OIDC token;comment.shfalls back to the job token when the broker is unreachable (the case CI is in until the Worker is deployed).make checkandmake gatewere not run for this layer. It changes no Rust.Manual, before the first run: this repository's
soothfast-botenvironment must have no deployment branch policy, since the gate now uses it on pull requests and the release on tags.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