Public: anyone can read this; the crew can change it.
A red check's summary names each shard's first failure, never the (unnamed) fallout behind it #8750
Check · Review · Land · Live done — Landed and live in production.
A red check's summary now gives each red shard's first named failure, with shards in shard order rather than the order they finished. The change is all in `parseBunTestFailure` (`src/checks/bun-test.ts`):
shipped production is serving it deploy a4add02
A red check's summary now gives each red shard's first named failure, with shards in shard order rather than the order they finished. The change is all in parseBunTestFailure (src/checks/bun-test.ts):
- Shard attribution: each
(fail)line goes to a shard. It uses the[shard N]echo when the line has one, otherwise the── shard N/Mheader above it, whether live or held. Output with no shards counts as a single shard. - Fallout: a shard's
(unnamed)entries, including thosenameUnnamedhas renamed, count only when that shard names no other failure. - Order: the first name from each red shard comes first, in shard order, followed by each shard's other names in the order they were printed. The list is still capped at
MAX_FAILING_NAMES. The count stays true, so leftovers show up as "and N more".
src/checks/summary.ts and src/checks/service.ts did not need changes, since both read this list. CheckJudgement.cause still tells environment faults apart as before: the full-disk mark comes from fullShard(lines) on the raw log, not from the names. rerunnable still refuses a re-run whenever the named failures don't add up to the failure count, so fallout can't make a red shard re-runnable.
Tests (test/checks.test.ts, in the parser suite):
- A shard whose named failure is followed by
(unnamed)fallout names only the named failure. - A shard with nothing but fallout is still named by it.
- Three shards logged in the order 3, 1, 2, with the tally echo after them, are listed in the order 1, 3.
One existing test changed: test/shared-red.test.ts (#4582, "summary names the file and the hook") expected a hook timeout followed by two (unnamed) entries. Under this issue's rule that shard has a named failure, so it now expects only a.test.ts > beforeEach/afterEach (timeout) and a summary ending "and 1 more". That test recorded the old behaviour, which this issue replaces. A side effect: an afterAll that throws in the same shard, which shows up as (unnamed): error: …, is no longer named in the summary, only counted. Its line is still in the log. Renamed hook timeouts count as named failures, not fallout, because the issue asks only about (unnamed).
Not done: no change to how scripts/test-shards.ts writes the log. Its final tally was already in shard order; the summary was taking its names from the per-shard sections, which are in finish order.
Checks run: bun scripts/gate.ts, bun x tsc --noEmit and the 39 test files that pass (fail), (unnamed) or checkDetail through the parser all pass (497 tests). scripts/fast.ts picked 268 files, about 24 minutes, so I ran those 39 instead and left the full run to the forge's check.
To try it: bun test test/checks.test.ts test/shared-red.test.ts test/disk-full-shard.test.ts
🤖 Generated with Claude Code
Read against the diff only; I did not fetch the preview or open the screenshots, because this changes no page. It is a pure parser change that reads each failure as belonging to a shard, from the [shard N] echo or the header above it. The first named failure of each red shard leads, in shard order. A shard shows (unnamed) only when it named nothing else. The tests would fail without it, and the one changed expectation in shared-red.test.ts is explained in the pull. Two things I would do next: (1) src/checks/bun-test.ts: the failures list is now unbounded before the cap, so cap it per shard on a huge log. (2) An afterAll that throws, which shows as (unnamed): error: ..., is now counted but never named when its shard has a named failure. Consider showing renamed file-and-hook entries as named, or add a line in the log link saying so.
A red check's summary now gives each red shard's first named failure, with shards in shard order rather than the order they finished. The change is all in
parseBunTestFailure(src/checks/bun-test.ts):(fail)line goes to a shard. It uses the[shard N]echo when the line has one, otherwise the── shard N/Mheader above it, whether live or held. Output with no shards counts as a single shard.(unnamed)entries, including thosenameUnnamedhas renamed, count only when that shard names no other failure.MAX_FAILING_NAMES. The count stays true, so leftovers show up as "and N more".src/checks/summary.tsandsrc/checks/service.tsdid not need changes, since both read this list.CheckJudgement.causestill tells environment faults apart as before: the full-disk mark comes fromfullShard(lines)on the raw log, not from the names.rerunnablestill refuses a re-run whenever the named failures don't add up to the failure count, so fallout can't make a red shard re-runnable.Tests (
test/checks.test.ts, in the parser suite):(unnamed)fallout names only the named failure.One existing test changed:
test/shared-red.test.ts(#4582, "summary names the file and the hook") expected a hook timeout followed by two(unnamed)entries. Under this issue's rule that shard has a named failure, so it now expects onlya.test.ts > beforeEach/afterEach (timeout)and a summary ending "and 1 more". That test recorded the old behaviour, which this issue replaces. A side effect: anafterAllthat throws in the same shard, which shows up as(unnamed): error: …, is no longer named in the summary, only counted. Its line is still in the log. Renamed hook timeouts count as named failures, not fallout, because the issue asks only about(unnamed).Not done: no change to how
scripts/test-shards.tswrites the log. Its final tally was already in shard order; the summary was taking its names from the per-shard sections, which are in finish order.Checks run:
bun scripts/gate.ts,bun x tsc --noEmitand the 39 test files that pass(fail),(unnamed)orcheckDetailthrough the parser all pass (497 tests).scripts/fast.tspicked 268 files, about 24 minutes, so I ran those 39 instead and left the full run to the forge's check.To try it:
bun test test/checks.test.ts test/shared-red.test.ts test/disk-full-shard.test.ts🤖 Generated with Claude Code
Closes #8730