From 6121a195910a23ac81489cb377362c978533d021 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Fri, 20 Nov 2026 08:15:08 -0800 Subject: [PATCH] /ship stops instead of running the whole test suite here when CI's run can't be reused (GST-3277) (#4565) `gstack-ship-preflight` now stops with `SHIP_LANE_NOT_CARRIED` whenever a test suite mapped to CI has no reusable CI run, in a full preflight as well as `--tests-only`; `--run-uncarried-here` still runs it here. Why: a full preflight on gbrain-evals#547 ran the whole suite locally for 7 minutes after CI's run went stale, and the stop told an outside-author PR to dispatch a workflow that has no `workflow_dispatch` trigger. Nothing to do: a workflow that can't be dispatched now gets "merge the base and push it, or ask the author to" instead. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/adversarial-native#1 reader=adversarial-native --- ...reflight-stops-when-ci-cannot-be-reused.md | 1 + docs/pregate.md | 4 +- docs/ship-policy.md | 2 +- docs/troubleshooting.md | 22 +++-- lib/ci-carry.ts | 4 +- lib/pregate/index.ts | 2 +- lib/pregate/run-check.ts | 2 + lib/pregate/workflows.ts | 5 ++ lib/run-evidence.ts | 8 +- lib/ship-preflight.ts | 27 +++--- scripts/lib/windows-curation.ts | 4 + ship/sections/tests.md | 2 +- ship/sections/tests.md.tmpl | 2 +- test/ship-ci-carry.test.ts | 4 +- test/ship-preflight-carry-stop.test.ts | 88 +++++++++++++++++++ ...flight-stops-when-ci-cannot-be-reused.json | 4 + 16 files changed, 149 insertions(+), 32 deletions(-) create mode 100644 changelog.d/ship-preflight-stops-when-ci-cannot-be-reused.md create mode 100644 test/ship-preflight-carry-stop.test.ts create mode 100644 test/size-ledger/ship/ship-preflight-stops-when-ci-cannot-be-reused.json diff --git a/changelog.d/ship-preflight-stops-when-ci-cannot-be-reused.md b/changelog.d/ship-preflight-stops-when-ci-cannot-be-reused.md new file mode 100644 index 000000000..626bd39f1 --- /dev/null +++ b/changelog.d/ship-preflight-stops-when-ci-cannot-be-reused.md @@ -0,0 +1 @@ +**/ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277).** A full `gstack-ship-preflight` now stops with `SHIP_LANE_NOT_CARRIED` whenever a mapped test lane has no verified CI run at this tree, whatever the reason (a base that moved after the run included), the same way `--tests-only` already did; `--run-uncarried-here` still runs the lane here, in either mode. When the lane's workflow has no `workflow_dispatch` trigger, or its run profile accepts no dispatched run, the stop no longer suggests a `gh workflow run` that would fail. It says to merge the base into the branch and push it, or to ask the pull request's author to. After a full preflight stops, it tells you to rerun with `--tests-only`, because rerunning the same full command would stop on its own open run. diff --git a/docs/pregate.md b/docs/pregate.md index 488063988..85b3b2fbe 100644 --- a/docs/pregate.md +++ b/docs/pregate.md @@ -1370,8 +1370,8 @@ with every character outside `A-Za-z0-9._-` turned into `_` (`pnpm lint` is `pnpm_lint`, `db:test` is `db_test`), and `run`, `record-ci` and `check` all use that one spelling, so `check --label 'pnpm lint'` finds the row; `ci_carried` and `CI_CARRIED:` name the stored spelling. A mapped lane that cannot -carry prints `CI_CARRY: none label=