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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-29 19:37:43 +00:00
1 parent 5348c15ec3
commit 8b9aec0882
1 file changed
+13
+13
View File
@@ -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', () => {