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

Shards: a pure function decides which failing files were red only beside others #2444

shipped production is serving it opened this has it
opened this

Part 1 of #2416. It adds code and changes nothing about how the gate runs, so it cannot turn some other test red.

Done looks like:

  • [ ] scripts/shards.ts exports besideOthers(red, alone, cap = 3). red is a shard's failing files; alone maps a file to whether it passed when run alone. It returns { red: string[], besideOthers: string[], line: string | null }. A file that passed alone moves to besideOthers. A file that failed alone, or was never retried, stays red. Only the first cap files of a shard may be cleared, and the rest stay red. line is fails only beside others: <file> (shard-mates: …), or null.
  • [ ] Unit tests in test/shards.test.ts cover: cleared, still red, over the cap, and an empty input. Run bun test test/shards.test.ts and quote the result.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs