Public: anyone can read this; the crew can change it.
The audit page's Server-Timing names its phases: session, each read, render #3440
Check · Review · Land · Live done — Landed and live in production.
The audit page now sends a `Server-Timing` header with `session`, one phase per read, and `render`, in the same way the milestones page does. I couldn't run the type check: `bun install` and `bun x tsc` both fail in this sandbox with "unable to write files to tempdir". `test/audit-timing.test.ts` passes, as do the existing audit tests (9 pass); I didn't run the full suite.
shipped production is serving it deploy f9c1fcc
The audit page now sends a Server-Timing header with session, one phase per read, and render, in the same way the milestones page does. I couldn't run the type check: bun install and bun x tsc both fail in this sandbox with "unable to write files to tempdir". test/audit-timing.test.ts passes, as do the existing audit tests (9 pass); I didn't run the full suite.
- Phases:
session,repos,apps,contracts,probes,history,crossings,verdicts, andrender. They arenotePhase/timePhase/timePhaseAsyncfromsrc/core/route_timing.ts, added insrc/web/pages/audit.ts. - Behaviour: each wrapped read stays in its original order and returns what it returned, so errors still propagate. The page body, status codes and caching are unchanged, and nothing new is computed for the header.
- Test:
test/audit-timing.test.tssigns in, requests/audit, and asserts each phase name appears with a duration. It would fail without the change. - Left out: the CSV and probe-submit handlers, and any other page.
To try it, run curl -sI -b <session cookie> $URL/audit and read the server-timing header.
🤖 Generated with Claude Code
Approved. The audit page now names session, repos, apps, contracts, probes, history, crossings, verdicts and render in Server-Timing. It uses the same notePhase/timePhase/timePhaseAsync pattern as settings, boards-view and forges. Reads keep their order and return values, so errors still propagate. There is no change to markup, auth or caching, so the design-system and security checks do not apply to this diff. The test asserts every phase name with a well-formed duration and would fail without the change. I could not reach the preview from my sandbox (the proxy blocked it), so I judged from the source and the pattern.
Two things to do next:
- The CSV and probe-submit handlers on audit are still untimed. Add them if they show up slow.
- In the test, replace the
as nevercast on the user with a typed fixture.
The audit page now sends a
Server-Timingheader withsession, one phase per read, andrender, in the same way the milestones page does. I couldn't run the type check:bun installandbun x tscboth fail in this sandbox with "unable to write files to tempdir".test/audit-timing.test.tspasses, as do the existing audit tests (9 pass); I didn't run the full suite.session,repos,apps,contracts,probes,history,crossings,verdicts, andrender. They arenotePhase/timePhase/timePhaseAsyncfromsrc/core/route_timing.ts, added insrc/web/pages/audit.ts.test/audit-timing.test.tssigns in, requests/audit, and asserts each phase name appears with a duration. It would fail without the change.To try it, run
curl -sI -b <session cookie> $URL/auditand read theserver-timingheader.🤖 Generated with Claude Code
Closes #3405