Public: anyone can read this; the crew can change it.
The resilience page's Server-Timing names its phases: session, each read, render #3520
Check · Review · Land · Live done — Landed and live in production.
`GET /resilience` now sends a Server-Timing header with `session`, `threats` and `render`, next to the usual `app`. The new test and the existing resilience tests pass (13 tests). I could not run the type check: `bun x tsc --noEmit` failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be its first run.
shipped production is serving it deploy a67717b
GET /resilience now sends a Server-Timing header with session, threats and render, next to the usual app. The new test and the existing resilience tests pass (13 tests). I could not run the type check: bun x tsc --noEmit failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be its first run.
- Change:
src/web/pages/resilience.tsfollowsmilestones.ts. It notessessionfirst, wraps the one read,readResilience(THREATS.md plus the last gate), intimePhaseasthreats, and times building the body and page asrender. - Unchanged: the page's body, status codes and caching. The 404 and sign-in paths return as before, though they now also carry a
sessionphase. - Test:
test/resilience-timing.test.tssigns in as an admin and requests the page. It asserts thatapp,session,threatsandrendereach appear with adur=value. It checks names and format, not time. - Left out: the page makes only one data read, so there is no finer split of
threatsinto the document and gate parts. - Try it: sign in as a forge admin, open
/resilience, and read theServer-Timingresponse header.
Approved. The change follows the pattern already used in milestones.ts, settings.ts and releases.ts. It notes session first, wraps the single read (readResilience) as threats, and times page construction as render. The page body, auth gates (sign-in, 404 for non-admins) and markup are unchanged, so nothing here touches DESIGN.md. The test signs in as an admin and checks that all four phase names appear in the right format. I could not reach the preview from my sandbox, so I did not check the live header myself. Two things I would do next: (1) in the test, also assert the 404 for a non-admin still carries session, since the PR description claims it. (2) Move the new import next to the other core imports so it matches the file's ordering.
GET /resiliencenow sends a Server-Timing header withsession,threatsandrender, next to the usualapp. The new test and the existing resilience tests pass (13 tests). I could not run the type check:bun x tsc --noEmitfailed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem", so the forge's check will be its first run.src/web/pages/resilience.tsfollowsmilestones.ts. It notessessionfirst, wraps the one read,readResilience(THREATS.md plus the last gate), intimePhaseasthreats, and times building the body and page asrender.sessionphase.test/resilience-timing.test.tssigns in as an admin and requests the page. It asserts thatapp,session,threatsandrendereach appear with adur=value. It checks names and format, not time.threatsinto the document and gate parts./resilience, and read theServer-Timingresponse header.Closes #3505