From 1e02f6e69924c77e14cefd930510898d9d1847b1 Mon Sep 17 00:00:00 2001 From: garrytan Date: Thu, 29 Oct 2026 06:02:05 +0000 Subject: [PATCH] fix(ship-queue): land waits for CI through runScriptSync (script-invocation tripwire) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- lib/ship-queue-land.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ship-queue-land.ts b/lib/ship-queue-land.ts index 2e1bc3061..14e96a9aa 100644 --- a/lib/ship-queue-land.ts +++ b/lib/ship-queue-land.ts @@ -17,6 +17,7 @@ import * as path from 'node:path'; import { mergeChangelogs, parseChangelog } from './changelog-check'; import { fragmentSlug, readFragments } from './changelog-fragments'; import { restamp, versionAtRef } from './restamp'; +import { BIN_DIR, runScriptSync } from './script-invocation'; import { matchesAny, type ShipPolicy } from './ship-policy'; import { ciAtHead, loadBasePolicy, type QueueContext, type StepOutput } from './ship-queue'; import { QUEUE_DIR_REL, git, writeJsonAtomic, type QueueFailure } from './ship-queue-gate'; @@ -193,8 +194,7 @@ function prInfo(ctx: QueueContext, pr: string): PrInfo | QueueFailure { } function waitGreen(ctx: QueueContext, pr: string, minutes: number): boolean { - const bin = path.join(path.dirname(new URL(import.meta.url).pathname), '..', 'bin', 'gstack-pr-wait'); - const r = spawnSync(bin, [pr, '--until', 'green', '--timeout', String(minutes)], { cwd: ctx.repoRoot, stdio: ['ignore', 'inherit', 'inherit'], timeout: (minutes + 5) * 60_000 }); + const r = runScriptSync(path.join(BIN_DIR, 'gstack-pr-wait'), [pr, '--until', 'green', '--timeout', String(minutes)], { cwd: ctx.repoRoot, stdio: ['ignore', 'inherit', 'inherit'], timeout: (minutes + 5) * 60_000 }); return r.status === 0; }