fix(automerge): drop checks:read from reusable, document caller opt-in#28
Merged
Merged
Conversation
Previous fix (#27) added `checks: read` to the reusable's job-level permissions to make Option B work. But that's a *cap-mismatch* with the 44+ existing fleet callers that only grant contents+pull-requests at the workflow level — when the reusable is called from those, GitHub fails the workflow at startup with `startup_failure`, before any step runs. Caught on whois-api-llc/wxa-mcp-server#80, run 25292746179: the install PR's auto-merge workflow had startup_failure with empty job list (the signature of a permissions-cap conflict at workflow start). The fix: keep the graceful 403 handling in the Option B step (already done in #27) but DON'T request `checks: read` from the reusable. Callers that want Option B should add `checks: read` to their own workflow-level permissions block. The graceful step returns bypass=0 when the permission is missing — so callers without it keep working on Option A (label bypass) and the no-risky-paths path. Updated caller template at ~/.claude/templates/ci-workflows/callers/claude-author-automerge.yml to grant `checks: read` so new fleet installs get Option B by default. Existing 44 fleet callers continue to work after this lands. They opt into Option B by adding `checks: read` (one-line change). I'll ship that as a fleet-wide migration in a separate PR. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
topcoder1
enabled auto-merge (squash)
May 3, 2026 22:43
|
No issues found. Pure permissions-block comment change — dropping |
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.
Hot-fix to #27. The
checks: readpermission I added to the reusable's job-level block creates a cap-mismatch with existing fleet callers — they grant onlycontents+pull-requestsat the workflow level, and GitHub fails the workflow atstartup_failurebefore any step runs.Caught on whois-api-llc/wxa-mcp-server#80, run 25292746179: the auto-merge install PR's first run after the fix landed showed empty job list +
startup_failureconclusion. The signature of a permissions-cap conflict at workflow start.Without this revert, every existing Claude PR on every fleet repo (44+ callers) would startup_failure on its next run. Bad outcome.
Fix
checks: readfrom the reusable's job-level permissions.gh api ... || echo '{}'+jq 'try (...) // empty'). Without checks:read, the step gracefully returnsbypass=0— Option A (label bypass) and the no-risky-paths fast-path still work.~/.claude/templates/ci-workflows/callers/claude-author-automerge.ymlto grantchecks: read. New fleet installs get Option B by default.Migration for existing 44 callers
Existing callers continue to work after this lands. To opt in to Option B, they add a one-line
checks: readto their workflow-level permissions block. I'll ship that as a fleet-wide migration in a separate PR (probably scripted viagh apifor batch).Test plan
actionlintclean.Claude-author Auto-mergeto NOT startup_failure (it'll go through the normal risk-tier check, find.github/workflows/**is a risk path, post the blocked comment as designed).Auto-merge rationale: NOT eligible — touches
.github/workflows/**. Manual click-merge.Codex pre-review: skipped — straight revert + comment update.
🤖 Generated with Claude Code