From 8b9aec088271f3dea9bb047504aae10d6a7f3e8c Mon Sep 17 00:00:00 2001 From: garrytan Date: Thu, 29 Oct 2026 19:37:43 +0000 Subject: [PATCH] test: pin the diffs that still screen (unselectable, skill template + bun.lock) Two assertions in test/ship-queue-train-logic.test.ts: a diff the paid selector cannot select recommends --screen with the full gate selection, and a diff that mixes a skill template with bun.lock recommends --screen. GSTA-165 1a, from /ship Steps 7-8. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/ship-queue-train-logic.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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', () => {