Skip to content

v1.91.328.0 ship-queue: screen only when the selector restores every case; unscreened PRs fill train seats (GSTA-165 1a) - #3619

Merged
capy-ai[bot] merged 10 commits into
mainfrom
garrytan/gsta165-screen-recommend
Oct 30, 2026
Merged

capy-ai[bot] merged 10 commits into
mainfrom
garrytan/gsta165-screen-recommend

Conversation

@garrytan

@garrytan garrytan commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3619,
  "head": "539ddbcdcab607d0d8366abc923ab2ed98a94805",
  "version": "1.91.304.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 90,
      "fail": 0,
      "skip": 0
    },
    "tripwires": {
      "pass": 104,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "615f1aec18ca5afe313d2ddb8103abf722c43225",
  "product_patch_id": "0613dd35d11457b695e94f6b4388427d596eac64",
  "gstack_version": "1.91.319.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 76,
    "rules": "9bc0e4d2f74ef6b4",
    "base": "53db038c6ba6f1408e12418a4adaf61c21808607",
    "registry": "53db038c6ba6f1408e12418a4adaf61c21808607",
    "gate_scan": {
      "tagged": 0,
      "head": "539ddbcdcab607d0d8366abc923ab2ed98a94805"
    },
    "reasons": [
      "gate-class",
      "runtime=76>50"
    ]
  },
  "pregate": "requires-remote cleared @615f1aec18ca (1 checks, current for 539ddbcdcab6)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40962275035",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40962275118",
    "pregate.json/remote_gate: remote-gate tree=615f1aec18ca tests=10527"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, captain/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against the diff b1dd0dc39..HEAD plus working tree (screen recommendation, train slot order, HELD wording)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 4,
    "fixed": 0,
    "scope": "frozen",
    "dispatches": {
      "specialist": 4,
      "red-team": 1
    }
  },
  "carry": {
    "from": "e22634cfd65bd5a01968dba85d23dfd443a7ffb3",
    "reason": "stack parent garrytan/gsta150-narrow-screen landed + base merge + test-only change + release metadata",
    "product_patch_id": "0613dd35d11457b695e94f6b4388427d596eac64",
    "changed_paths": [
      "product:.github/workflows/free-tests.yml",
      "product:.gstack/pregate.json",
      "product:.gstack/ship-policy.json",
      "metadata:CHANGELOG.md",
      "product:CONTRIBUTING.md",
      "product:README.md",
      "product:TODOS.md",
      "metadata:VERSION",
      "metadata:agents-digest/gstack-AGENTS.md",
      "product:autoplan/DRIVER.md",
      "product:autoplan/DRIVER.md.tmpl",
      "product:benchmark/SKILL.md",
      "product:benchmark/SKILL.md.tmpl",
      "product:bin/gstack-approvals",
      "product:bin/gstack-autoplan",
      "product:bin/gstack-capy-session",
      "product:bin/gstack-decision-trail",
      "product:bin/gstack-diff-scope",
      "product:bin/gstack-doctor-components.sh",
      "product:bin/gstack-harness",
      "product:bin/gstack-harness-ledger.sh",
      "product:bin/gstack-modules",
      "product:bin/gstack-pregate",
      "product:bin/gstack-redact-prepush",
      "product:bin/gstack-review-log",
      "product:bin/gstack-review-plan",
      "product:bin/gstack-ship-budget",
      "product:bin/gstack-ship-receipt",
      "product:bin/gstack-version-bump",
      "product:captain/templates/CREW.md",
      "product:captain/templates/brief.md",
      "product:captain/templates/plan-ask.md",
      "product:capy/skill/gstack/SKILL.md",
      "product:capy/skill/gstack/captain.md",
      "product:docs/OPENCLAW.md",
      "product:docs/PROJECT_STRUCTURE.md",
      "product:docs/TESTING_INTERNALS.md",
      "product:docs/captain.md",
      "product:docs/capy-install.md",
      "product:docs/designs/SKILL_EVAL_CONTRACT.md",
      "product:docs/hosts.md",
      "product:docs/loadouts.md",
      "product:docs/pregate.md",
      "product:docs/review-policy.md",
      "product:docs/ship-budget.md",
      "product:docs/ship-policy.md",
      "product:docs/skills.md",
      "product:docs/troubleshooting.md",
      "product:docs/unattended.md",
      "product:hosts/hermes.ts"
    ],
    "merge_commits": 1,
    "range_diff": "1:  9b3540b = 1:  9b3540b Narrow screens leave hub files to the train gate; map size-ledger baselines and the careful mask awk\n2:  174bc2f = 2:  174bc2f fix: pre-landing review fixes (pull_request runs stay broad, deleted hubs, READY and summary previews)\n3:  e46d674 = 3:  e46d674 docs: CHANGELOG for narrow screens (Unreleased)\n4:  63012a4 = 4:  63012a4 docs: TESTING_INTERNALS describes narrow and broad PR screen policy\n5:  b1dd0dc = 5:  b1dd0dc chore: record test-pr-profile.ts as non-behavioral at HARNESS_VERSION 6\n6:  5348c15 = 6:  5348c15 ship-queue: screen only when the selector restores every case; unscreened PRs fill train seats (GSTA-165 1a)\n7:  8b9aec0 = 7:  8b9aec0 test: pin the diffs that still screen (unselectable, skill template + bun.lock)\n8:  e22634c = 8:  e22634c docs: CHANGELOG tests and deferrals; P1 TODOs for GSTA-165 follow-ups",
    "covers": [
      "pre-landing review",
      "adversarial review",
      "gate integrity",
      "documentation audit"
    ],
    "reruns": [
      "CI at head (gstack-ship-queue ready requires it); test and helper code changed since the reviewed head runs there unreviewed"
    ],
    "ancestry": "linear",
    "trees": [
      "83618813d334e6db54208d0792115e7064557d05"
    ]
  }
}

What changed

ready recommends --screen only when the selector restores every case or cannot select; unscreened PRs now fill train seats instead of waiting for their own train

gstack-ship-queue ready recommends --screen only when the selector restores every case or cannot select; unscreened PRs now fill train seats instead of waiting for their own train.

Before/after as text: ready recommends --screen only when the selector restores every case or cannot select; unscreened PRs now fill train seats instead of waiting for their own train
--- Before · before.txt · captured text
+++ After · after.txt · captured text
 # docs/ship-policy.md: ready (screen recommendation)
 Without a choice it prints the `SCREEN:` selection (with
+`screen_selection: gstack-paid`, the skill's own cases, the selector's mode and
+`recommend --screen` or `--no-screen`: `--screen` only when the selector's
+mode is `full-fallback`, an unknown dependency or a shared runtime input that
+restores every case, or when it cannot select at all; every other PR rides
+unscreened, and the train gate's full census runs its cases on the tree that
+merges) and refuses with `READY_SCREEN_CHOICE_REQUIRED`. The price line says
-`screen_selection: gstack-paid`, the skill's own cases and `recommend
---screen` or `--no-screen`: `--screen` when the screen selects a skill's own
-cases) and refuses with `READY_SCREEN_CHOICE_REQUIRED`. The price line says
 the dollar figure is pending the cost replay; until it lands, `SCREEN:` shows
 
 # docs/ship-policy.md: train build (slot order)
 It prints `ORDER:` (the slot order to announce: screened PRs first in READY
+order, then unscreened PRs fill the remaining seats, and `HELD:` lists the PRs
+over `max_size`; `--order <pr>,<pr>,...` naming every
-order, then unscreened; when `max_size` or more unscreened PRs wait they form
-their own train and `HELD:` lists them; `--order <pr>,<pr>,...` naming every
 pinned PR once replaces that rule, for a PR that must merge before another,
 

Why

Garry asked on 2026-10-29 for "much faster PRs the checks and reviews seem maybe excessive and costly", and plan GSTA-165 was approved with "do it". Almost every PR paid for a solo screen (16 to 19 a day at about $32 each), yet of 41 full screens between Oct 20 and 29 the 3 that caught a real bug were all diffs the selector can't narrow. Those still screen, every other PR rides the train gate's full census, and the queue saves about $2,300 a week at current volume.

Blast radius

The change touches the READY recommendation (lib/ship-queue-train-ready.ts), train slot order (lib/ship-queue-train.ts orderSlots) and the replay model (lib/gate-cost-history.ts pickTrain). It is safe because no threshold, trial count, case or workflow changes, --order still overrides the seating, and the train gate still runs every case on the merged tree before anything lands (read in docs/ship-policy.md and pinned by the focused lane, 90 tests, script ran). Stacked on #3587, which touches the same function, so #3587 merges first.

Approvals

No approvals recorded for branch garrytan/gsta165-screen-recommend.

Plan GSTA-165, autoplan run autoplan-20261029161318, APPROVED (Garry's "do it", relayed by GStack Minder 2026-10-29). Scope cut to 1a by GStack Minder, 2026-10-29. Not yet recorded with gstack-approvals for this branch.

Summary

Lanes were told to screen whenever a diff touched a skill's own cases, which is nearly every PR, so screens cost more than the train gates that rerun the same cases hours later. ready now recommends --screen only for selector full-fallback diffs or diffs it cannot select, and a train seats unscreened PRs in the seats a screened PR leaves instead of holding them for a train of their own. This run adds two tests that pin the diffs that still screen, the CHANGELOG lines for them and the deferrals, and two P1 follow-ups in TODOS.md.

Not in this change

  • GSTA-165 1b, a focused paid run of a no-screen PR's own cases bound to its READY receipt, needs a new screen_policy: own route in evals.yml (GSTA-149's file). Deferred.
  • The captain/templates/CREW.md rule 22 text on when a lane picks --screen (with the READY template, captain/SKILL.md.tmpl and docs/recommended-harness.md step 5 framing that the docs audit flagged). Deferred as a P1 TODO.
  • A train-record field that attributes a red train to the PR that caused it, so the trigger for reverting this default can be measured (GSTA-165 v2 item 6). Deferred as a P1 TODO.

Test Coverage

CODE PATHS                                                         USER FLOWS
[+] lib/ship-queue-train-ready.ts  gstackPaidSelection()           [+] Lane runs `ready --pr N` with no choice
  ├── [★★★ TESTED] mode pr|dependents → --no-screen,                 ├── [★★★ TESTED] SCREEN lines + refusal, screen_selection none
  │                census line — logic.test.ts:197                   │                — ship-queue-train.test.ts:124
  ├── [★★★ TESTED] mode full-fallback (bun.lock) → --screen,         └── [GAP] [→E2E] same flow under screen_selection gstack-paid
  │                reason in line — logic.test.ts:204                                (wiring unchanged; selector unit-tested)
  ├── [UNRATED]    selector throws → --screen, "could not select"
  │                — logic.test.ts:211 (added this pass)           [+] Train build ORDER/HELD
  ├── [★★★ TESTED] own cases no longer drive the recommendation      ├── [★★★ TESTED] screened first, unscreened fill, HELD over size
  │                (review tmpl: own≠∅ → --no-screen) — :199         │                — ship-queue-train.test.ts:567
  └── [GAP]        coverage undefined → mode 'unknown' (unreachable  └── [★★★ TESTED] --order still overrides — logic.test.ts:68
                   for profile pr)
[+] lib/ship-queue-train.ts  orderSlots() / newTrain()
  ├── [★★★ TESTED] 1 screened + 5 unscreened @5 → 5 seated, 1 held — logic.test.ts:34
  ├── [★★  TESTED] all-unscreened pool @3 → 3 seated — logic.test.ts:40
  ├── [★★★ TESTED] over-size screened PRs held in READY order — logic.test.ts:41
  ├── [★★★ TESTED] explicit --order path (split field removed) — logic.test.ts:70
  └── [★★★ TESTED] HELD line "(over the train size N)" — ship-queue-train.test.ts:576
[+] lib/gate-cost-history.ts  pickTrain()
  ├── [★★★ TESTED] full pool → screened first, unscreened fill — gate-cost.test.ts:350
  └── [★★★ TESTED] under size: null before fill limit, all at it — gate-cost.test.ts:353
[ ] docs/ship-policy.md, CHANGELOG.md — prose only, no code paths

COVERAGE: 11/13 paths with any test (85%) | value-weighted 10/13 (77%)
QUALITY: ★★★:9 ★★:1 ★:0 unrated:1 | GAPS: 2 (1 E2E)

Tests: 1518 → 1518 (+0 new test files; +1 test and +1 assertion in test/ship-queue-train-logic.test.ts)
Coverage: 77% value-weighted (85% including 1 weakly covered path)
Test value: 1 test written, 0 rejected by the authoring gate, 1 existing test extended, 1 path weakly covered (weak = ★, gate-failing or unrated).

The weak path is the selector-throws test, unrated because Step 7's rating dispatch did not run (budget stop), so the coverage gate was skipped this run. Remaining proposed test: ready --pr N under screen_selection: gstack-paid prints the three SCREEN lines and READY_SCREEN_CHOICE_REQUIRED [→E2E] (protects the screenSelection wiring; declined because the wiring is unchanged and the selector is unit-tested). Mutation check on the written test: setting everyCase = false in the catch turns it red.

Tests ran: focused 90
Tests ran: tripwires 104

Pre-Landing Review

Pre-Landing Review: 4 issues — 0 auto-fixed, 0 asked, 0 deferred, 4 noted. Core checklist, four specialists (testing, maintainability, simplification, state-machines) and the red team found nothing; the adversarial pass found 4 informational items, none at the blocking floor.

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=4 fixed=0 scope=frozen dispatches=5

Gate edits: 6 listed, 6 read, 0 findings

Outside review: openai/gpt-6.1-sol, no findings, "Recommendation: approve". Adversarial (anthropic/claude-opus-5-5): 4 informational, "Recommendation: merge as-is".

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/ship-queue-train-ready.ts:94 changed-file list comes from git diff without checking ok; an empty or failed diff makes the selector select every case but label mode pr, so the recommendation is --no-screen (same as before the change, fails open)
  • INFORMATIONAL lib/ship-queue-train-ready.ts:69 a missing coverage field maps to mode unknown and recommends --no-screen; profile pr always returns coverage today
  • INFORMATIONAL lib/ship-queue-train.ts:116 unscreened PRs now share trains with screened ones; at the replay's default red rates one unscreened defect reds and bisects a train carrying screened PRs; no simulateArrivalTrains rerun under the new mix is shown
  • INFORMATIONAL lib/ship-queue-train-ready.ts:70 dependents-mode diffs now recommend --no-screen; evidence is 3 of 41 catches with no negative control for dependents-mode catches

Exploratory QA

Not run. This is a library and docs change with no browser, API or job surface of its own; its behaviour is exercised by the focused lane (90 tests) and the Step 9 smoke probe, which ran gstackPaidSelection on this PR's own changed files and got no-screen ("selector mode pr").

Design Review

No frontend files changed — design review skipped.

Eval Results

No prompt-related files changed — evals skipped. The paid selection for this PR comes from gstack-ship-queue ready's screen recommendation after the receipt.

Greptile Review

Greptile is not configured for this repository; Step 10 skipped.

Plan Completion

Step 8 (plan GSTA-165 D1 plus v2-additions, 16 items): 11 DONE, 1 CHANGED (the selector's full-fallback mode replaces a hand-kept SHARED_RUNTIME list, per v2 item 3), 1 PARTIAL (no focused own-case command; needs 1b), 3 NOT DONE. Since that report, the mixed-diff test (skill template plus bun.lock recommends --screen) was built in this PR. Deferred: the captain/templates/CREW.md rule 22 text and the train-record attribution field (v2 item 6), both P1 in TODOS.md. 1b is out of scope by decision.

Verification Results

No separate Step 8.1 verification list was recorded for this invocation. The Step 9 smoke probe passed (this PR's own diff recommends --no-screen, selector mode pr).

TODOS

No TODO items completed in this PR. Added two P1 items under Ship (CREW.md rule 22 screen text; train-record red attribution).

Documentation

Status: current. No documentation edits were needed, and there are no blockers.

Scope: the diff from b1dd0dc to 5348c15 plus the working tree (lib/ship-queue-train-ready.ts, lib/ship-queue-train.ts, lib/gate-cost-history.ts, docs/ship-policy.md, the uncommitted CHANGELOG.md and TODOS.md, and tests). I also grepped docs/, captain/, README.md, AGENTS.md, CLAUDE.md and CONTRIBUTING.md for screen, train-order and HELD wording.

Documentation health

  • docs/ship-policy.md: current. Updated in this PR, and the screen recommendation, slot order and HELD wording match the code.
  • docs/captain.md: current. The READY contract and the lane's /ship sequence (step 9, --screen|--no-screen) are unaffected.
  • docs/recommended-harness.md: current. "Screened first" still holds. The READY step's focused-cases framing is crew policy, deferred.
  • docs/troubleshooting.md: current. The READY_SCREEN_CHOICE_REQUIRED fix still says to rerun with the printed recommendation.
  • docs/TESTING_INTERNALS.md: current. The narrow screen and seeded train model are unaffected.
  • captain/templates/CREW.md and captain/templates/READY.md: unchanged. The rule 22 screen guidance is deferred by plan (GSTA-165, tracked in TODOS.md).
  • captain/SKILL.md.tmpl: unchanged. The screen field framing goes to the same follow-up.
  • CHANGELOG.md and TODOS.md: owned by the parent and not edited. Their content matches the code.

Coverage debt: the focused paid run of a --no-screen PR's own cases (GSTA-165 1b) and the train-record red attribution (GSTA-165 v2 item 6) are deferred. Diagram drift: none, because no diagrams cover screen or train order.

Test plan

  • bun test test/gate-cost.test.ts test/ship-queue-train-logic.test.ts test/ship-queue-train.test.ts (focused, through gstack-evidence): 90 pass, 0 fail
  • bun test test/*tripwire*.test.ts test/*ratchet*.test.ts test/egress-receipt-wiring.test.ts test/env-host-fence-conformance.test.ts test/free-fixtures.test.ts (tripwires): 104 pass, 0 fail across 14 files
  • bun run typecheck: exit 0
  • bun run gen:skill-docs: fresh, no diff
  • gstack-pregate --allow-repo-commands (local, tree 83618813d334): preflight 6/6 pass (regen, secrets, strays, literals, timing, guards); tests requires-remote
  • gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands (Ubicloud, tree 83618813d334): 13876 tests, 0 failed, $0.06
  • macOS named regressions (free-tests.yml run 40943776585, success) and the Windows free shards (windows-free-tests.yml run 40943785013, 6/6 success), dispatched at e22634c and cleared with gstack-pregate clear; pregate verdict: requires-remote cleared
  • gstack-pregate sealed: no sealed policy on this repo

🤖 Generated with Claude Code

garrytan and others added 8 commits October 29, 2026 04:05
…elines and the careful mask awk

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hubs, READY and summary previews)

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>
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>
…ened PRs fill train seats (GSTA-165 1a)

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

Two assertions in test/ship-queue-train-logic.test.ts: a diff the paid
selector cannot select recommends --screen with the full gate selection,
and a diff that mixes a skill template with bun.lock recommends --screen.
GSTA-165 1a, from /ship Steps 7-8.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
CHANGELOG [Unreleased]: name the two added tests and list the deferred
CREW.md rule 22 text and train-record attribution field. TODOS.md: both
deferrals as P1 under Ship.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review October 29, 2026 20:09
@capy-ai
capy-ai Bot changed the base branch from garrytan/gsta150-narrow-screen to main October 29, 2026 21:58
@trunk-io

trunk-io Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits October 29, 2026 21:58
…en-recommend

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

# Conflicts:
#	CHANGELOG.md
#	lib/ship-queue-train-ready.ts
…be859b slot 1, merge main 959c8a6)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title ship-queue: screen only when the selector restores every case; unscreened PRs fill train seats (GSTA-165 1a) v1.91.328.0 ship-queue: screen only when the selector restores every case; unscreened PRs fill train seats (GSTA-165 1a) Oct 30, 2026
@capy-ai
capy-ai Bot merged commit 9184ffd into main Oct 30, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant