Repository navigation
bot: retire simtabi-bot; refresh-bot becomes the single CI app - #20
Merged
Merged
Conversation
The estate is held to two apps: simbi-github-cli for local gh and git, and
one for CI. Which app survived was decided by measurement, not by which was
newer:
refresh-bot contents=write metadata=read pull_requests=write (3)
simtabi-bot + checks, issues, statuses, workflows=write (7)
refresh-bot is the narrower app, and 35 workflow files across the estate
already used it against 2 for simtabi-bot -- so it is both the safer and the
cheaper survivor. simtabi-bot was also effectively unused: the merge gate
skipped every run because SIMTABI_BOT_CLIENT_ID was never set anywhere, and
the reconciler had always fallen through to refresh-bot.
policy.json, resolve.py and the bot-token action are app-agnostic -- they take
a client ID and a key as inputs -- so only the credentials the two workflows
pass changed, plus the ceiling.
The ceiling now equals what refresh-bot actually holds, and that is the whole
safety property: its key is an organisation-level secret on every owned org,
so a ceiling wider than the app would put the extra reach within range of
every workflow in the estate. workflows:write is the one that matters, because
with it a release job could rewrite the CI that gates it.
dependabot-merge is left defined but inoperative, and the reason is a
permission rather than a bug: merge.py reads commits/{sha}/check-runs and
/status, which need checks:read and statuses:read, and refresh-bot holds
neither -- so decide() sees no checks and refuses every pull request. That is
fail-closed. Granting those two reads is the owner's step. Without
workflows:write a pull request touching .github/workflows/ can never be merged
by this token; those go to `@dependabot merge`, which Dependabot performs with
its own credentials.
CeilingMatchesTheAppTest pins the ceiling to the app's permission set and
refuses workflows, issues, administration, members and secrets by name. Proven
red before being trusted: planting workflows:write in the ceiling fails 6
tests, reverting goes green. 24 tests pass.
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.
Summary
Retires
simtabi-bot.refresh-botbecomes the single CI app, keeping the estate to two apps —simbi-github-clifor localgh/git, and this one for CI.Which app survived was decided by measurement, not by which was newer (
gh api apps/<slug> --jq .permissions, 2026-11-03):refresh-botis the narrower app, and 35 workflow files across the estate already used it against 2 forsimtabi-bot— so it is both the safer and the cheaper survivor. Retiring the other way round would have meant moving 35 files and widening a credential.simtabi-botwas also effectively unused:gh api repos/simtabi/.github/actions/variablesreturns none, soSIMTABI_BOT_CLIENT_IDwas never set, the merge gate skipped every run, and the reconciler had always fallen through torefresh-bot.The ceiling is now the app's own permission set
That is the whole safety property.
refresh-bot's key is an organisation-level secret on every owned org, so a ceiling wider than the app puts the extra reach within range of every workflow in the estate.workflows: writeis the one that matters: with it, a release job could rewrite the CI that gates it.policy.json,resolve.pyand thebot-tokenaction are app-agnostic — they take a client ID and a key as inputs — so only the credentials the two workflows pass changed, plus the ceiling.dependabot-mergeis left defined but inoperativeA permission, not a bug.
merge.pyreadscommits/{sha}/check-runsand/status, which needchecks: readandstatuses: read;refresh-botholds neither, sodecide()sees no checks and refuses every pull request — fail-closed. Granting those two reads on the app, and each org approving them, is the owner's step.Without
workflows: write, a pull request touching.github/workflows/can never be merged by this token. Those go to@dependabot merge, which Dependabot performs with its own credentials.Verification
CeilingMatchesTheAppTestpins the ceiling to the app's permission set and refusesworkflows,issues,administration,membersandsecretsby name. Proven red before being trusted: plantingworkflows: writein the ceiling fails 6 tests; reverting goes green.yaml.safe_load); jobs unchanged (accounts+merge,accounts+reconcile).grepover the repository: noSIMTABI_BOT_*reference remains outside deliberate history notes.Still the owner's own steps
checks: readandstatuses: readonrefresh-bot, then approve per org, before the merge gate can run.simtabi-botapp, and remove this repository'ssimtabi-botenvironment, which still holds its key. Nothing reads it now — but a key nobody reads is still a key nobody rotates.