Skip to content

Commit e7e02be

Browse files
authored
Merge branch 'main' into INF2-migrate-to-self-hosted
2 parents 8d272ea + d188fcf commit e7e02be

115 files changed

Lines changed: 28663 additions & 3088 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/claude-code-review.yml

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ name: Claude review
77

88
on:
99
# Trigger: new/updated PRs to main
10-
pull_request:
11-
types: [opened, synchronize, ready_for_review, reopened]
12-
branches:
13-
- main
10+
# pull_request:
11+
# types: [opened, synchronize, ready_for_review, reopened]
12+
# branches:
13+
# - main
1414

1515
# Trigger: @claude mentions in comments
1616
issue_comment:
@@ -22,96 +22,96 @@ on:
2222

2323
jobs:
2424
# Job 1: Auto-review on PR open/update (no forks, no drafts)
25-
auto-review:
26-
if: |
27-
github.event_name == 'pull_request' &&
28-
!github.event.pull_request.draft &&
29-
!github.event.pull_request.head.repo.fork
30-
runs-on: ubuntu-latest
31-
timeout-minutes: 15
32-
permissions:
33-
contents: read
34-
pull-requests: write
35-
id-token: write
36-
actions: read
37-
steps:
38-
# Checkout base branch (trusted) - Claude reads PR diff via gh pr diff
39-
# This avoids CodeQL "checkout of untrusted code in trusted context" warning
40-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
41-
with:
42-
fetch-depth: 20
43-
44-
- name: Apply PR diff to workspace
45-
id: apply_diff
46-
env:
47-
GH_TOKEN: ${{ github.token }}
48-
PR_NUMBER: ${{ github.event.pull_request.number }}
49-
REPO: ${{ github.repository }}
50-
run: |
51-
set -euo pipefail
52-
base_sha="$(gh pr view "$PR_NUMBER" --repo "$REPO" --json baseRefOid -q '.baseRefOid')"
53-
git fetch --depth=1 origin "$base_sha"
54-
git checkout --detach "$base_sha"
55-
gh pr diff "$PR_NUMBER" > pr.diff
56-
if ! git apply --3way --whitespace=nowarn pr.diff; then
57-
rm -f pr.diff
58-
echo "apply_ok=false" >> "$GITHUB_OUTPUT"
59-
exit 0
60-
fi
61-
rm pr.diff
62-
echo "apply_ok=true" >> "$GITHUB_OUTPUT"
63-
64-
- name: Comment when diff apply fails
65-
if: steps.apply_diff.outputs.apply_ok == 'false'
66-
env:
67-
GH_TOKEN: ${{ github.token }}
68-
PR_NUMBER: ${{ github.event.pull_request.number }}
69-
run: |
70-
gh pr comment "$PR_NUMBER" --repo "${{ github.repository }}" \
71-
--body "<!-- claude-apply-fail -->Skipped: PR diff failed to apply. Rebase and re-push."
72-
73-
- uses: anthropics/claude-code-action@70e16deb18402428bd09e08d1ec3662a872e3c72 # v1
74-
if: steps.apply_diff.outputs.apply_ok != 'false'
75-
with:
76-
anthropic_api_key: ${{ secrets.ORG_ANTHROPIC_API_KEY }}
77-
additional_permissions: "actions: read"
78-
track_progress: true
79-
use_sticky_comment: true
80-
prompt: |
81-
Follow CLAUDE.md for project context and conventions.
82-
For contract details, read the relevant docs in /docs folder.
83-
84-
REPO: ${{ github.repository }}
85-
PR NUMBER: ${{ github.event.pull_request.number }}
86-
87-
First, identify the PR type from the title (feat|fix|docs|test|refactor|ci|perf|style|chore|release):
88-
- **feat/fix**: Full review - correctness, security, edge cases, gas, events, test coverage
89-
- **perf**: Focus on gas optimization correctness and no functional regressions
90-
- **test**: Check assertions are correct, edge cases covered, no false positives
91-
- **docs**: Check accuracy against actual code behavior
92-
- **style/refactor**: No functional changes - verify behavior is preserved
93-
- **chore/ci/release**: Light review - check for unintended side effects
94-
95-
For Solidity changes, check:
96-
1. **Correctness**: Does it work? Edge cases handled? Invariants preserved?
97-
2. **Security**: Access control, reentrancy, overflow, unsafe external calls
98-
3. **Integration**: How do changes affect other contracts that interact with this one?
99-
100-
For each issue found:
101-
- Use inline comment on the specific line
102-
- Explain the problem
103-
- Provide a suggested fix as a diff block:
104-
```diff
105-
- old code
106-
+ new code
107-
```
108-
109-
Use top-level comment for summary only.
110-
111-
claude_args: |
112-
--allowedTools "Read,Glob,Grep,mcp__github_inline_comment__create_inline_comment,Bash(git fetch:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr checks:*),Bash(gh run list:*),Bash(gh run view:*)"
113-
--system-prompt "If you inspect CI logs, never paste raw logs. Summarize likely cause only. Redact tokens, keys, credentials, or URLs with credentials. If unsure, say log may contain sensitive data and stop."
114-
--max-turns 15
25+
# auto-review:
26+
# if: |
27+
# github.event_name == 'pull_request' &&
28+
# !github.event.pull_request.draft &&
29+
# !github.event.pull_request.head.repo.fork
30+
# runs-on: ubuntu-latest
31+
# timeout-minutes: 15
32+
# permissions:
33+
# contents: read
34+
# pull-requests: write
35+
# id-token: write
36+
# actions: read
37+
# steps:
38+
# # Checkout base branch (trusted) - Claude reads PR diff via gh pr diff
39+
# # This avoids CodeQL "checkout of untrusted code in trusted context" warning
40+
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
41+
# with:
42+
# fetch-depth: 20
43+
#
44+
# - name: Apply PR diff to workspace
45+
# id: apply_diff
46+
# env:
47+
# GH_TOKEN: ${{ github.token }}
48+
# PR_NUMBER: ${{ github.event.pull_request.number }}
49+
# REPO: ${{ github.repository }}
50+
# run: |
51+
# set -euo pipefail
52+
# base_sha="$(gh pr view "$PR_NUMBER" --repo "$REPO" --json baseRefOid -q '.baseRefOid')"
53+
# git fetch --depth=1 origin "$base_sha"
54+
# git checkout --detach "$base_sha"
55+
# gh pr diff "$PR_NUMBER" > pr.diff
56+
# if ! git apply --3way --whitespace=nowarn pr.diff; then
57+
# rm -f pr.diff
58+
# echo "apply_ok=false" >> "$GITHUB_OUTPUT"
59+
# exit 0
60+
# fi
61+
# rm pr.diff
62+
# echo "apply_ok=true" >> "$GITHUB_OUTPUT"
63+
#
64+
# - name: Comment when diff apply fails
65+
# if: steps.apply_diff.outputs.apply_ok == 'false'
66+
# env:
67+
# GH_TOKEN: ${{ github.token }}
68+
# PR_NUMBER: ${{ github.event.pull_request.number }}
69+
# run: |
70+
# gh pr comment "$PR_NUMBER" --repo "${{ github.repository }}" \
71+
# --body "<!-- claude-apply-fail -->Skipped: PR diff failed to apply. Rebase and re-push."
72+
#
73+
# - uses: anthropics/claude-code-action@70e16deb18402428bd09e08d1ec3662a872e3c72 # v1
74+
# if: steps.apply_diff.outputs.apply_ok != 'false'
75+
# with:
76+
# anthropic_api_key: ${{ secrets.ORG_ANTHROPIC_API_KEY }}
77+
# additional_permissions: "actions: read"
78+
# track_progress: true
79+
# use_sticky_comment: true
80+
# prompt: |
81+
# Follow CLAUDE.md for project context and conventions.
82+
# For contract details, read the relevant docs in /docs folder.
83+
#
84+
# REPO: ${{ github.repository }}
85+
# PR NUMBER: ${{ github.event.pull_request.number }}
86+
#
87+
# First, identify the PR type from the title (feat|fix|docs|test|refactor|ci|perf|style|chore|release):
88+
# - **feat/fix**: Full review - correctness, security, edge cases, gas, events, test coverage
89+
# - **perf**: Focus on gas optimization correctness and no functional regressions
90+
# - **test**: Check assertions are correct, edge cases covered, no false positives
91+
# - **docs**: Check accuracy against actual code behavior
92+
# - **style/refactor**: No functional changes - verify behavior is preserved
93+
# - **chore/ci/release**: Light review - check for unintended side effects
94+
#
95+
# For Solidity changes, check:
96+
# 1. **Correctness**: Does it work? Edge cases handled? Invariants preserved?
97+
# 2. **Security**: Access control, reentrancy, overflow, unsafe external calls
98+
# 3. **Integration**: How do changes affect other contracts that interact with this one?
99+
#
100+
# For each issue found:
101+
# - Use inline comment on the specific line
102+
# - Explain the problem
103+
# - Provide a suggested fix as a diff block:
104+
# ```diff
105+
# - old code
106+
# + new code
107+
# ```
108+
#
109+
# Use top-level comment for summary only.
110+
#
111+
# claude_args: |
112+
# --allowedTools "Read,Glob,Grep,mcp__github_inline_comment__create_inline_comment,Bash(git fetch:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr checks:*),Bash(gh run list:*),Bash(gh run view:*)"
113+
# --system-prompt "If you inspect CI logs, never paste raw logs. Summarize likely cause only. Redact tokens, keys, credentials, or URLs with credentials. If unsure, say log may contain sensitive data and stop."
114+
# --max-turns 15
115115

116116
# Job 2: @claude mentions in any PR comment (members only)
117117
# - issue_comment: PR conversation comments (no fork info available, member-check is sufficient)

.github/workflows/validate-deployment-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
test:
1717
runs-on: protocol-x64-16core
1818
strategy:
19-
fail-fast: true
19+
fail-fast: false
2020
matrix:
2121
env: [mainnet, testnet-sepolia, testnet-hoodi, testnet-base-sepolia, base, preprod-hoodi]
2222

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ artifacts
1717
#Foundry files
1818
out
1919
cache
20+
snapshots
2021

2122
*.DS_Store
2223

0 commit comments

Comments
 (0)