Repository navigation
bot: widen the ceiling to the reads the merge gate needs - #21
Merged
Merged
Conversation
refresh-bot was granted checks:read and statuses:read on 2026-11-03 and all
10 owned orgs approved them, so the ceiling can now move with the app.
Order matters and is the reason this is a separate change: a ceiling that
claims a permission the app does not hold makes create-github-app-token answer
422 on every run. Grant on the app, let every org approve, then widen. The
bot/README "Adding a job" step says exactly this; this is the first time it
has been exercised.
dependabot-merge gets the two reads back. merge.py reads
commits/{sha}/check-runs and commits/{sha}/status, and without them decide()
sees no checks and refuses every pull request -- fail-closed, but useless.
workflows:write is still absent and must stay absent. This app's key is an
organisation-level secret, so that permission would be within reach of every
workflow in the estate, letting a release job rewrite the CI that gates it. A
Dependabot pull request touching .github/workflows/ is therefore never merged
by this token; those go to `@dependabot merge`, which Dependabot performs with
its own credentials.
The gate remains dry-run: it acts only where DEPENDABOT_MERGE_APPLY is true,
and no repository variable sets it, so it has never merged anything.
CeilingMatchesTheAppTest still refuses workflows, issues, administration,
members and secrets by name, and was re-proven red: 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
refresh-botwas grantedchecks: readandstatuses: readon 2026-11-03, and all 10 owned orgs approved them, so the policy ceiling can now move with the app.Why this is a separate change from the grant
A ceiling that claims a permission the app does not hold makes
create-github-app-tokenanswer 422 on every run. So the order is: grant on the app → every org approves → widen the ceiling.bot/README.md's "Adding a job" step says exactly this; this is the first time it has been exercised.dependabot-mergegets the two reads back.merge.pyreadscommits/{sha}/check-runsandcommits/{sha}/status; without themdecide()sees no checks and refuses every pull request — fail-closed, but useless.workflows: writeis still absent, and must stay absentThis app's key is an organisation-level secret, so that permission would be within reach of every workflow in the estate — letting a release job rewrite the CI that gates it. A Dependabot pull request touching
.github/workflows/is therefore never merged by this token; those go to@dependabot merge, which Dependabot performs with its own credentials.Verification
CeilingMatchesTheAppTeststill refusesworkflows,issues,administration,membersandsecretsby name, and was re-proven red: plantingworkflows: writein the ceiling fails 6 tests, reverting goes green.bot/resolve.py --job dependabot-merge --owner laranailnow emitscontents=write pull-requests=write checks=read statuses=read..github/actions/bot-token/action.ymlpasses exactly the ceiling (a ceiling permission the action does not pass is silently dropped —test_the_action_passes_exactly_the_ceilingcovers it).Not changed
The gate stays dry-run: it acts only where
DEPENDABOT_MERGE_APPLYistrue, and no repository variable sets it.gh api repos/simtabi/.github/actions/variablesreturns none, so it has never merged anything.