From 8f453e24028370f83b8059f851421d6a2c633dae Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 2 Nov 2026 14:38:58 +0000 Subject: [PATCH] fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/review-start-evidence.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/review-start-evidence.test.ts b/test/review-start-evidence.test.ts index 79bfa6785..c8ef072f6 100644 --- a/test/review-start-evidence.test.ts +++ b/test/review-start-evidence.test.ts @@ -192,6 +192,24 @@ describe('review start/end binding (#2803)', () => { expect(cli('gstack-wtree', ['--review'])).toBe(cli('gstack-wtree')); }); + test('GST-985: an untracked file in a dot-directory that holds a tracked file still breaks the bind', () => { + mkdirSync(join(repo, '.tool')); + writeFileSync(join(repo, '.tool', 'a.json'), '{}\n'); + git('add', '.tool/a.json'); + git('commit', '-qm', 'tool'); + const token = cli('gstack-review-log', ['--start', 'review']); + writeFileSync(join(repo, '.tool', 'b.json'), '{}\n'); + expect(log(token).review_binding.state).toBe('changed'); + }); + + test('GST-985: gstack-wtree refuses an unknown or extra argument', () => { + for (const args of [['--bogus'], ['--review', 'x']]) { + const r = spawnSync(join(ROOT, 'bin', 'gstack-wtree'), args, { cwd: repo, encoding: 'utf8', timeout: 10_000 }); + expect(r.status).toBe(2); + expect(r.stderr).toContain('Usage: gstack-wtree [--review]'); + } + }); + for (const file of ['.github/workflows/x.yml', '.gstack/ship-policy.json']) { test(`GST-985: an untracked ${file} added mid-review still breaks the bind`, () => { const token = cli('gstack-review-log', ['--start', 'review']);