diff --git a/test/ship-queue-train-logic.test.ts b/test/ship-queue-train-logic.test.ts index d5cedc971..284ac052d 100644 --- a/test/ship-queue-train-logic.test.ts +++ b/test/ship-queue-train-logic.test.ts @@ -204,9 +204,22 @@ describe('screen recommendation', () => { const shared = await gstackPaidSelection(ROOT, 'HEAD', ['bun.lock'], has); expect(shared.recommend).toBe('screen'); expect(shared.lines[2]).toMatch(/^SCREEN: selector mode full-fallback \(.*bun\.lock.*\) → recommend --screen$/); + expect((await gstackPaidSelection(ROOT, 'HEAD', ['review/SKILL.md.tmpl', 'bun.lock'], has)).recommend).toBe('screen'); const docs = await gstackPaidSelection(ROOT, 'HEAD', ['docs/ship-policy.md'], has); expect(docs.recommend).toBe('no-screen'); }, 60_000); + + // Generated by /ship Step 7 coverage audit (GSTA-165 1a). + // Value: protects=a diff the paid selector cannot select (needs full validation) recommends --screen with the full gate selection; + // fails_when=the selector-error branch stops forcing everyCase, so an unselectable diff rides the train unscreened; + // why_new=the existing selector test covers pr, dependents and full-fallback modes only, never the throw; + // seam=none; no_claim=dispatch of the screen itself (pure selection on gstack's own tree; no eval-bg run) + test("gstack's selector on gstack's own tree: a diff it cannot select recommends --screen with the full gate selection", async () => { + const r = await gstackPaidSelection(ROOT, 'HEAD', ['unregistered/nested/SKILL.md'], () => false); + expect(r.recommend).toBe('screen'); + expect(r.lines[0]).toMatch(/^SCREEN: selection \d+ e2e case\(s\) \+ \d+ judge\(s\) \(the PR profile needs full validation \(.*requires full validation.*\): the screen is the full gate selection\)$/); + expect(r.lines[2]).toBe('SCREEN: the selector could not select → recommend --screen'); + }, 60_000); }); describe('the train policy block', () => {