fix(pregate): no empty no-lane line on mapped runs; trace [] refusals; absent lane flag stays strict (GST-775 review)

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 13:04:15 +00:00
1 parent 9e8326f766
commit f2400e791b
4 files changed
+14 -2

No files matched your search

+10
View File
@@ -65,6 +65,16 @@ describe('a policy that declares no lanes keeps the no-policy lane verdicts (GST
expect(r.ran).toContain('test/util.test.js');
});
// Value: protects=a fully mapped change prints no empty "have no test lane" line under no policy or a lane-less one; fails_when=the
// no-lane line is rendered for an empty list; why_new=the mode switch is new; seam=none; no_claim=none
test.each([['no policy', null], ['timeout-only', { $schema: SCHEMA, timeout_s: 1800 }]])('%s: a fully mapped change passes with no no-lane line', (_name, policy) => {
const repo = fixture({ pregate: policy, baseFiles: NO_PLATFORM_LANE });
commit(repo, { 'lib/util.js': 'exports.add = (a, b) => b + a;\n' });
const r = lanes(repo);
expect([r.status, r.row.status]).toEqual([EXIT.ok, 'pass']);
expect(r.lines.some(l => l.includes('have no test lane'))).toBe(false);
});
// Value: protects=the starter names the policy that exists instead of claiming there is none; fails_when=the starter header says
// "no .gstack/pregate.json" while one is on the base; why_new=new wording; seam=none; no_claim=none
test('the starter says the active policy declares no lanes, not that there is no policy', () => {