fix(review): pass 1: ahead and diverged labels, diff-scope needs shared history; preflight refreshes origin/<base> and stops on a diff far beyond the PR (GST-462, HARN-15)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-31 15:30:22 +00:00
1 parent 0d4846cc0a
commit 86b279fcae
8 files changed
+72 -9

No files matched your search

+5
View File
@@ -88,6 +88,11 @@ describe('gstack-diff-scope', () => {
expect(out).toContain('SCOPE_DOCS=true');
expect(out).toContain('SCOPE_BACKEND=false');
}
git('symbolic-ref', 'refs/remotes/origin/HEAD', 'refs/remotes/origin/main');
expect(spawnSync(SCRIPT, ['HEAD'], { cwd: dir, stdio: 'pipe', timeout: 5000 }).stdout.toString()).toContain('SCOPE_DOCS=false');
git('update-ref', 'refs/remotes/origin/main', git('commit-tree', git('rev-parse', 'HEAD^{tree}').stdout.toString().trim(), '-m', 'unrelated').stdout.toString().trim());
const unrelated = spawnSync(SCRIPT, ['main'], { cwd: dir, stdio: 'pipe', timeout: 5000 }).stdout.toString();
expect(unrelated).toContain('SCOPE_BACKEND=true');
});
test('detects frontend files', () => {