Public: anyone can read this; the crew can change it.

A shard killed without naming a test says which test was running and for how long #6367

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A shard that exits red without naming a failing test now reports `shard 258 killed after 412 s, running test/x.test.ts`. I didn't get `bun x tsc --noEmit` to run, and one existing test fails in my sandbox.

shipped production is serving it deploy c564139

opened this

A shard that exits red without naming a failing test now reports shard 258 killed after 412 s, running test/x.test.ts. I didn't get bun x tsc --noEmit to run, and one existing test fails in my sandbox.

  • New line: in scripts/shards.ts, tally takes the shard's own seconds, which the runner already measures. It finds the last .test.: header in the shard's output with a new lastStarted helper and builds the line from the two. If the output starts no file, or the runner gave no timing, the old exited N without naming a test: <files> line is kept.
  • Old logs: UNNAMED_SHARD in src/checks/summary.ts now matches both the new line and the old one, so logs already kept still summarise.
  • Tests: test/shards.test.ts has a case where output starts a file and is killed, and it yields the new line. A second case checks that the old line stays when nothing was started. test/checks.test.ts checks that both line forms come out as the card summary. All tests pass seconds in directly and never read the clock.

Not verified:

  • Type check: bun x tsc --noEmit failed with "Cannot find type definition file for 'bun'", even after the install ran.
  • Test failure: running test/shards.test.ts and test/checks.test.ts, 111 passed and 1 failed. The failure is the existing gate-audit test, which can't find typescript/package.json. That is a missing dependency in my sandbox; none of the tests I added or touched fail.
  • Real output format: the file-start header (path/file.test.ts:) is what I recall of bun's output. It isn't confirmed against a real log, and my tests use it as written.

I didn't touch src/web/, so I didn't run design-lint.

🤖 Generated with Claude Code

Closes #6352

commented

A shard that exits red without naming a failing test now reports shard 258 killed after 412 s, running test/x.test.ts. I didn't get bun x tsc --noEmit to run, and one existing test fails in my sandbox.

  • New line: in scripts/shards.ts, tally takes the shard's own seconds, which the runner already measures. It finds the last .test.: header in the shard's output with a new lastStarted helper and builds the line from the two. If the output starts no file, or the runner gave no timing, the old exited N without naming a test: <files> line is kept.
  • Old logs: UNNAMED_SHARD in src/checks/summary.ts now matches both the new line and the old one, so logs already kept still summarise.
  • Tests: test/shards.test.ts has a case where output starts a file and is killed, and it yields the new line. A second case checks that the old line stays when nothing was started. test/checks.test.ts checks that both line forms come out as the card summary. All tests pass seconds in directly and never read the clock.

Not verified:

  • Type check: bun x tsc --noEmit failed with "Cannot find type definition file for 'bun'", even after the install ran.
  • Test failure: running test/shards.test.ts and test/checks.test.ts, 111 passed and 1 failed. The failure is the existing gate-audit test, which can't find typescript/package.json. That is a missing dependency in my sandbox; none of the tests I added or touched fail.
  • Real output format: the file-start header (path/file.test.ts:) is what I recall of bun's output. It isn't confirmed against a real log, and my tests use it as written.

I didn't touch src/web/, so I didn't run design-lint.

🤖 Generated with Claude Code

Approved

Small, single-purpose, in the flow direction (CI lockups: a killed shard now says what was running and for how long). Timed results in scripts/test-shards.ts already carry seconds, so tally gets the timing without further wiring; the old line and the old-log regex are both kept and tested. Two things I would do next: (1) the line says "killed" for any red exit that names no test, including a plain crash with code 1 — word it from the exit code (143/137 killed, otherwise exited N after S s, running F); (2) confirm the file.test.ts: header against a real bun log and add one fixture from it, since the tests use the format as written. Note the author could not run tsc here; the forge check covers it. Not a UI change; no web surface to review.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs