gstack 1.91.146.0 merge trains let several ready PRs share one full eval gate

1 hour ago

gstack 1.91.146.0: gstack-ship-queue runs merge trains. Several ready PRs share one full eval gate, merge one by one only while main matches the tested prefix, and a red train is bisected on its red cases alone. Off unless your base branch's ship policy declares a train block. Release notes: https://github.com/garrytan/gstack/blob/main/CHANGELOG.md#1911460---2026-10-19 Merge train walkthrough: https://github.com/garrytan/gstack/blob/main/docs/ship-policy.md#run-a-merge-train Commits: https://github.com/garrytan/gstack/commits/main

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Trains
  2. 0:13Merge
  3. 0:25Bisect
  4. 0:40Off by default
  5. 0:54Guide
Show transcript

Trains

gstack logo

gstack-ship-queue runs merge trains: several ready PRs, one full gate

main
+
PR 1
+
PR 2
+
PR 3
one full gate for the whole train
TrainsMergeBisectOff by defaultGuide
garrytan/gstack · CHANGELOG.md

gstack's ship queue can now run merge trains. Several ready pull requests stack onto main in order, and the whole stack shares one full eval gate instead of one gate per pull request.

Merge

Each PR merges only while main matches the prefix the gate tested

T0 main · T1 +PR 1 · T2 +PR 2
prefix trees, recorded
verify --pr <n> --train <nonce>
MERGE_CONDITION
train stops partway
queue freezes until one repair PR lands
TrainsMergeBisectOff by defaultGuide
garrytan/gstack · CHANGELOG.md

Then each pull request merges one at a time, and only while main still matches the stack that gate tested. If a train stops partway, the queue freezes until one repair pull request lands.

Bisect

A red train is bisected on its red cases alone

$ train bisect --spend-cap <usd>
ATTRIBUTED #<pr>
only for a monotone pattern
red on every prefix, T0 included
red on main
TrainsMergeBisectOff by defaultGuide
garrytan/gstack · CHANGELOG.md

A red train reruns only its failing cases on each step, under your dollar cap. It blames one pull request only when failures start there and stay red. Red everywhere means main is red.

Off by default

Trains stay off until the base branch declares a train block

.gstack/ship-policy.json
train block on base
no train block
ready prints what it prints today
gstack’s own policy
not yet: waits on workflow side and one dry-run train
every lane
runs this gstack first
TrainsMergeBisectOff by defaultGuide
garrytan/gstack · CHANGELOG.md

Trains stay off until the ship policy on your base branch declares a train block. gstack's own repo still waits on its workflow side and a dry run, and every lane needs this version first.

Guide

The walkthrough: Run a merge train

docs/ship-policy.mdgstack ship policy guide
How many PRs wait in your queue on a busy day?
TrainsMergeBisectOff by defaultGuide
garrytan/gstack · CHANGELOG.md · docs/ship-policy.md

The full walkthrough sits in gstack's ship policy guide, under Run a merge train. How many pull requests wait in your queue on a busy day?