Skill Tracer
Skills › gstack › captain › merge-train-peer.md

merge-train-peer.md

49 lines · captain/templates/merge-train-peer.md at 3f79d81

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

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

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.

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

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.
Raw lines 7 to 21
Runs code scripts/ubicloud/ubi-runner.sh :12
22## Parameters for CREW.md
24| Parameter | Value |
25|---|---|
26| `GATES` | `<workflow>/<job>` list from the block, plus the command gate if any |
27| `REQUIRED_CHECKS` | `train.land.required_checks` (or `changelog_fragments.required_checks`) |
28| `MERGE_METHOD` | `train.land.merge_method` (`merge` when history is merge-only) |
29| `LAND_MODE` | what init printed: `direct` when protection is not strict, else `update` |
30| `COMMAND_SPEND_CAP` | the command gate's `spend_cap_usd`, per train |

Parameters for CREW.md

ParameterValue
GATES<workflow>/<job> list from the block, plus the command gate if any
REQUIRED_CHECKStrain.land.required_checks (or changelog_fragments.required_checks)
MERGE_METHODtrain.land.merge_method (merge when history is merge-only)
LAND_MODEwhat init printed: direct when protection is not strict, else update
COMMAND_SPEND_CAPthe command gate's spend_cap_usd, per train
Raw lines 22 to 31
32## Lanes
34READY with `gstack-ship-queue ready --pr <n> --no-screen` after /ship at the pinned head.
35There is no screen and no slot call. A lane whose /ship paused on a red base (its receipt
36carries `base_red`) READYs with `--base-red --fixer <fixer PR>` once the fixer lane READYs
37with `--fixes-base-red <case,...>`; it never merges the base or waits by hand.

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.

Raw lines 32 to 38
39## Controller loop
41```text
42gstack-ship-queue train build --prs <n>@<sha>,... --base <BASE>
43gstack-ship-queue train watch --train <nonce> --land --base <BASE>
44```
46`watch --land` waits for every prefix run, reads the verdict and lands each landable slot
47in order, then prints NEXT. A culprit (`QUEUE_TRAIN_RED`) goes back to its lane and the rest
48ride the next train; red on main (`QUEUE_TRAIN_RED_ON_MAIN`) is fixed forward;
49`QUEUE_TRAIN_UNATTRIBUTED` means repair or a new order, never the same train again.

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.

Raw lines 39 to 49