Skip to content

Commit 8d575aa

Browse files
Merge branch 'next' into docs/nico-changes
2 parents 351dd30 + df95546 commit 8d575aa

File tree

2,048 files changed

+70421
-44978
lines changed

Some content is hidden

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

2,048 files changed

+70421
-44978
lines changed

.claude/scripts/check-ci-url.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python3
2+
import json
3+
import re
4+
import sys
5+
6+
data = json.load(sys.stdin)
7+
url = data.get('tool_input', {}).get('url', '')
8+
9+
if 'ci.aztec-labs.com' in url:
10+
# Allow if basic auth is present (user:pass@)
11+
if re.search(r'://[^/:]+:[^/@]+@ci\.aztec-labs\.com', url):
12+
sys.exit(0)
13+
print(f'BLOCKED: Cannot WebFetch ci.aztec-labs.com (requires auth). Use /ci-logs skill instead: /ci-logs {url}', file=sys.stderr)
14+
sys.exit(2)
15+
16+
sys.exit(0)

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PreToolUse": [
4+
{
5+
"matcher": "WebFetch",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "python3 .claude/scripts/check-ci-url.py"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.claude/skills/adding-benchmarks/SKILL.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ function bench_cmds {
139139

140140
**Options:** `:ISOLATE=1`, `:CPUS=8`, `:MEM=16g`, `:TIMEOUT=7200`
141141

142+
**CPUS Suggestion:** For long running or compute-heavy benchmarks allocate CPUs (`:CPUS=N`). Benchmarks have strict scheduling, so if you request X CPUs, you'll have them available for consistent results.
143+
144+
**ISOLATE Suggestion:** Use `:ISOLATE=1` when your benchmark needs a clean, isolated environment with no network access and pinned resources. This runs the test in a Docker container, ensuring reproducible results without interference from other processes.
145+
146+
**MEM Suggestion:** Use `:MEM=Xg` (e.g., `:MEM=16g`) for memory-intensive benchmarks that may exceed the default allocation (CPUS × 4GB). Pair with `:ISOLATE=1` since memory limits are enforced via Docker.
147+
148+
**TIMEOUT Suggestion:** Use `:TIMEOUT=N` (in seconds) for benchmarks that take longer than the default timeout. For example, `:TIMEOUT=1800` for 30 minutes, `:TIMEOUT=7200` for 2 hours.
149+
150+
**Important naming gotcha:** Benchmark test files must use `.bench.test.ts` (with a dot before `bench`), NOT `_bench.test.ts`. The test discovery pattern `[[ "$test" =~ \.bench\.test\.ts$ ]]` specifically looks for `.bench.test.ts`.
151+
142152
### Step 3: Verify
143153

144154
```bash

.claude/skills/ci-log-reader/SKILL.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

.claude/skills/ci-logs/ci-logs.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: ci-logs
3+
description: Analyze CI logs from ci.aztec-labs.com. Use this instead of WebFetch for CI URLs.
4+
user-invocable: true
5+
arguments: <url-or-hash>
6+
---
7+
8+
# CI Log Analysis
9+
10+
When you need to analyze logs from ci.aztec-labs.com, use the Task tool to spawn the analyze-logs agent.
11+
12+
## Usage
13+
14+
1. **Extract the hash** from the URL (e.g., `http://ci.aztec-labs.com/e93bcfdc738dc2e0``e93bcfdc738dc2e0`)
15+
16+
2. **Spawn the analyze-logs agent** using the Task tool:
17+
18+
```
19+
Task(
20+
subagent_type: "analyze-logs",
21+
prompt: "Analyze CI log hash: <hash>. Focus: errors",
22+
description: "Analyze CI logs"
23+
)
24+
```
25+
26+
## Examples
27+
28+
**User asks:** "What failed in http://ci.aztec-labs.com/343c52b17688d2cd"
29+
30+
**You do:**
31+
```
32+
Task(
33+
subagent_type: "analyze-logs",
34+
prompt: "Analyze CI log hash: 343c52b17688d2cd. Focus: errors. Download with: yarn ci dlog 343c52b17688d2cd > /tmp/343c52b17688d2cd.log",
35+
description: "Analyze CI failure"
36+
)
37+
```
38+
39+
**For specific test analysis:**
40+
```
41+
Task(
42+
subagent_type: "analyze-logs",
43+
prompt: "Analyze CI log hash: 343c52b17688d2cd. Focus: test 'my test name'",
44+
description: "Analyze test failure"
45+
)
46+
```
47+
48+
## Do NOT
49+
50+
- Do NOT use WebFetch to access ci.aztec-labs.com (requires auth)
51+
- Do NOT try to curl the URL directly
52+
- Always use the analyze-logs agent which knows how to use `yarn ci dlog`

.github/workflows/ci3.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
7474
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7575
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
76+
# For automatic documentation updates via Claude Code
77+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
7678
# Nightly test env vars.
7779
EXTERNAL_ETHEREUM_HOSTS: "https://json-rpc.${{ secrets.GCP_SEPOLIA_URL }}?key=${{ secrets.GCP_SEPOLIA_API_KEY }},${{ secrets.INFURA_SEPOLIA_URL }}"
7880
EXTERNAL_ETHEREUM_CONSENSUS_HOST: "https://beacon.${{ secrets.GCP_SEPOLIA_URL }}"
@@ -120,6 +122,7 @@ jobs:
120122
# End-to-end tests that target a network deployment.
121123
# We run this every release (at minimum, nightly), or when explicitly requested.
122124
# This task runs against a real testnet deployment. This uses resources on GCP (not AWS, thank free credit incentives).
125+
# Runs two test sets in parallel.
123126
ci-network-scenario:
124127
runs-on: ubuntu-latest
125128
# We either run after a release (tag starting with v), or when the ci-network-scenario label is present in a PR.
@@ -132,7 +135,7 @@ jobs:
132135
with:
133136
ref: ${{ github.event.pull_request.head.sha || github.sha }}
134137

135-
- name: Run Network Deploy
138+
- name: Run Network Scenarios
136139
env:
137140
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
138141
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -145,7 +148,7 @@ jobs:
145148
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
146149
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
147150
RUN_ID: ${{ github.run_id }}
148-
AWS_SHUTDOWN_TIME: 540 # temporarily increased to 9 hours, todo(revert to 360)
151+
AWS_SHUTDOWN_TIME: 360
149152
NO_SPOT: 1
150153
run: |
151154
# For release tags, use the release image; for PRs, omit to build and push to aztecdev
@@ -162,7 +165,7 @@ jobs:
162165
docker_image=""
163166
fi
164167
set -x # print next line
165-
./.github/ci3.sh network-deploy next-scenario "$namespace" "$docker_image"
168+
./.github/ci3.sh network-scenarios next-scenario "$namespace" "$docker_image"
166169
167170
- name: Cleanup network resources
168171
# Clean up if this is a CI label or nightly.
@@ -175,7 +178,9 @@ jobs:
175178
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
176179
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
177180
NO_SPOT: 1
178-
run: ./.github/ci3.sh network-teardown next-scenario "$NAMESPACE"
181+
run: |
182+
./.github/ci3.sh network-teardown next-scenario "${NAMESPACE}-1" || true
183+
./.github/ci3.sh network-teardown next-scenario "${NAMESPACE}-2" || true
179184
180185
#############
181186
# Benchmarks

.github/workflows/nightly-docs-release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,55 @@ jobs:
127127
./scripts/aztec_nr_docs_generation/generate_aztec_nr_docs.sh ${{ env.NIGHTLY_TAG }}
128128
echo "Generated Aztec.nr API docs for: ${{ env.NIGHTLY_TAG }}"
129129
130+
- name: Download bb from GitHub release
131+
env:
132+
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
133+
run: |
134+
mkdir -p /tmp/bb-bin
135+
gh release download ${{ env.NIGHTLY_TAG }} \
136+
--pattern "barretenberg-amd64-linux.tar.gz" \
137+
--dir /tmp/bb-bin
138+
tar -xzf /tmp/bb-bin/barretenberg-amd64-linux.tar.gz -C /tmp/bb-bin
139+
chmod +x /tmp/bb-bin/bb
140+
echo "BB_PATH=/tmp/bb-bin" >> $GITHUB_ENV
141+
142+
- name: Build aztec CLI
143+
working-directory: ./yarn-project
144+
run: |
145+
./bootstrap.sh
146+
echo "AZTEC_CLI_PATH=$(pwd)/aztec/dest/bin" >> $GITHUB_ENV
147+
148+
- name: Generate CLI documentation
149+
working-directory: ./docs
150+
continue-on-error: true
151+
run: |
152+
# Add bb from release to PATH
153+
export PATH="${BB_PATH}:${PATH}"
154+
155+
# Create wrapper for aztec CLI that runs the local build
156+
mkdir -p /tmp/cli-bin
157+
cat > /tmp/cli-bin/aztec << 'EOF'
158+
#!/bin/bash
159+
node "$AZTEC_CLI_PATH/index.js" "$@"
160+
EOF
161+
chmod +x /tmp/cli-bin/aztec
162+
export PATH="/tmp/cli-bin:${PATH}"
163+
164+
# Generate Aztec CLI docs using binaries (continue-on-error handles failures)
165+
./scripts/cli_reference_generation/generate_all_cli_docs.sh --force current
166+
echo "Aztec CLI documentation generation attempted for: ${{ env.NIGHTLY_TAG }}"
167+
168+
- name: Generate BB CLI documentation
169+
working-directory: ./barretenberg/docs
170+
continue-on-error: true
171+
run: |
172+
# Add bb from release to PATH
173+
export PATH="${BB_PATH}:${PATH}"
174+
175+
# Generate BB CLI docs
176+
./scripts/generate_bb_cli_docs.sh --force current
177+
echo "BB CLI documentation generation attempted for: ${{ env.NIGHTLY_TAG }}"
178+
130179
- name: Create Aztec nightly docs version (Developer docs only)
131180
working-directory: ./docs
132181
run: |
@@ -180,6 +229,9 @@ jobs:
180229
181230
- name: Commit new Aztec and Barretenberg Docs version
182231
run: |
232+
# Reset non-versioned CLI docs (only versioned copies should be committed)
233+
git checkout -- docs/docs-developers/docs/cli/*_cli_reference.md || true
234+
183235
# Stash the docs changes
184236
git add .
185237
git stash push --staged -m "nightly docs for ${{ env.NIGHTLY_TAG }}"

.github/workflows/nightly-spartan-bench.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
fi
4747
4848
- name: Run benchmarks
49-
timeout-minutes: 120
49+
timeout-minutes: 240
5050
env:
5151
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
5252
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -56,7 +56,7 @@ jobs:
5656
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
5757
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
5858
RUN_ID: ${{ github.run_id }}
59-
AWS_SHUTDOWN_TIME: 120
59+
AWS_SHUTDOWN_TIME: 240
6060
NO_SPOT: 1
6161
run: |
6262
# Pass the arguments expected in ./bootstrap.sh ci-network-bench

0 commit comments

Comments
 (0)