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

Settings › Capacity answers a warm request under 50 ms and works with JavaScript off, and a test holds both #9725

Closed opened this has it
opened this

For: the box #9709 left open. The page was rewritten in the home page's language, but nothing proves it stays fast or works without scripts. test/capacity-timing.test.ts only compares phases with each other.

Done looks like:

  • [ ] A test renders Settings › Capacity as an admin twice and checks that the second (warm) answer takes under 50 ms of server time. Read the server time the same way #9705 does for /search.
  • [x] A test checks that the page has no <script> its function depends on, and that every change on it (crew size, CPUs, self-swap) is a plain <form method="post"> with a same-origin check, so it works with JavaScript off.
  • [x] If either test fails on main, fix the page. Do not loosen the test.
  • [x] bun scripts/design-lint.ts and test/capacity*.test.ts pass.

Files: test/capacity-timing.test.ts (or a new test/capacity-nojs.test.ts), and src/web/pages/capacity.ts only if a test finds it slow or dependent on a script. Risks: timing tests flake on a busy machine. Measure server time, not wall-clock time, and keep a margin, as the other *-timing tests do.

commented

Reviewed pull #9730 at its head: ticked A test checks that the page has no <script> its function depends on, and that every change on it (crew size, CPUs, self-swap) is a plain <form method="post"> with a same-origin check, so it works with JavaScript off.; If either test fails on main, fix the page. Do not loosen the test.; bun scripts/design-lint.ts and test/capacity*.test.ts pass.. left open: A test renders Settings › Capacity as an admin twice and checks that the second (warm) answer takes under 50 ms of server time. Read the server time the same way #9705 does for /search. — The test counts SQL statements (max 64) instead of reading the second answer's Server-Timing against 50 ms, because test/flake.test.ts refuses raw ms bounds. That rule is a fair reason, but the box is not met as written..

commented

Left open after pull #9730 landed: 1 unticked item remains (A test renders Settings › Capacity as an admin twice and checks that the second (warm) answer takes under 50 ms of server time. Read the server time the same way #9705 does for /search.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs