ci: grant PR Apply the statuses:write scope it needs - #495
Merged
Loup-Garou911XD merged 1 commit intoSep 28, 2026
Merged
Loup-Garou911XD merged 1 commit into
Loup-Garou911XD merged 1 commit into
Conversation
The "Report metadata fixpoint status" step added in dcb50fd posts a commit status via `gh api --method POST repos/{repo}/statuses/{sha}`, but the permissions block was never extended to cover it. `statuses` is its own scope and `contents: write` does not imply it, so with the block declared the scope defaulted to `none` and every POST returned: gh: Resource not accessible by integration (HTTP 403) The step then exited 1, which tripped the `if: failure()` notifier into commenting "Automatic formatting/metadata could not be applied to this PR (patch touched a disallowed path, or a conflict occurred)" on PRs whose patch had in fact applied cleanly. On PR bombsquad-community#494 both apply steps reported success and pushed nothing, i.e. the branch was already at the fixpoint and the step was about to report success, yet the contributor was told the opposite. Because the status never posted, `metadata-fixpoint` has not been set once since it was introduced, so as a required check on main it blocks every PR. Co-authored-by: Loup <loupg450@gmail.com>
Contributor
|
Automatic formatting/metadata could not be applied to this PR (patch touched a disallowed path, or a conflict occurred). A maintainer will need to look at this manually. |
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's wrong
Every PR Apply run that reaches the Report metadata fixpoint status step fails there with:
The step exits 1, which trips the
if: failure()notifier into commenting "Automatic formatting/metadata could not be applied to this PR (patch touched a disallowed path, or a conflict occurred)" on PRs where nothing of the sort happened.Most recent instance is #494, run 36406098267:
with
FIXUPS_RESULT: success,VERMETA_RESULT: success, and both*_PUSHEDempty. The branch was already at the fixpoint and the step was about to poststate=success. The contributor was told the opposite.Cause
statusesis its own permission scope.contents: writedoes not imply it, and once apermissions:block is declared every unlisted scope isnone. Thegh api --method POST repos/{repo}/statuses/{sha}call arrived in dcb50fd ("ci: fail loudly when PR Apply cannot apply fixups") and that commit never extended the block.So this is not specific to #494. Every run since 2026-09-05 that actually reached the step has failed there: 36406098267, 36403742100, 34684974342. The one green run in that window (34678058897) took the
proceed=0skip path and never ran the step.Consequence:
metadata-fixpointhas never been set once since it was introduced. As a required check onmainit currently blocks every PR.The change
Adds
statuses: writeto thepermissions:block, plus a comment recording why it is there so it does not get trimmed as redundant next tocontents: write. Nothing else is touched, so the three hard rules in the file header are unaffected.Verifying
This cannot be tested from the PR itself.
workflow_runalways runs the workflow file from the default branch, so PR Apply keeps usingmain's copy until this merges. First proof is the next PR Apply run afterwards.Worth confirming Settings -> Actions -> General -> Workflow permissions is set to read and write as well. If it is read-only it caps the token regardless of what the block requests, and the 403 survives this fix.
Unrelated, but noticed on #494
That PR adds a single file named
plugins/minigames/floating_impact, with no.pyextension. autopep8,auto_apply_plugin_metadata.py, and theALLOWregex in the validate step (plugins/(minigames|utilities|maps)/[^/]+\.py) all key off.py, so the pipeline cannot see it. That is whyfixups.patchcame back empty and the fixpoint check read the branch as clean. Even with this fix in place that PR would go green and merge without an entry inplugins/minigames.json. It needs renaming tofloating_impact.py.🤖 Generated with Claude Code