|
| 1 | +# Requires ANTHROPIC_API_KEY secret in repo Settings > Secrets and variables > Actions. |
| 2 | + |
| 3 | +name: Claude Code |
| 4 | + |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + types: [opened, synchronize] |
| 8 | + issue_comment: |
| 9 | + types: [created] |
| 10 | + pull_request_review_comment: |
| 11 | + types: [created] |
| 12 | + |
| 13 | +jobs: |
| 14 | + claude: |
| 15 | + if: > |
| 16 | + github.event_name == 'pull_request' || |
| 17 | + contains(github.event.comment.body, '@claude') |
| 18 | + runs-on: ubuntu-latest |
| 19 | + permissions: |
| 20 | + contents: read |
| 21 | + pull-requests: write |
| 22 | + issues: write |
| 23 | + id-token: write |
| 24 | + |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + fetch-depth: 0 |
| 29 | + |
| 30 | + - uses: anthropics/claude-code-action@v1 |
| 31 | + with: |
| 32 | + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 33 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + claude_args: | |
| 35 | + --allowedTools "Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git:*)" |
| 36 | + prompt: | |
| 37 | + REPO: ${{ github.repository }} |
| 38 | + PR NUMBER: ${{ github.event.pull_request.number }} |
| 39 | +
|
| 40 | + You are a PR reviewer. ONLY review the files changed in this PR. |
| 41 | + Use gh pr diff to see what changed. Do NOT review unchanged files. |
| 42 | +
|
| 43 | + After your review, post your findings as a single PR comment using: |
| 44 | + gh pr comment ${{ github.event.pull_request.number }} --body "your review" |
| 45 | +
|
| 46 | + Only post GitHub comments - do not submit review text as messages. |
| 47 | +
|
| 48 | + Format your comment as: |
| 49 | +
|
| 50 | + ## PR Review Summary |
| 51 | +
|
| 52 | + ### Changes |
| 53 | + Brief description of what this PR changes. |
| 54 | +
|
| 55 | + ### Blocking Issues |
| 56 | + Numbered list of critical issues that must be fixed before merge. |
| 57 | + Include file path and line numbers. Explain the issue and provide a fix. |
| 58 | + If none, write None found. |
| 59 | +
|
| 60 | + ### Suggestions |
| 61 | + Numbered list of non-blocking improvements. |
| 62 | + If none, write None. |
| 63 | +
|
| 64 | + ### Positive Notes |
| 65 | + Brief bullet points of what looks good. |
| 66 | +
|
| 67 | + Review focus areas: |
| 68 | + - Rust safety (unsafe blocks, memory management, ownership) |
| 69 | + - Security vulnerabilities (especially cryptographic and smart contract logic) |
| 70 | + - Confidential txs (type 0x4a): encryption_pubkey/nonce handling, no plaintext leaks in logs/errors/RPC responses |
| 71 | + - Enclave/TEE: purpose keys (tx_io_pk/tx_io_sk) never logged or serialized, mock server gated to test/dev |
| 72 | + - EVM execution: SeismicSpecId mapping, confidential state isolation, SeismicReceipt correctness |
| 73 | + - TxPool: RecentBlockCache block hash validation, RwLock race conditions |
| 74 | + - RPC: signed_read_to_plaintext_tx coverage, purpose key endpoint safety |
| 75 | + - Hardforks: Mercury activation correctness, all standard forks at genesis |
| 76 | + - Codec backward compatibility, no libmdbx modifications |
| 77 | + - Clippy strictness: no unwrap/expect/indexing/panic/unreachable/todo (Seismic CI enforces as errors) |
| 78 | + - Performance and error handling |
| 79 | + - Test coverage gaps |
0 commit comments