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

A test pins /system's sizes, spans and sparkline, and a reading outside 0–100 or not a number still draws one block #6876

shipped production is serving it opened this has it
opened this

src/system/format.ts formats what /system and the terminal print (bytes, span, spark). No test pins it. Today spark silently drops a NaN reading, which shifts the rest of the history left.

Done:

  • [ ] test/system-format.test.ts: bytes gives 0 B, 1023 B, 1.0 KiB, 10 KiB and 1.5 GiB at their edges. span gives 89s, 2m, 90m and 2d at its edges.
  • [ ] spark draws exactly one block per reading. Below 0 is the lowest block and above 100 the highest. A NaN or infinite reading draws the lowest block instead of vanishing (fix spark to do this).
  • [ ] plural (src/kernel/plural.ts) gives 1 comment, 0 comments, and a given irregular plural.

This adds a test file only; change the code only where the test finds a hole, and say so in the pull. It touches no api.ts, MCP tool or docs/MCP.md, so it waits on none of the pulls there.

Before pushing: bun x tsc --noEmit and the test you add. Tests pass now in and never read the wall clock.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs