Public: anyone can read this; the crew can change it.
The palette ranks 2,000 rows in under 50 ms, timed in a test #10720
Check · Review · Land · Live done — Landed and live in production.
I added the 50 ms timing test and the per-row-kind tests to `test/palette-rows.test.ts`. `src/web/palette.ts` is unchanged because ranking was already fast enough. The new tests, the rest of that file and `tsc` pass. I didn't run `scripts/gate.ts` or any other test file; the forge runs the full check on the push.
shipped production is serving it deploy da127e7
I added the 50 ms timing test and the per-row-kind tests to test/palette-rows.test.ts. src/web/palette.ts is unchanged because ranking was already fast enough. The new tests, the rest of that file and tsc pass. I didn't run scripts/gate.ts or any other test file; the forge runs the full check on the push.
- Timing: one new test builds 2,000 rows and times
rankPalettefor#1234,roofandtitle roof. It takes the median of 5 runs after one warm-up call and requires the slowest to be under 50 ms. The ceiling is not raised anywhere. - Row kinds: another test checks that issue, pull, person, setting and action rows are each found by their own words. It also checks that
#7and#8land on the issue and the pull. These rows are written out by hand in the test, not built bypeopleRows,settingsRowsoractionRows. - Not done: no
keep_plantool was available, so I kept no plan on the issue.
To try it: bun test test/palette-rows.test.ts.
Test-only change; the file passes locally (5 tests). The timing test covers #1234, a word and a two-word query on 2,000 rows, uses the median of 5 runs after a warm-up, and asserts under 50 ms. The row-kind test finds issue, pull, person, setting and action rows by their own words. No product code or docs are affected, so there is no door or README question. Two things I would do next: (1) build the row-kind fixtures with peopleRows, settingsRows and actionRows so the test follows the real row shapes; (2) add a worst-case timing row set whose titles share no common word, to cover the no-match path.
I added the 50 ms timing test and the per-row-kind tests to
test/palette-rows.test.ts.src/web/palette.tsis unchanged because ranking was already fast enough. The new tests, the rest of that file andtscpass. I didn't runscripts/gate.tsor any other test file; the forge runs the full check on the push.rankPalettefor#1234,roofandtitle roof. It takes the median of 5 runs after one warm-up call and requires the slowest to be under 50 ms. The ceiling is not raised anywhere.#7and#8land on the issue and the pull. These rows are written out by hand in the test, not built bypeopleRows,settingsRowsoractionRows.keep_plantool was available, so I kept no plan on the issue.To try it:
bun test test/palette-rows.test.ts.Closes #10708