fix(ci): grant required permissions to Claude review workflows#135
fix(ci): grant required permissions to Claude review workflows#135wkoutre wants to merge 4 commits into
Conversation
The calling workflows declared `permissions: {}`, which caps the
GITHUB_TOKEN permissions delegated to the called reusable workflow at
none. The reusable workflows (`_claude-code-review.yml`,
`_generate-pr-metadata.yml`) declare job-level permissions requesting
write access to pull-requests and id-token, and these requests cannot
be satisfied by an empty caller scope, so every run terminates as
`startup_failure` before any job is created.
Replace `permissions: {}` with the explicit set the reusable workflows
need, matching the pattern in Uniswap/universe and the documented
requirements in `_claude-code-review.yml`. Also fix the model value
in the review workflow from the non-existent `claude-opus-4-5` to
`claude-opus-4-6`.
Verified by comparing against universal-router and universe (both
running the same reusable workflows successfully) and against
initializer (also pinned to `permissions: {}` and also failing every
run with startup_failure).
🤖 Claude Code Review
Waiting for review to complete... 💡 Want a fresh review? Add a comment containing |
🤖 Claude PR Metadata GenerationStatus: ❌ Error
|
🤖 Claude Code ReviewStatus: The review was completed but there was an error posting inline comments. Raw Review OutputPlease check the workflow logs for details. |
🤖 Claude Code ReviewStatus: ❌ Error
|
Bump the pinned ai-toolkit SHA in both Claude workflows from 9aa3cf98744a2b4e1aac51cd2d26144ea337ab3b to 96ef665ba04221de07e94fcc3ea69fe32c7cf306 (current Uniswap/ai-toolkit main tip). claude-code-review.yml: - Update reusable workflow ref and toolkit_ref input. - Drop custom_prompt_path: the new SHA replaced custom_prompt / custom_prompt_path with granular prompt_override_* inputs (one per prompt section). Falling back to the toolkit's default prompt is the safe migration; splitting .claude/prompts/claude-pr-review.md into prompt_override_review_priorities, prompt_override_files_to_skip, prompt_override_communication_style, etc. can land as a follow-up using the pattern in Uniswap/universe and Uniswap/sdks. - Bump contents permission from read to write: the new SHA's job-level permissions request contents: write to support the auto_fix feature. claude-pr-metadata-update.yml: - Update reusable workflow ref only. Inputs schema unchanged at the new SHA, so this is a clean bump.
Summary
startup_failure: Replacepermissions: {}inclaude-code-review.ymlandclaude-pr-metadata-update.ymlwith the explicit set the reusable workflows inUniswap/ai-toolkitrequire. The empty scope was capping the GITHUB_TOKEN delegated to the called workflow at no permissions, which the reusable workflow's job-levelpermissions:block cannot satisfy, so every recent run terminated asstartup_failurebefore producing any job (e.g. https://github.com/Uniswap/protocol-fees/actions/runs/25402872564). The pattern matchesUniswap/initializer(alsopermissions: {}, also fails every run);Uniswap/universal-router(nopermissions:block, inherits repo default) andUniswap/universe(explicit permissions block) both run the same reusable workflow successfully.model: "claude-opus-4-5"is not a real Anthropic model; bumped toclaude-opus-4-6.9aa3cf98744a2b4e1aac51cd2d26144ea337ab3bto96ef665ba04221de07e94fcc3ea69fe32c7cf306(currentUniswap/ai-toolkitmaintip). For the metadata workflow this is a clean bump (inputs schema unchanged). For the review workflow:custom_prompt/custom_prompt_pathwith granularprompt_override_*inputs (one per prompt section). Droppedcustom_prompt_pathso the workflow falls back to the toolkit's curated default prompt. Splitting.claude/prompts/claude-pr-review.mdintoprompt_override_review_priorities,prompt_override_files_to_skip,prompt_override_communication_style, etc. can land as a follow-up using the pattern inUniswap/universeandUniswap/sdks.contentspermission fromreadtowrite: the new SHA's job-level permissions requestcontents: writeto support theauto_fixfeature.Test plan
[claude] Claude Code Reviewand[claude] Generate PR Title & Descriptioncomplete withoutstartup_failure.COMMENT-level review) on this PR.