REVIEWED_TREE: 79e1a19acced1ce7a62e0c946ca23edba6d6c19b /workspace/gstack
{"severity":"CRITICAL","confidence":10,"path":"test/free-tests-workflow-wiring.test.ts","line":259,"category":"gate","summary":"The new wiring test reads `emitted.include`, but `ciPlanMatrix` returns the union `{ shard: number[] } | { include: [...] }`. That adds two new diagnostics to the test-code type ratchet: TS2339 (property 'include' does not exist on `{ shard: number[] }`) and TS7006 (implicit any 'entry'). I ran `bun run typecheck:test` on this tree and it exits 1 with exactly these two. The `typecheck` job in free-tests.yml (line 336) runs that ratchet, and the required `free-tests` aggregate requires `TYPECHECK_RESULT = success`, so this PR turns the required Free Tests check red.","fix":"Narrow the union before using it, for example `if (!('include' in emitted)) throw new Error('matrix carries no per-shard timeouts');` before the `flatMap`, or type the call through an overload that returns the include shape when setupSeconds is given. Do not add the diagnostics to the baseline.","fingerprint":"test/free-tests-workflow-wiring.test.ts:259:gate","specialist":"targeted","evidence":"bun run typecheck:test: 'test typecheck ratchet: 2 new or more frequent diagnostic(s)… + test/free-tests-workflow-wiring.test.ts TS2339: Property 'include' does not exist on type '{ shard: number[]; } | { include: { shard: number; timeout_minutes: number; }[]; }' (0 → 1); + … TS7006: Parameter 'entry' implicitly has an 'any' type. (0 → 1)'; exit code 1","test_stub":"test('ciPlanMatrix with a setup margin narrows to the include shape', () => { const m = ciPlanMatrix(createFreeCiPlan(['a.test.ts'], 1, { 'a.test.ts': 1000 }, 'r'), 300); if (!('include' in m)) throw new Error('no include'); expect(m.include[0].timeout_minutes).toBeGreaterThan(0); });"}
