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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-01 04:23:24 +00:00
1 parent 3f79d81673
commit 74e5a5dfc2
1 file changed
+11
+11
View File
@@ -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);