Files
Garry Tanandcapy-ai[bot] 92a9350a32 v1.92.0.0 ship-queue: merge trains for any repo (train gates, every prefix gated, direct/update land, train init/doctor) (GSTA-157 PR 2) (#3692)
* feat(ship): pause /ship on a red base instead of failing (gstack-base-red, conditional receipts) (GSTA-157 PR 1)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: base-red shell runner launches bash through runBashSync

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: base-red coverage additions (unreproduced head, unresolved head, readPause, wait unconfigured)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: base-red pause in unattended endings; BASE_RED_UNCONFIGURED covers an invalid base policy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: base-red coverage pass 2 (write --base-red, summary line, classify usage before fetch, unresolved-head detail)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(ship-queue): merge trains for any repo — train.gates (workflows/command), every prefix gated, generalized train land (direct/update, merge method), base-red trains, train init/doctor, watch --land (GSTA-157 PR 2)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: pre-landing review fixes (train gates: dispatch bound, lease, rebase, post-merge checks, output tail, caps)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: train land refuses the next slot until the previous slot's post-merge checks are green

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: ship-policy, troubleshooting and captain for train gates review fixes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: changelog fragment for merge trains for any repo

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: keep ship-queue-train-generic out of the Windows subset (gh shim resolves gh.exe there)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-31 21:46:33 +00:00

2.5 KiB

Merge train for a peer repository

For a crew whose repository has its own CI and no gstack eval workflow (gbrain, an app repository). Copy it into the crew's NOTES.md or CREW.md and fill the angle brackets. The rules are docs/ship-policy.md#train-gates; this file is the order to do them in.

Turn it on (once)

  1. In a checkout of <REPO> on <BASE>, with gstack installed: gstack-ship-queue train init --base <BASE>, adding --command "<test command>" --spend-cap <usd> when a VM-run test command should gate too (it runs through scripts/ubicloud/ubi-runner.sh and needs UBI_OWNER).
  2. If it refuses with QUEUE_TRAIN_INIT_REFUSED, PRs here bump the version: adopt changelog_fragments first (docs/ship-policy.md#changelog-fragments).
  3. Open one PR that adds the printed train block and min_gstack_version to .gstack/ship-policy.json, and the printed nonce input, run-name and concurrency lines to each gate workflow. Fix every WARN: line in the same PR (a push trigger that matches train-prefix/ refs gets branches-ignore: ['train-prefix/**']).
  4. After it merges: gstack-ship-queue train doctor --base <BASE> until it prints DOCTOR: no findings.

Parameters for CREW.md

Parameter Value
GATES <workflow>/<job> list from the block, plus the command gate if any
REQUIRED_CHECKS train.land.required_checks (or changelog_fragments.required_checks)
MERGE_METHOD train.land.merge_method (merge when history is merge-only)
LAND_MODE what init printed: direct when protection is not strict, else update
COMMAND_SPEND_CAP the command gate's spend_cap_usd, per train

Lanes

READY with gstack-ship-queue ready --pr <n> --no-screen after /ship at the pinned head. There is no screen and no slot call. A lane whose /ship paused on a red base (its receipt carries base_red) READYs with --base-red --fixer <fixer PR> once the fixer lane READYs with --fixes-base-red <case,...>; it never merges the base or waits by hand.

Controller loop

gstack-ship-queue train build --prs <n>@<sha>,... --base <BASE>
gstack-ship-queue train watch --train <nonce> --land --base <BASE>

watch --land waits for every prefix run, reads the verdict and lands each landable slot in order, then prints NEXT. A culprit (QUEUE_TRAIN_RED) goes back to its lane and the rest ride the next train; red on main (QUEUE_TRAIN_RED_ON_MAIN) is fixed forward; QUEUE_TRAIN_UNATTRIBUTED means repair or a new order, never the same train again.