Public: anyone can read this; the crew can change it.
Each route's hourly p50 and p95 reads in the terminal and as a boards source, slowest first #16082
Check · Review · Land · Live done — Landed and live in production.
The terminal's System screen now lists the slowest routes for the last 24 hours. routehour is also a boards source. The new test and the boards and System suites pass, and tsc and scripts/gate.ts --fix are clean.
shipped production is serving it deploy 3fede26
The terminal's System screen now lists the slowest routes for the last 24 hours. route_hour is also a boards source. The new test and the boards and System suites pass, and tsc and scripts/gate.ts --fix are clean. I didn't run the full suite. scripts/fast.ts found the diff too broad to name tests, so I ran test/boards*.test.ts as well as the three files above.
What changed
- System screen (
src/tui/screens/system.ts): a new "Slowest routes, last 24 h" block shows the five routes with the highest p95. Each row has requests, p50, p95 and the route's budget frombudgetFor, or "—" if it has none. It shows only for an admin who is a person, the same gate as the telemetry grant. Agents and members see nothing. - Read helper (
slowestRoutesinsrc/perf/history.ts): one indexed query onhour, grouped by route. A route's p50 and p95 are its worst hour in the window, and its requests are summed. Ties break on busier route, then name. - Boards source (
route_hourinsrc/boards/sources.ts): admin-only, with columns route, hour, n, p50 and p95.houris converted to an ISO time so a board can chart p95 by hour. It has an entry insrc/boards/guide.ts("Route speed by hour"), and p50 and p95 are given the unit "ms". The guide test requires both. - Docs:
docs/features/performance-watcher.mdno longer lists the terminal and the board page under "Not yet", and describes both reads. - Test (
test/route-hours-read.test.ts): covers the order, the 24-hour window, the admin-only read with the budget shown, and the source's columns and time format.
Left out
- The System dialog doesn't scroll, so it shows five rows with no "more" line. The admin API still returns every route-hour.
- The terminal shows each route's worst hour, not a per-hour breakdown. The board source gives the per-hour series.
To try
- Sign in to the terminal as an admin and open System (
/system) to see the block. It appears once the performance watcher has written route-hour rows. - In
/boards, pick "Route speed by hour", which defaults to p95 filtered to/.
The push hook asked for a Try: commit, so the branch ends with an empty commit that carries it.
🤖 Generated with Claude Code
Meets all four boxes: System screen block is admin-person only, slowest p95 first with n/p50/p95/budget; route_hour is an admin source with the right columns and hour as a time; docs Not yet line updated; test pins order, window, admin-only, columns. Next two things I would do: (1) the terminal shows each route's worst p50 and p95 taken independently across hours (MAX of each), so p50 and p95 on one row can come from different hours; label it or take both from the worst-p95 hour. (2) Add a test that an agent admin (not a person) reads nothing, since the gate is mayGrant and only a member is tested.
The terminal's System screen now lists the slowest routes for the last 24 hours.
route_houris also a boards source. The new test and the boards and System suites pass, andtscandscripts/gate.ts --fixare clean. I didn't run the full suite.scripts/fast.tsfound the diff too broad to name tests, so I rantest/boards*.test.tsas well as the three files above.What changed
src/tui/screens/system.ts): a new "Slowest routes, last 24 h" block shows the five routes with the highest p95. Each row has requests, p50, p95 and the route's budget frombudgetFor, or "—" if it has none. It shows only for an admin who is a person, the same gate as the telemetry grant. Agents and members see nothing.slowestRoutesinsrc/perf/history.ts): one indexed query onhour, grouped by route. A route's p50 and p95 are its worst hour in the window, and its requests are summed. Ties break on busier route, then name.route_hourinsrc/boards/sources.ts): admin-only, with columns route, hour, n, p50 and p95.houris converted to an ISO time so a board can chart p95 by hour. It has an entry insrc/boards/guide.ts("Route speed by hour"), and p50 and p95 are given the unit "ms". The guide test requires both.docs/features/performance-watcher.mdno longer lists the terminal and the board page under "Not yet", and describes both reads.test/route-hours-read.test.ts): covers the order, the 24-hour window, the admin-only read with the budget shown, and the source's columns and time format.Left out
To try
/system) to see the block. It appears once the performance watcher has written route-hour rows./boards, pick "Route speed by hour", which defaults to p95 filtered to/.The push hook asked for a
Try:commit, so the branch ends with an empty commit that carries it.🤖 Generated with Claude Code
Closes #16065