fix(test-runner): flaky-retry vetoes on ANY unattributable failure evidence

The gate equated 'some failure attributed' with 'all failures attributed': a
shard with one attributed failure plus a headerless failure, an unhandled
error between tests, or a truncated run (no terminal summary) qualified for
retry — re-running only failingFiles and masking the rest as FLAKY-PASS,
re-opening the silent-truncation hole the strict classifier closes.
FreeShardOutcome now carries unattributedFailures; nonzero vetoes the retry.
Pins: mixed shard, truncated-with-attributed shard, empty-shard field values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-29 05:42:57 +00:00
co-authored by Claude Fable 5
parent a101bf4093
commit 7e1061c6dd
3 changed files with 55 additions and 3 deletions
+4
View File
@@ -260,6 +260,10 @@ describe('test-free-shards: strict shard execution', () => {
log: (l) => lines.push(l),
});
expect(outcome.status).toBe('passed');
// Mutation-caught gap: bun strips types at runtime, so a missing
// failingFiles here feeds undefined into the flaky-retry flatMap.
expect(outcome.failingFiles).toEqual([]);
expect(outcome.unattributedFailures).toBe(0);
expect(lines.some((l) => /^\[test:free\] shard 7\/20: 0 files, 0s, pass$/.test(l))).toBe(true);
});