ci(l1,l2): add issues: write permission to AI review caller workflow#6135
Conversation
The Codex reusable workflow (ai-review-codex.yml) has a nested post_feedback job that requests issues: write. When the caller workflow sets explicit permissions without granting issues: write, GitHub blocks the entire workflow at startup with: "The nested job 'post_feedback' is requesting 'issues: write', but is only allowed 'issues: none'." This caused all AI review runs to fail with startup_failure.
There was a problem hiding this comment.
Pull request overview
This PR fixes a workflow failure in the AI review workflow by adding the missing issues: write permission. The AI review workflow, introduced in PR #6106, fails with a startup_failure error because the reusable workflow's post_feedback job requires issues: write, but the caller workflow only granted contents: read and pull-requests: write.
Changes:
- Add
issues: writepermission to the caller workflow permissions block
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile OverviewGreptile SummaryThis PR fixes a permission issue causing the AI review workflow to fail with
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .github/workflows/pr_ai_review.yaml | Added issues: write permission to fix startup_failure error in nested job |
Sequence Diagram
sequenceDiagram
participant PR as Pull Request Event
participant Caller as pr_ai_review.yaml
participant Kimi as ai-review-kimi.yml
participant Codex as ai-review-codex.yml
participant Claude as ai-review-claude.yml
participant GH as GitHub API
PR->>Caller: Trigger (opened/ready_for_review)
Note over Caller: permissions:<br/>contents: read<br/>pull-requests: write<br/>issues: write
par Run AI Reviews
Caller->>Kimi: Call reusable workflow
Kimi->>GH: Post review comments
and
Caller->>Codex: Call reusable workflow
Codex->>GH: Post feedback (needs issues: write)
and
Caller->>Claude: Call reusable workflow
Claude->>GH: Post review comments
end
GH-->>PR: AI review feedback posted
The caller workflow was specifying explicit permissions (contents: read, pull-requests: write) which restricts the maximum permissions available to nested reusable workflows. The Codex workflow needs issues: write and the Claude workflow needs id-token: write, so each new requirement would need to be added manually. Removing the block entirely lets the workflow use the repo's default token permissions, matching the working setup in lambdaclass/ethlambda.
The repo's default token permissions are read-only, so we must explicitly grant every permission the reusable workflows need: contents: read and pull-requests: write (Kimi), issues: write (Codex post_feedback job), and id-token: write (Claude code action).
🤖 Kimi Code ReviewReview of PR #6135File: Issues Found:
Recommendations:
The changes appear to be workflow configuration rather than core ethrex code, so there are no Ethereum-specific concerns in this diff. Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Codex Code ReviewFocused review on Findings
Minor/Perf
If the reusable workflows already enforce author checks and use OIDC, note that in the PR description to avoid confusion. Automated review by OpenAI Codex · custom prompt |
Motivation
The AI review workflow (#6106) fails with
startup_failureon every run. The caller workflow specified explicit permissions (contents: read,pull-requests: write), which restricts the maximum permissions available to nested reusable workflow jobs. The reusable workflows inlambdaclass/actionsrequire additional permissions:pull-requests: write(already granted)post_feedbackjob:issues: writeclaude-reviewjob:id-token: writeMissing any of these causes the entire workflow to fail at startup with no logs.
Description
Add the missing
issues: writeandid-token: writepermissions to the caller workflow's permissions block.Checklist
STORE_SCHEMA_VERSION(crates/storage/lib.rs) if the PR includes breaking changes to theStorerequiring a re-sync.