test: the docs-only receipt digest test keeps its gate scan out of the real home (free-suite shard 5 FREE_SUBSHARD_REJECTED)

This commit is contained in:
garrytan committed 2026-11-02 13:27:28 +00:00
1 parent d7ad64eae4
commit 6a9e34ab1b
1 file changed
+6 -1
+6 -1
View File
@@ -264,7 +264,12 @@ describe('the receipt binds the selection the reviewers read', () => {
const head = commit(repo, { 'testdata/expected.txt': 'expected output\n' });
const planned = JSON.parse(runBin(repo, 'gstack-review-plan', ['--base', 'main', '--json']).out).review_exclude;
expect(planned.kept_files).toEqual([{ path: 'testdata/expected.txt', reason: 'gate-tagged' }]);
const { exclude } = receiptReviewAtHead(repo.work, 'main', path.join(import.meta.dir, '..', 'bin'), head);
const prior = process.env.GSTACK_STATE_ROOT;
process.env.GSTACK_STATE_ROOT = path.join(repo.root, 'receipt-state');
let review: ReturnType<typeof receiptReviewAtHead>;
try { review = receiptReviewAtHead(repo.work, 'main', path.join(import.meta.dir, '..', 'bin'), head); }
finally { if (prior === undefined) delete process.env.GSTACK_STATE_ROOT; else process.env.GSTACK_STATE_ROOT = prior; }
const { exclude } = review;
expect(exclude.state === 'active' ? exclude.record.digest : exclude.state).toBe(planned.digest);
});
// Value: protects=a receipt names the selection the rendered briefs read, a base merge that leaves the policy alone still