Repository navigation
ci: use lambdaclass/actions reusable workflows for AI review - #69
Conversation
🤖 Kimi Code ReviewReview SummaryThis PR replaces individual AI review workflows with a unified approach using lambdaclass/actions reusable workflows. The changes are infrastructure-only and don't affect consensus-critical code. Issues Found1. Missing Secrets Validation (ai-review.yml:18-36)The workflow will fail silently if required secrets are missing. Add validation: - name: Validate secrets
run: |
if [ -z "${{ secrets.KIMI_API_KEY }}" ]; then
echo "::warning::KIMI_API_KEY not configured - Kimi reviews disabled"
fi
if [ -z "${{ secrets.OPENAI_API_KEY }}" ]; then
echo "::warning::OPENAI_API_KEY not configured - Codex reviews disabled"
fi
if [ -z "${{ secrets.ANTHROPIC_API_KEY }}" ]; then
echo "::warning::ANTHROPIC_API_KEY not configured - Claude reviews disabled"
fi2. Workflow Trigger Inconsistency (ai-review.yml:19-22)The new workflow triggers on
Fix: Add missing trigger types: types: [opened, synchronize, reopened, ready_for_review]3. Comment Trigger Support UnclearThe PR description mentions 4. Permission RegressionOld workflows had explicit
Verify these are set in the reusable workflows. Positive Changes✅ Cleaner maintenance - Single workflow file vs 3 separate ones RecommendationAddress the trigger inconsistency (#2) before merging - this is the only user-visible regression. Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Codex Code ReviewFindings
Consensus-layer review
If the reusable workflows already enforce trusted-commenter gating and set permissions internally, this looks fine. Automated review by OpenAI Codex · custom prompt |
Greptile OverviewGreptile SummaryThis PR consolidates three separate AI review workflows (ChatGPT, Claude, Kimi) into a single unified workflow that uses reusable workflows from Key changes:
Critical behavioral change:
Other considerations:
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| .github/workflows/ai-review.yml | New unified workflow using reusable workflows, but missing key configurations like permissions, concurrency control, and synchronize trigger |
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant AI Review Workflow
participant Kimi Reusable WF
participant Codex Reusable WF
participant Claude Reusable WF
participant Kimi API
participant OpenAI API
participant Anthropic API
alt PR opened or ready_for_review
User->>GitHub: Open/Ready PR
GitHub->>AI Review Workflow: Trigger workflow
else On-demand via comment
User->>GitHub: Comment /kimi, /codex, or /claude
GitHub->>AI Review Workflow: Trigger workflow
end
par Parallel Reviews
AI Review Workflow->>Kimi Reusable WF: Call reusable workflow
Kimi Reusable WF->>Kimi API: Request review
Kimi API-->>Kimi Reusable WF: Return review
Kimi Reusable WF->>GitHub: Post review comment
and
AI Review Workflow->>Codex Reusable WF: Call reusable workflow
Codex Reusable WF->>OpenAI API: Request review
OpenAI API-->>Codex Reusable WF: Return review
Codex Reusable WF->>GitHub: Post review comment
and
AI Review Workflow->>Claude Reusable WF: Call reusable workflow
Claude Reusable WF->>Anthropic API: Request review
Anthropic API-->>Claude Reusable WF: Return review
Claude Reusable WF->>GitHub: Post review comment
end
GitHub-->>User: Display review comments
| pull_request: | ||
| types: [opened, ready_for_review] |
There was a problem hiding this comment.
Missing synchronize trigger - old workflows ran on PR updates (synchronize), this only runs on opened and ready_for_review
| pull_request: | |
| types: [opened, ready_for_review] | |
| pull_request: | |
| types: [opened, ready_for_review, synchronize] |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 17:18
Comment:
Missing `synchronize` trigger - old workflows ran on PR updates (`synchronize`), this only runs on `opened` and `ready_for_review`
```suggestion
pull_request:
types: [opened, ready_for_review, synchronize]
```
How can I resolve this? If you propose a fix, please make it concise.| name: AI Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review] | ||
| issue_comment: | ||
| types: [created] |
There was a problem hiding this comment.
Check that permissions are correctly inherited from the reusable workflows - old workflows explicitly set contents: read, pull-requests: write (Claude also had issues: write and id-token: write)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 14:20
Comment:
Check that permissions are correctly inherited from the reusable workflows - old workflows explicitly set `contents: read`, `pull-requests: write` (Claude also had `issues: write` and `id-token: write`)
How can I resolve this? If you propose a fix, please make it concise.| jobs: | ||
| kimi-review: | ||
| uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1 | ||
| secrets: | ||
| KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }} | ||
|
|
||
| codex-review: | ||
| uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1 | ||
| secrets: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
|
||
| claude-review: | ||
| uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1 | ||
| secrets: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
There was a problem hiding this comment.
Consider adding concurrency control to cancel in-progress runs when new commits are pushed, preventing wasted API credits:
| jobs: | |
| kimi-review: | |
| uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1 | |
| secrets: | |
| KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }} | |
| codex-review: | |
| uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1 | |
| secrets: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| claude-review: | |
| uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1 | |
| secrets: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| jobs: | |
| kimi-review: | |
| concurrency: | |
| group: ${{ github.workflow }}-kimi-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1 | |
| secrets: | |
| KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }} | |
| codex-review: | |
| concurrency: | |
| group: ${{ github.workflow }}-codex-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1 | |
| secrets: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| claude-review: | |
| concurrency: | |
| group: ${{ github.workflow }}-claude-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1 | |
| secrets: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ai-review.yml
Line: 22:36
Comment:
Consider adding concurrency control to cancel in-progress runs when new commits are pushed, preventing wasted API credits:
```suggestion
jobs:
kimi-review:
concurrency:
group: ${{ github.workflow }}-kimi-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-kimi.yml@v1
secrets:
KIMI_API_KEY: ${{ secrets.KIMI_API_KEY }}
codex-review:
concurrency:
group: ${{ github.workflow }}-codex-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-codex.yml@v1
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
claude-review:
concurrency:
group: ${{ github.workflow }}-claude-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
uses: lambdaclass/actions/.github/workflows/ai-review-claude.yml@v1
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.…ctions (lambdaclass#763) ## 🗒️ Description / Motivation `lambdaclass/actions` `v1` has moved on since our pin (`2127455`, Sep 1). It now ships three more reviewers (DeepSeek, Gemini, Grok), a `/review` command that triggers every reviewer a repo calls, and a Claude reviewer that is a single Messages API call instead of a Claude Code agent run. This PR brings us up to date and adds the new reviewers. ## What Changed `.github/workflows/ai-review.yml` only: | Change | Detail | |---|---| | Pin bump | Kimi, Codex, Claude: `2127455` → `ad22254` (what `v1` points at today), still SHA-pinned as in lambdaclass#713 | | New reviewers | `ai-review-deepseek.yml`, `ai-review-gemini.yml`, `ai-review-grok.yml` | | Comment gate | Each job starts on a comment only when it begins with its own command (`/kimi`, `/codex`, `/claude`, `/deepseek`, `/gemini`, `/grok`) or `/review`. Before, every PR comment spawned one run per reviewer that then skipped inside the called workflow | | `permissions:` | `contents: read` + `pull-requests: write`, which is all the called workflows declare; the repo default grants write to everything | ## Correctness / Behavior Guarantees How a review triggers: ``` pull_request: opened / ready_for_review └─ not a draft (this workflow) └─ head repo == this repo (called workflow) └─ all 6 reviewers run issue_comment: created └─ starts with /review or /<name> (this workflow) └─ on a PR, author is OWNER / MEMBER / COLLABORATOR (called workflow) └─ /review → all 6, /<name> → that one ``` Behavior changes reviewers should know about: - **Missing secrets.** DeepSeek, Gemini and Grok need `DEEPSEEK_API_KEY`, `GEMINI_API_KEY` and `XAI_API_KEY`, which this repo does not have yet. Until they are added, each of those reviewers posts a "secret is not set" comment and fails its check on every PR. - **A review that does not happen now fails its check** (upstream change): an empty response or provider outage is red rather than green with a comment. - **Claude reviewer** is now one API call over the diff (no checkout, no tools), defaulting to `claude-opus-5-5` at `effort: high`. We passed none of the removed inputs (`max_turns`, `allowed_tools`), so no `with:` changes are needed. - Default models moved upstream: Kimi `kimi-k3.1-pro`, Codex `gpt-6.1-sol`. ## Tests Added / Run - `actionlint -ignore SC2086 -ignore 'specifying action "\$/' .github/workflows/ai-review.yml` (same flags as `pr_lint_gha.yaml`): clean - `gh actions-lock --verify` (same as `verify-lockfile.yml`): all 13 workflows valid; reusable workflows are not tracked in `actions.lock`, so it needs no update ## Related Issues / PRs - Related to lambdaclass#713 (action pinning), lambdaclass#305 (skip drafts), lambdaclass#69 (adopt `lambdaclass/actions`) ## ✅ Verification Checklist - [x] Ran `make fmt`: n/a, no Rust changes - [x] Ran `make lint`: n/a, no Rust changes - [x] Ran `make test`: n/a, no Rust changes
Summary
/kimi,/codex,/claudecommandsChanges
.github/workflows/ai-review.yml- unified workflow using lambdaclass/actions@v1.github/prompts/pr_review.md→ai-review.mdpr_review_chatgpt.yaml,pr_review_claude.yaml,pr_review_kimi.yamlTest plan
/kimi,/codex,/claude)