Skip to content

feat(ci): add merge-train/spartan-v5 targeting v5-next#23831

Merged
spalladino merged 1 commit into
nextfrom
cb/merge-train-spartan-v5
Jun 3, 2026
Merged

feat(ci): add merge-train/spartan-v5 targeting v5-next#23831
spalladino merged 1 commit into
nextfrom
cb/merge-train-spartan-v5

Conversation

@AztecBot

@AztecBot AztecBot commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

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.shmerge-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_notifymerge-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.

@AztecBot AztecBot added ci-skip claudebox Owned by claudebox. it can push to this PR. labels Jun 3, 2026
AztecBot added a commit that referenced this pull request Jun 3, 2026
Wire up a new merge-train branch, merge-train/spartan-v5, that mirrors
merge-train/spartan but tracks the v5 release line: fed from and
targeting v5-next instead of next.

- merge-train-create-pr.yml: resolve base branch per train (v5-next for
  spartan-v5), used by the ancestor check and the ci-full-no-test-cache
  label list.
- merge-train-next-to-branches.yml: also trigger on push to v5-next and
  merge v5-next into merge-train/spartan-v5.
- merge-next.sh: optional source-branch arg (defaults to next).
- merge-train-stale-check.yml: spartan-v5 job with BASE_BRANCH=v5-next.
- ci3_labels_to_env.sh / ci.sh: spartan-v5 merge-group runs use
  merge-queue-heavy.
- run_test_cmd, merge_train_failure_slack_notify: flake + failure Slack
  routing for spartan-v5 (#team-alpha / #team-alpha-ci).
- merge-trains / merge-train-infra skills, root CLAUDE.md base mapping,
  and fix skill: document the v5 train and base branch.
@AztecBot AztecBot force-pushed the cb/merge-train-spartan-v5 branch from 44954a7 to 0c3abc1 Compare June 3, 2026 18:07
@spalladino spalladino marked this pull request as ready for review June 3, 2026 18:13
@spalladino spalladino requested a review from charlielye as a code owner June 3, 2026 18:13
@spalladino spalladino added this pull request to the merge queue Jun 3, 2026
Merged via the queue into next with commit f76190f Jun 3, 2026
25 checks passed
@spalladino spalladino deleted the cb/merge-train-spartan-v5 branch June 3, 2026 20:01
spalladino pushed a commit that referenced this pull request Jun 4, 2026
Backports the `merge-train/spartan-v5` wiring from #23831 (merged to
`next`) onto `v5-next`.

## Why this is needed
The base→train sync (`merge-train-next-to-branches.yml`) is
push-triggered, and for a `push` event GitHub Actions runs the workflow
file **as it exists on the pushed branch**. `v5-next` still has the old
workflow (triggers only on `next`, no `spartan-v5` routing), so commits
landing on `v5-next` never fire the sync into `merge-train/spartan-v5`.
Putting the wiring on `v5-next` makes that sync fire for every
subsequent push to `v5-next`.

This is a cherry-pick of #23831's squashed commit onto `v5-next` — same
12-file changeset, no v5-specific divergence (the merge-train infra
files merged cleanly; v5-next's newer `actions/checkout` pin is
preserved).

## After merge
Future pushes to `v5-next` will sync into `merge-train/spartan-v5`. The
commit that already landed on `v5-next` (`chore: backport
merge-train/spartan PRs to v5-next` #23846) won't retroactively trigger
— it needs either a fresh push to `v5-next` or a one-time manual
`scripts/merge-train/merge-next.sh merge-train/spartan-v5 v5-next` to
catch the train up.

Labeled `ci-skip` — workflow/script/docs config only.

---
*Created by
[claudebox](https://claudebox.work/v2/sessions/a24733a6b8930662) ·
group: `slackbot`*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-skip claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants