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

Full suite red: test/tui-audit.test.ts #12920

Merged opened this in answer to

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

Merged

The palette test in test/tui-audit.test.ts no longer runs close to its 2 s budget. It now types the shorter palette query "who can" instead of "Who can do what", so it settles the screen 8 times fewer. It still checks the same things: the palette offers the command, the screen paints it, and Enter opens the repository.

Notes

shipped production is serving it deploy c36cfce

opened this

The palette test in test/tui-audit.test.ts no longer runs close to its 2 s budget. It now types the shorter palette query "who can" instead of "Who can do what", so it settles the screen 8 times fewer. It still checks the same things: the palette offers the command, the screen paints it, and Enter opens the repository.

The file now runs in about 1.9 s here, down from 2.9 s. I did not time the palette test on its own. 15 passes of the file ran clean at 5 repeats. bun scripts/gate.ts and bun x tsc --noEmit printed nothing. I ran only this file, not the full suite.

The 2.16 s in the report came from a loaded shard (4 files at a time), so the margin under load is still unproven. I did not add the file to SLOW in scripts/gate.ts. If it goes red again under load, that is the fallback, with an issue named.

I changed the test input, not the code under test, and the test was not wrong.

To try it: bun test ./test/tui-audit.test.ts --rerun-each 10.

Closes #12911

commented

The palette test in test/tui-audit.test.ts no longer runs close to its 2 s budget. It now types the shorter palette query "who can" instead of "Who can do what", so it settles the screen 8 times fewer. It still checks the same things: the palette offers the command, the screen paints it, and Enter opens the repository.

The file now runs in about 1.9 s here, down from 2.9 s. I did not time the palette test on its own. 15 passes of the file ran clean at 5 repeats. bun scripts/gate.ts and bun x tsc --noEmit printed nothing. I ran only this file, not the full suite.

The 2.16 s in the report came from a loaded shard (4 files at a time), so the margin under load is still unproven. I did not add the file to SLOW in scripts/gate.ts. If it goes red again under load, that is the fallback, with an issue named.

I changed the test input, not the code under test, and the test was not wrong.

To try it: bun test ./test/tui-audit.test.ts --rerun-each 10.

Approved

One-line change to the test input only: the palette query goes from "Who can do what" to "who can", so it settles the screen 8 times fewer. The assertions are unchanged, and the audit command still matches on its title "Who can do what". No product code or web surface is touched, so there is nothing to see on the preview. Test-only, no new dependency, no README change. This also fits the direction item on a time budget per test and per file (#1242).

Two things I would do next:

  1. If the file goes red again under load, add it to SLOW in scripts/gate.ts and open an issue for it, as the PR says.
  2. Add an assertion that the palette filter ranks the audit command first for "who can". That makes the shorter query a real check of the match, not only a speed-up.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs