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
## Summary
Wires up a new merge-train branch, `merge-train/spartan-v5`, that
behaves exactly like `merge-train/spartan` but tracks the **v5 release
line**: it is fed from and targets `v5-next` instead of `next`.
Scoped by grepping every `merge-train` reference repo-wide (all file
types, not just workflows) and adding the `spartan-v5` equivalent
wherever spartan-specific behavior is hard-coded.
## Changes
**Workflows**
- `merge-train-create-pr.yml` — base branch is resolved per train
(`v5-next` for `merge-train/spartan-v5`, `next` otherwise); the "already
merged" ancestor check and the `ci-full-no-test-cache` label list both
use it.
- `merge-train-next-to-branches.yml` — now also triggers on push to
`v5-next`. A push to `v5-next` merges `v5-next` into
`merge-train/spartan-v5`; pushes to `next` continue feeding the other
six trains.
- `merge-train-stale-check.yml` — added a `spartan-v5` job running the
stale check with `BASE_BRANCH=v5-next`, alerting `#team-alpha`.
**Scripts**
- `scripts/merge-train/merge-next.sh` — takes an optional second arg for
the source branch (defaults to `next`); all `next` references (fetch,
diff, merge message, conflict comment + the commit it's posted on) now
use it.
**CI plumbing**
- `.github/ci3_labels_to_env.sh` — `merge-train/spartan-v5` merge-group
runs map to `merge-queue-heavy` (10 grind runs), same as spartan.
- `ci3/run_test_cmd` — flake notifications and the `#team-alpha-ci`
channel mapping include `spartan-v5`.
- `ci3/merge_train_failure_slack_notify` — `merge-train/spartan-v5`
failures route to `#team-alpha`.
- `ci.sh` — comment updated.
**Docs / skills / base-branch guidance**
- `merge-trains` + `merge-train-infra` skills (branch table, CI
behavior, automation lifecycle, and "create a new merge train" steps now
cover non-`next` base branches).
- Root `CLAUDE.md` base-branch mapping notes `merge-train/spartan-v5` (→
`v5-next`) as the v5-line alternative to `merge-train/spartan`.
- `.claude/skills/fix/SKILL.md` notes branching/PR-basing off
`merge-train/spartan-v5` for v5-scoped fixes.
## Verified branch-agnostic — no change needed
These already match `merge-train/*` or capture the subsystem
generically, so they cover `spartan-v5` automatically:
- `merge-train-recreate.yml`, `merge-train-update-pr-body.yml`,
`merge-queue-dequeue-notify.yml` (`startsWith('merge-train/')`)
- `scripts/merge-train/auto-merge.sh` (`BRANCH_PATTERN=merge-train/`),
`update-pr-body.sh` (reads the PR's real base)
- `ci3.sh` instance-postfix + `ci3.yml` concurrency (`merge-train/*`)
- `ci3/dashboard/ci-metrics/github_data.py` and `rk.py` (regex
`merge-train/([^\s]+)`)
- `scripts/commits`, `scripts/filter_history`,
`scripts/find_orphaned_issues_in_prs.py` (`merge-train/` prefix)
No in-repo CODEOWNERS / ruleset / branch-protection config exists (those
live in the GitHub UI). Remaining literal `merge-train/spartan` strings
are illustrative `Example:`/usage comments with no behavior.
## Follow-up needed (cannot be done from this PR)
The `merge-train/spartan-v5` branch itself must be created from
`v5-next` and pushed — branch creation can't go through PR tooling. Once
it exists the automation here takes over (PR creation, integration from
`v5-next`, stale checks, auto-merge, recreation). `v5-next` already
exists as a protected branch.
## CI
Labeled `ci-skip` — workflow/script/docs config only. Shell scripts pass
`bash -n`; workflow YAML parses cleanly.
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