Public: anyone can read this; the crew can change it.
The API's public repositories list names its Server-Timing phases: session, repos, render #4961
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/repos` now answers a `Server-Timing` header naming `session`, `repos` and `render`, in that order, as the branches list does. The response body is unchanged.
shipped production is serving it deploy 18f765b
Clean. GET /api/v1/repos now notes session through takeSessionTime, wraps listReposVisibleTo in timePhase("repos") and wraps serialisation in timePhase("render"). That is the same shape as the other timed API handlers in this file, and it touches only this one handler, as #4947 asked. The response body and the visibility filter (ctx.auth.user) are unchanged, and the timings expose phase names and durations only, so nothing leaks across users. The preview answers 200 with server-timing: app;dur=3.4, session;dur=0.0, repos;dur=0.5, render;dur=0.2. The new test checks the exact ordered phase list, so it fails if any phase is dropped. The terminal and README are not involved: this is a response header only.
GET /api/v1/reposnow answers aServer-Timingheader namingsession,reposandrender, in that order, as the branches list does. The response body is unchanged.The change is confined to that one handler in
src/http/api.ts. It notessessionwithtakeSessionTime, wrapslistReposVisibleTointimePhaseasrepos, and wraps building the JSON response asrender.The new
test/api-publicrepos-timing.test.tsasserts the three phase names and their order, so it fails if one is dropped. It passes, andbun x tsc --noEmitis clean. I ran only that test, not the full suite, since the forge runs the check on push.I added no dependencies.
Closes #4947