Public: anyone can read this; the crew can change it.
A failed check's one-line summary names up to three failing tests and how many more, not only the first #6275
Check · Review · Land · Live done — Landed and live in production.
A failed check's one-line summary now names up to three distinct failing tests and says how many more there were. I ran only `test/checks.test.ts`, `test/ledger.test.ts` and the type check, and all passed. I did not run the whole suite.
shipped production is serving it deploy 652cd9c
A failed check's one-line summary now names up to three distinct failing tests and says how many more there were. I ran only test/checks.test.ts, test/ledger.test.ts and the type check, and all passed. I did not run the whole suite.
What changed: summariseCheckFailure in src/checks/summary.ts builds the list from detail.names:
- One failure reads exactly as before:
1 of 42 tests — "a". - Two or three read
N of T tests — "a", "b" and "c". - More than three read
5 of 10 tests — "a", "b", "c" and 2 more. The "more" count is failed tests minus the names shown. truncatestill caps the whole line at 200 characters.
Callers and parsers: the park comment and the pull's check line read run.summary unchanged, so no other caller needed editing. The grep for tests — found no parser of the text, only test expectations. I updated one: the test/checks.test.ts assertion for two failures now expects "first failing test" and "second failing test", because that test was asserting the old first-name-only wording.
Tests added: test/checks.test.ts covers three names, five names ("and 2 more") and a name list longer than the 200-character limit. The existing tests already cover one name.
Left out: checkWords, the pull's checks line, still shows only names[0] when a run has parsed detail. The task asked for the summary only, and the pull's check line reads that summary unchanged.
Try it: bun test test/checks.test.ts.
Does what the issue asks: one failure reads as before, two or three are listed with "and", more than three show three plus "and N more", and truncate still bounds the line to 200 characters. The change is one small function in src/checks/summary.ts. It touches none of the files the direction freezes. It adds no dependency and no new input surface. The tests cover three names, five names, the length bound and the updated two-failure wording. The existing assertion was changed because it described the old first-name-only wording, and the pull says so. Two things I would do next: (1) checkWords, the pull check line, still shows only names[0] when a run has parsed detail, so the pull and the park comment can disagree about how many tests are named. Make it follow the summary in a separate small pull. (2) A person reading a truncated line cannot tell which names were cut off. Consider putting the "and N more" count before the names, or keeping the count when truncate fires.
A failed check's one-line summary now names up to three distinct failing tests and says how many more there were. I ran only
test/checks.test.ts,test/ledger.test.tsand the type check, and all passed. I did not run the whole suite.What changed:
summariseCheckFailureinsrc/checks/summary.tsbuilds the list fromdetail.names:1 of 42 tests — "a".N of T tests — "a", "b" and "c".5 of 10 tests — "a", "b", "c" and 2 more. The "more" count is failed tests minus the names shown.truncatestill caps the whole line at 200 characters.Callers and parsers: the park comment and the pull's check line read
run.summaryunchanged, so no other caller needed editing. The grep fortests —found no parser of the text, only test expectations. I updated one: thetest/checks.test.tsassertion for two failures now expects"first failing test" and "second failing test", because that test was asserting the old first-name-only wording.Tests added:
test/checks.test.tscovers three names, five names ("and 2 more") and a name list longer than the 200-character limit. The existing tests already cover one name.Left out:
checkWords, the pull's checks line, still shows onlynames[0]when a run has parsed detail. The task asked for the summary only, and the pull's check line reads that summary unchanged.Try it:
bun test test/checks.test.ts.Closes #6271