From 15f551c31252da4547fc6951407c06a00cb78f55 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 26 Oct 2026 03:01:09 +0000 Subject: [PATCH] test: give the fsck-rejected merge-ref spawns a timeout (spawnsync tripwire) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/ship-queue-train.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ship-queue-train.test.ts b/test/ship-queue-train.test.ts index afbb98f04..3a3c48cbe 100644 --- a/test/ship-queue-train.test.ts +++ b/test/ship-queue-train.test.ts @@ -218,8 +218,8 @@ describe('ready under a train policy: the screen choice', () => { expect(missing.err).toMatch(/has no refs\/pull\/1\/merge.*\(QUEUE_SCREEN_STALE_REF\)/); const tree = repo.git('rev-parse', `${moved}^{tree}`); const main = repo.git('rev-parse', 'origin/main'); - const badMerge = spawnSync('git', ['-C', repo.origin, 'hash-object', '-t', 'commit', '-w', '--stdin', '--literally'], { input: `tree ${tree}\nparent ${main}\nparent ${moved}\nauthor A 1700000000 +0000\ncommitter B 1700000000 +0000\n\nmerge without a committer email\n`, encoding: 'utf8' }).stdout.trim(); - spawnSync('git', ['-C', repo.origin, 'update-ref', 'refs/pull/1/merge', badMerge]); + const badMerge = spawnSync('git', ['-C', repo.origin, 'hash-object', '-t', 'commit', '-w', '--stdin', '--literally'], { input: `tree ${tree}\nparent ${main}\nparent ${moved}\nauthor A 1700000000 +0000\ncommitter B 1700000000 +0000\n\nmerge without a committer email\n`, encoding: 'utf8', timeout: 30_000 }).stdout.trim(); + spawnSync('git', ['-C', repo.origin, 'update-ref', 'refs/pull/1/merge', badMerge], { timeout: 30_000 }); repo.git('config', 'fetch.fsckObjects', 'true'); const unfetchable = queue(fx, ['ready', '--pr', '1', '--pregate', pregate2, '--screen']); expect(unfetchable.status).toBe(EXIT.refused);