From 74e5a5dfc28d6ecb52e54c9a5d4d29612becc648 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sun, 1 Nov 2026 04:23:24 +0000 Subject: [PATCH] test(install): a --project repo slug is a usage error, not a project-less verdict (GST-743, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/gstack-capy-install.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/gstack-capy-install.test.ts b/test/gstack-capy-install.test.ts index 491b1ae20..85082d723 100644 --- a/test/gstack-capy-install.test.ts +++ b/test/gstack-capy-install.test.ts @@ -156,6 +156,17 @@ describe('gstack-capy-install', () => { expect(run(f, ['--revision']).status).toBe(2); }); + // Value: protects=--project names the project the verdict and launch file are keyed to; + // fails_when=a repo slug (owner/name) that is no directory silently keys the verdict to no project, so a later check reads a stale one; + // why_new=GST-743, HARN-12 lost three pregate runs to it; seam=bin/gstack-capy-install --project; no_claim=resolving slugs + test('--project that is not a directory (a repo slug) is a usage error: exit 2, no setup, no verdict', () => { + const f = fixture(); + const r = run(f, ['--for', 'ship', '--project', 'garrytan/harness-evals']); + expect([r.status, r.stderr.trim()]).toEqual([2, "gstack-capy-install: --project takes a directory path; 'garrytan/harness-evals' is not a directory (pass the project checkout's path, not a repo slug)"]); + expect(f.calls().filter(l => l.startsWith('setup') || l.startsWith('doctor '))).toEqual([]); + expect(fs.existsSync(path.join(f.home, '.gstack-state/install-verdicts'))).toBe(false); + }); + test('preflight: a missing tool stops with exit 3 and INSTALL_PREFLIGHT_FAILED before ./setup runs', () => { const f = fixture({ jq: false }); const r = run(f);