From acbbd9f7f97dae2995b617c43b02e26b9020e612 Mon Sep 17 00:00:00 2001 From: garrytan Date: Wed, 28 Oct 2026 13:48:43 +0000 Subject: [PATCH] test(flaky): the coordinator clone reads the fixture origin through git, not by copying its objects directory (GSTA-139) Every push into the fixture origin leaves a detached 'git maintenance run --auto' there (local transport drops the shard's GIT_CONFIG_COUNT backstop), which creates and deletes objects/maintenance.lock after the push returns. A local clone copies origin.git/objects entry by entry, so an entry appearing or vanishing mid-copy fails it; --no-local never lists that directory. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/helpers/ship-queue-fixture.ts | 12 ++++++++++-- test/ship-queue-train.test.ts | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/test/helpers/ship-queue-fixture.ts b/test/helpers/ship-queue-fixture.ts index 0051fd548..87068b348 100644 --- a/test/helpers/ship-queue-fixture.ts +++ b/test/helpers/ship-queue-fixture.ts @@ -98,10 +98,18 @@ export function ghQueueShim(repo: FixtureRepo, data: { prs: Record { + const fx = make(); + fs.symlinkSync(path.join(fx.repo.root, 'gone'), path.join(fx.repo.origin, 'objects', 'maintenance.lock')); + const coord = coordinatorClone(fx.repo); + expect(spawnSync('git', ['-C', coord, 'rev-parse', 'origin/main'], { encoding: 'utf8', timeout: 30_000, env: { ...process.env, ...fx.repo.env } }).stdout.trim()).toBe(fx.repo.git('rev-parse', 'origin/main')); + expect(fs.existsSync(path.join(coord, '.git', 'objects', 'maintenance.lock'))).toBe(false); +}); + describe('the train command surface', () => { test('train with no subcommand (flags only) prints the train help and exits usage; --help exits 0; bad arguments name what is missing', () => { const fx = make();