ci: agentic Claude review pipeline + CodeRabbit Pro config - #25
Conversation
Three-file rollout to bring this repo to ecosystem-wide review parity. Files: - .coderabbit.yaml: Pro config, schema-validated. MAF-focused path_instructions for ANcpLua.Agents (stable), .Testing and .Testing.Workflows (preview-only). Custom_checks enforce: no DateTime.Now, no .Result/.Wait, no null-forgiving without justification, suppressions LIMITED to MEAI001/OPENAI002 (MAF preview markers — only acceptable suppression code), no preview-type leak from MAF into stable ANcpLua.Agents public surface. - .github/workflows/claude-code-review.yml: agentic Claude review. - .github/workflows/coderabbit-autofix.yml: auto-trigger CodeRabbit autofix. CLAUDE_CODE_OAUTH_TOKEN already configured (set 2026-04-25). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai autofix |
|
Caution Review failedPull request was closed or merged during review Warning
|
| Layer / File(s) | Summary |
|---|---|
Trigger & Path Exclusions .github/workflows/claude-code-review.yml (lines 1–8) |
Workflow fires on PR events (opened, synchronize, ready_for_review, reopened), excluding CHANGELOG.md and lock files. |
Permissions & Guard Conditions .github/workflows/claude-code-review.yml (lines 9–20) |
Grants contents and pull-requests write, actions read, and OpenID token access. Job skips if actor is coderabbitai[bot] or PR title/labels signal skip review or skip-review. |
Concurrency & Checkout .github/workflows/claude-code-review.yml (lines 21–28) |
Concurrency keyed to PR number with in-progress cancellation; checks out PR head. |
Agentic Action & Decision Logic .github/workflows/claude-code-review.yml (lines 29–64) |
Invokes anthropics/claude-code-action@v1 in agentic mode with model/turn limits, marketplace config, and a prompt decision tree: push fixes directly if mechanical, post blocking comment if structural concerns, or post approval comment if clean. Instructs agent to consult repository guidance files. |
CodeRabbit Autofix Trigger Workflow
| Layer / File(s) | Summary |
|---|---|
Trigger Definition .github/workflows/coderabbit-autofix.yml (lines 1–7) |
Workflow fires on PR opened and synchronize events. |
Job Guards & Concurrency .github/workflows/coderabbit-autofix.yml (lines 8–17) |
Job skips for coderabbitai[bot], dependabot[bot], or renovate[bot] actors and when PR carries skip-autofix label. Concurrency keyed per PR with in-progress cancellation. |
Permissions & Bot Trigger .github/workflows/coderabbit-autofix.yml (lines 18–30) |
Grants pull-requests: write. Posts comment @coderabbitai autofix via actions/github-script@v7 to trigger the bot. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
area:infra
🚥 Pre-merge checks | ✅ 7 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Cancellationtoken Threading | Multiple public async methods lack CancellationToken parameters, violating the requirement for proper cancellation propagation across the public API surface. | Add CancellationToken cancellationToken = default parameter to all public async methods and forward it to all async operations within them. |
✅ Passed checks (7 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title follows conventional commit format with 'ci' area prefix and concisely describes the two main additions (agentic Claude review pipeline and CodeRabbit Pro config) within the 72-character limit. |
| Description check | ✅ Passed | The description clearly relates to the changeset, explicitly listing the three new files (.coderabbit.yaml, claude-code-review.yml, coderabbit-autofix.yml) and detailing their purposes and configurations. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Otel Instrumentation Required | ✅ Passed | PR adds only CI/CD configuration files without introducing new injectable service classes. |
| No Unbounded Mcp Responses | ✅ Passed | PR contains only CI/CD workflow and code review configuration; no MCP tool definitions under src/qyl.mcp/ are added or modified. |
| Duckdb Backpressure On Write Paths | ✅ Passed | PR adds only CI/CD configuration files (GitHub Actions workflows and CodeRabbit YAML), not application code with database write operations. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
Review rate limit: 0/5 reviews remaining, refill in 51 minutes and 42 seconds.
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f951cce83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Checkout PR head | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.ref }} |
There was a problem hiding this comment.
Check out PR head from the source repository
This checkout step only sets ref to github.event.pull_request.head.ref but leaves repository at its default (github.repository), so PRs opened from forks can resolve the wrong branch or fail because that branch name does not exist in the base repo. The actions/checkout docs call out that the default token is scoped to the current repository and recommend explicit PR-head checkout patterns; for forked PRs you should also set repository: ${{ github.event.pull_request.head.repo.full_name }} (or use head.sha) to guarantee the workflow reviews the actual submitted code.
Useful? React with 👍 / 👎.
|
|
||
| - name: Run Claude Code Review (agentic) | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 |
There was a problem hiding this comment.
Pin third-party review action to an immutable SHA
Using anthropics/claude-code-action@v1 makes this workflow depend on a mutable tag, so upstream retags or supply-chain compromise can change behavior without any repo change. This is also inconsistent with the repository’s own workflow policy in .coderabbit.yaml (.github/workflows/**: “Pin third-party actions to SHA”). Pinning to a full commit SHA keeps CI behavior reproducible and auditable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds repository-level AI review automation so PRs can be reviewed/fixed automatically alongside the existing CI/publish infrastructure.
Changes:
- Adds a new Claude Code review workflow that runs on pull request updates.
- Adds a workflow that posts a CodeRabbit autofix trigger comment on PRs.
- Introduces a repo-specific
.coderabbit.yamlwith review scope, path instructions, checks, and knowledge-base settings tailored to this MAF-based codebase.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
.github/workflows/coderabbit-autofix.yml |
New PR workflow that comments @coderabbitai autofix to trigger CodeRabbit autofix runs. |
.github/workflows/claude-code-review.yml |
New PR workflow that runs Anthropic's Claude Code review action with an agentic review prompt. |
.coderabbit.yaml |
New CodeRabbit Pro configuration covering review behavior, repo-specific path guidance, checks, and knowledge-base inputs. |
| steps: | ||
| - name: Checkout PR head | ||
| uses: actions/checkout@v6 | ||
| with: |
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, ready_for_review, reopened] |
|
|
||
| - name: Run Claude Code Review (agentic) | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 |
| Read AGENTS.md / CLAUDE.md / MAF1.3Mapping.md / .coderabbit.yaml — the | ||
| ARCHITECTURAL INVARIANTS sections under src/ANcpLua.Agents/ are | ||
| authoritative, especially around MEAI001/OPENAI002 suppressions. |
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] |
| name: 'Suppressions limited to MEAI001/OPENAI002' | ||
| instructions: | | ||
| Scan added/modified C# files for `#pragma warning disable` or | ||
| `[SuppressMessage]` attributes. Pass if none added. Fail if a | ||
| suppression is added for a code OTHER than MEAI001 or OPENAI002 | ||
| (the only acceptable suppressions per repo policy — MAF preview | ||
| API markers). Also fail if MEAI001/OPENAI002 is suppressed on | ||
| code that doesn't actually call MAF preview API. |
| code_guidelines: | ||
| enabled: true | ||
| filePatterns: | ||
| - '**/CLAUDE.md' | ||
| - '**/AGENTS.md' | ||
| - 'Directory.Build.props' | ||
| - 'Directory.Packages.props' | ||
| - 'Version.props' | ||
| - 'MAF1.3Mapping.md' |
| name: 'No null-forgiving operator without justification' | ||
| instructions: | | ||
| Scan added/modified C# files for `!` (null-forgiving). Pass if | ||
| none. Fail if any `!` is added without an inline comment. |
Summary
Brings this repo to ecosystem-wide review parity.
Files
.coderabbit.yaml(new) — Pro config with MAF-focusedpath_instructions. Custom checks enforce: noDateTime.Now, no.Result/.Wait, no null-forgiving without justification, suppressions LIMITED toMEAI001/OPENAI002(the only acceptable suppression codes per repo policy), no preview-type leak from MAF into stableANcpLua.Agentspublic surface..github/workflows/claude-code-review.yml(new) — agentic Claude review..github/workflows/coderabbit-autofix.yml(new) — auto-trigger CodeRabbit autofix.Test plan