You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/fix/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ For each issue number provided:
29
29
30
30
Work through each confirmed issue **sequentially** in the main checkout:
31
31
32
-
1.**Stash & branch**: Stash any uncommitted changes, then create a branch from `merge-train/spartan` using the issue's `gitBranchName` from Linear.
32
+
1.**Stash & branch**: Stash any uncommitted changes, then create a branch from `merge-train/spartan` using the issue's `gitBranchName` from Linear. For a fix scoped to the v5 release line, branch from `merge-train/spartan-v5` (which targets `v5-next`) instead.
Copy file name to clipboardExpand all lines: .claude/skills/merge-train-infra/SKILL.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ This skill covers the automation internals of the merge-train system. For contri
11
11
12
12
The merge-train system is fully automated via GitHub Actions in `.github/workflows/merge-train-*.yml`:
13
13
14
-
1.**PR Creation** (`merge-train-create-pr.yml`): Triggered on push to `merge-train/*` branches. Creates a PR targeting `next` with the `ci-no-squash` label (and `ci-full-no-test-cache` for spartan). Skips merge commits and commits already in `next`.
14
+
1.**PR Creation** (`merge-train-create-pr.yml`): Triggered on push to `merge-train/*` branches. Creates a PR targeting `next`(or `v5-next` for `merge-train/spartan-v5`) with the `ci-no-squash` label (and `ci-full-no-test-cache` for `merge-train/spartan`, `merge-train/spartan-v5`, and `merge-train/ci`). Skips merge commits and commits already in the base branch.
15
15
16
16
2.**Body Updates** (`merge-train-update-pr-body.yml`): Triggered on push to `merge-train/**` and `backport-to-*-staging` branches. Updates the PR body with meaningful commits (those containing PR references like `(#1234)`). The body wraps the commit list in `BEGIN_COMMIT_OVERRIDE` / `END_COMMIT_OVERRIDE` markers. Backport staging PRs also call `update-pr-body.sh` inline from `scripts/backport_to_staging.sh` to handle the first-push case (where the PR doesn't exist yet when the workflow fires).
17
17
18
-
3.**Next Integration** (`merge-train-next-to-branches.yml`): Triggered on push to `next`. Merges `next` into each active merge-train branch via `scripts/merge-train/merge-next.sh`. Uses `continue-on-error: true` so a conflict in one branch does not block others. Skips branches whose PR already has auto-merge enabled.
18
+
3.**Next Integration** (`merge-train-next-to-branches.yml`): Triggered on push to `next` and `v5-next`. A push to `next`merges `next`into each `next`-based train; a push to `v5-next` merges `v5-next` into `merge-train/spartan-v5`. Both go through `scripts/merge-train/merge-next.sh`, which takes an optional second argument for the source branch (defaults to `next`). Uses `continue-on-error: true` so a conflict in one branch does not block others. Skips branches whose PR already has auto-merge enabled.
19
19
20
20
4.**Auto-Merge** (`merge-train-auto-merge.yml`): Runs hourly via cron (`0 * * * *`). Calls `scripts/merge-train/auto-merge.sh` for both merge-train (4-hour inactivity) and backport-train (8-hour inactivity) branches. Uses separate GitHub tokens: `AZTEC_BOT_GITHUB_TOKEN` for API calls and `MERGE_TRAIN_GITHUB_TOKEN` for approvals. Will not auto-merge if the last merge-queue CI run failed or was cancelled.
21
21
@@ -29,7 +29,7 @@ The merge-train system is fully automated via GitHub Actions in `.github/workflo
29
29
30
30
Merge-train branches influence CI mode:
31
31
-`merge_group` events or `ci-merge-queue` label → `merge-queue` mode
32
-
- If the merge-group event is for `merge-train/spartan` → upgraded to `merge-queue-heavy` mode (10 parallel grind runs instead of 4)
32
+
- If the merge-group event is for `merge-train/spartan`or `merge-train/spartan-v5`→ upgraded to `merge-queue-heavy` mode (10 parallel grind runs instead of 4)
@@ -57,7 +57,7 @@ Merge-train PRs get a unique instance postfix (commit count) to allow parallel E
57
57
- `ci-barretenberg`: Only builds and tests barretenberg (AVM disabled)
58
58
- `ci-barretenberg-full`: Full barretenberg CI including acir_tests
59
59
- `merge-queue`: 4x AMD64 full + 1x ARM64 fast in parallel
60
-
- `merge-queue-heavy`: 10x AMD64 full + 1x ARM64 fast in parallel (used for `merge-train/spartan`)
60
+
- `merge-queue-heavy`: 10x AMD64 full + 1x ARM64 fast in parallel (used for `merge-train/spartan` and `merge-train/spartan-v5`)
61
61
62
62
### Test History Tracking (`ci3/run_test_cmd`)
63
63
@@ -73,11 +73,12 @@ When a CI run fails on an EC2 instance, it calls `merge_train_failure_slack_noti
73
73
74
74
## Creating a New Merge Train
75
75
76
-
1. Create a branch from `next` with naming pattern `merge-train/{team}`
77
-
2. Add the branch to the matrix in `.github/workflows/merge-train-next-to-branches.yml`
78
-
3. Add the branch-to-Slack-channel mapping in `ci3/merge_train_failure_slack_notify`
79
-
4. Optionally add CI mode overrides in `.github/ci3_labels_to_env.sh` and `bootstrap.sh`
80
-
5. Push code to the branch -- automation handles PR creation from there
76
+
1. Create a branch from the desired base (`next` for most trains; a release line like `v5-next` for a release-specific train) with naming pattern `merge-train/{team}`
77
+
2. Add the branch to the loop in `.github/workflows/merge-train-next-to-branches.yml`. If it tracks a base branch other than `next`, also add that base to the workflow's `push` trigger and pass it as the second argument to `merge-next.sh` (see the `merge-train/spartan-v5` → `v5-next` wiring)
78
+
3. If the base is not `next`, set the PR base in `.github/workflows/merge-train-create-pr.yml` and pass `BASE_BRANCH` to the stale check in `.github/workflows/merge-train-stale-check.yml`
79
+
4. Add the branch-to-Slack-channel mapping in `ci3/merge_train_failure_slack_notify`
80
+
5. Optionally add CI mode overrides in `.github/ci3_labels_to_env.sh` and `bootstrap.sh`
81
+
6. Push code to the branch -- automation handles PR creation from there
|`merge-train/spartan`| Spartan / infra / yarn-project sequencer and prover orchestration |`#team-alpha`|
22
+
|`merge-train/spartan-v5`| Same as `merge-train/spartan` but for the v5 release line (targets `v5-next` instead of `next`) |`#team-alpha`|
23
+
24
+
> Every train targets `next` except `merge-train/spartan-v5`, which targets `v5-next`.
22
25
23
26
## How to Use a Merge Train
24
27
@@ -39,7 +42,7 @@ A merge train is an automated batching system (inspired by [Rust rollups](https:
39
42
## CI Behavior for Merge Trains
40
43
41
44
-**Specialized CI modes**: PRs targeting `merge-train/docs` run docs-only CI. PRs targeting `merge-train/barretenberg` run barretenberg-only CI. This avoids running the full test suite for domain-specific changes.
42
-
-**Merge-queue mode**: When the merge-train PR enters GitHub's merge queue, it runs the full `merge-queue` CI mode (4 parallel grind runs on AMD64 + 1 ARM64). `merge-train/spartan`uses the heavier `merge-queue-heavy` mode (10 grind runs).
45
+
-**Merge-queue mode**: When the merge-train PR enters GitHub's merge queue, it runs the full `merge-queue` CI mode (4 parallel grind runs on AMD64 + 1 ARM64). `merge-train/spartan`and `merge-train/spartan-v5` use the heavier `merge-queue-heavy` mode (10 grind runs).
43
46
-**Full concurrency**: Merge-train PRs get unique CI concurrency groups (using `github.run_id`), so multiple CI runs can proceed in parallel without cancelling each other.
44
47
-**Test history tracking**: Test results are tracked for merge-train PRs, same as merge-queue runs.
The bases above target the `next` line. For work scoped to the v5 release line, use `merge-train/spartan-v5` (which targets `v5-next`) in place of `merge-train/spartan`.
44
+
43
45
Use the discovered base in `git diff origin/<base>...HEAD` and `git log origin/<base>..HEAD`. Always `git fetch` before creating branches so the base is not stale.
0 commit comments