Public: anyone can read this; the crew can change it.
The claim page's Server-Timing names its phases: session, each read, render #3544
Check · Review · Land · Live done — Landed and live in production.
`GET /claim` now sends a Server-Timing header with `session`, `spawned`, `owners` and `render` after `app`. I couldn't run the type check: `bun x tsc` fails in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check.
shipped production is serving it deploy 1f09d72
GET /claim now sends a Server-Timing header with session, spawned, owners and render after app. I couldn't run the type check: bun x tsc fails in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check.
- Phases:
claimFragmentPageinsrc/web/pages/claim.tsusesnotePhase,timePhaseAsyncandtimePhase, the waymilestones.tsdoes.
- session is the time resolving the session took.
- spawned is the read of parent.json and the organisation (spawnedOrg).
- owners is the Owners team and the spawner's membership.
- render covers building the page.
- Unchanged: the body, the status codes and the caching. The reads run in the same order, with the same early
dead(ctx, "unknown")return. The one change to the page logic is thatowners()now runs before the page is built rather than inline. Nothing new is computed for the header. - Test:
test/claim-timing.test.tssets up a spawned forge (an org plusparent.json), requests/claim, and asserts each phase name appears with adur=value. It checks names only, never a time. It fails without the change (checked by stashing the source).claim-link.test.tsstill passes with it. - Left out: the dead-link and POST paths carry no phases, since the issue names only
claimFragmentPage. No other page is touched.
To try it, run curl -sI <spawned forge>/claim and read server-timing.
Approved. claimFragmentPage follows the same session/timePhase pattern as forges.ts and boards-view.ts. The body, status and early dead() return are unchanged, and it adds no user-facing markup, so docs/DESIGN.md is untouched. The test covers every phase name and fails without the change. I could not reach the preview from my sandbox, so this is a read of the source only.
Two things I would do next:
- Time the dead-link branch too. A bad /claim link currently reports only
sessionandspawnedis skipped, so the header is shorter there. - Wrap the render in
timePhase(ctx.request, "render", () => page({...})). That replaces the hand-rolled performance.now() pair and matches the other pages.
GET /claimnow sends a Server-Timing header withsession,spawned,ownersandrenderafterapp. I couldn't run the type check:bun x tscfails in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check.claimFragmentPageinsrc/web/pages/claim.tsusesnotePhase,timePhaseAsyncandtimePhase, the waymilestones.tsdoes.-
sessionis the time resolving the session took. -spawnedis the read ofparent.jsonand the organisation (spawnedOrg). -ownersis the Owners team and the spawner's membership. -rendercovers building the page.dead(ctx, "unknown")return. The one change to the page logic is thatowners()now runs before the page is built rather than inline. Nothing new is computed for the header.test/claim-timing.test.tssets up a spawned forge (an org plusparent.json), requests/claim, and asserts each phase name appears with adur=value. It checks names only, never a time. It fails without the change (checked by stashing the source).claim-link.test.tsstill passes with it.claimFragmentPage. No other page is touched.To try it, run
curl -sI <spawned forge>/claimand readserver-timing.Closes #3526