Public: anyone can read this; the crew can change it.
A red check's summary names the red test, never a warning line #2272
Check · Review · Land · Live done — Landed and live in production.
When a sharded gate goes red, the check's summary now names the first red test as `1 of N tests — "<name>"`, the same as pull checks. Slow-file warnings stay in the log and never become the summary.
shipped production is serving it deploy de9e1b0
When a sharded gate goes red, the check's summary now names the first red test as 1 of N tests — "<name>", the same as pull checks. Slow-file warnings stay in the log and never become the summary.
Cause. scripts/test-shards.ts prints a separate bun test ending for each shard. parseBunTestFailure (src/checks/bun-test.ts) kept only the last N pass / M fail pair. On ea64226 the green test/crew.test.ts shard was written after the red test/standards.test.ts one, so its 0 fail hid the red shard. summariseCheckFailure then fell back to the last line of the log, which was test-shards: over 45 s: test/crew.test.ts (52.5s).
Changes:
src/checks/bun-test.ts: the pass and fail counts are now added up across every shard's ending. The tally repeats each(fail)line with[shard N]on the end; that suffix is stripped and repeated names are dropped, so the first name is the first red shard's first failing test.src/checks/summary.ts: when no test is named, the summary uses the tally'sshard N exited X without naming a test: <files>line. Otherwise it uses the last line before the── gate summaryblock, never a line inside it. The block's heading is now a shared constant,GATE_SUMMARY_HEADING, whichscripts/gate-summary.tsuses to print it.
Tests (test/checks.test.ts): they build the log from the real tally and summaryLines, with one red file followed by one slow green file. They cover the issue's case (the summary names the red file's test), a red shard that names no test, and a log with no test output that ends in the gate summary block. All three fail without the fix. bun x tsc --noEmit is clean, and the checks, gate-summary, shards and pull-checks suites pass.
Not done: the summary keeps the issue's format, so it names the test but not its file. Adding the file would change every card and hand-back that reads the summary. When two red tests in different files have the same name, only one copy is kept in the names list.
🤖 Generated with Claude Code
Approved. The diff matches the issue. Counts are summed across shard tails, the tally's [shard N] suffix is stripped, and the fallback no longer reads a line inside the gate summary block. The heading is now one shared constant, so the printer and the parser cannot drift apart. The tests build the log from the real tally and summaryLines, and each covers a case that fails without the fix. There is no page, terminal or security surface in this change, so nothing there to judge. Next, in order: (1) the summary names the test but not its file. Two red tests with the same name in different files collapse to one entry in names, so the detail can under-report. Dedupe on name plus shard, or carry the file, in a follow-up issue. (2) UNNAMED_SHARD duplicates the wording of tally in scripts/shards.ts. Export that format from one place, so a reword there cannot silently turn the summary back into the last log line.
When a sharded gate goes red, the check's summary now names the first red test as
1 of N tests — "<name>", the same as pull checks. Slow-file warnings stay in the log and never become the summary.Cause.
scripts/test-shards.tsprints a separatebun testending for each shard.parseBunTestFailure(src/checks/bun-test.ts) kept only the lastN pass/M failpair. On ea64226 the greentest/crew.test.tsshard was written after the redtest/standards.test.tsone, so its0 failhid the red shard.summariseCheckFailurethen fell back to the last line of the log, which wastest-shards: over 45 s: test/crew.test.ts (52.5s).Changes:
src/checks/bun-test.ts: the pass and fail counts are now added up across every shard's ending. The tally repeats each(fail)line with[shard N]on the end; that suffix is stripped and repeated names are dropped, so the first name is the first red shard's first failing test.src/checks/summary.ts: when no test is named, the summary uses the tally'sshard N exited X without naming a test: <files>line. Otherwise it uses the last line before the── gate summaryblock, never a line inside it. The block's heading is now a shared constant,GATE_SUMMARY_HEADING, whichscripts/gate-summary.tsuses to print it.Tests (
test/checks.test.ts): they build the log from the realtallyandsummaryLines, with one red file followed by one slow green file. They cover the issue's case (the summary names the red file's test), a red shard that names no test, and a log with no test output that ends in the gate summary block. All three fail without the fix.bun x tsc --noEmitis clean, and the checks, gate-summary, shards and pull-checks suites pass.Not done: the summary keeps the issue's format, so it names the test but not its file. Adding the file would change every card and hand-back that reads the summary. When two red tests in different files have the same name, only one copy is kept in the names list.
🤖 Generated with Claude Code
Closes #2271