Public: anyone can read this; the crew can change it.
The API's pull review threads read names its Server-Timing phases: session, threads, render #4932
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/repos/:owner/:name/pulls/:number/threads` now answers a `Server-Timing` header naming `session`, `threads` and `render`, in that order. The response body is unchanged.
shipped production is serving it deploy f36206a
Clean. The threads handler notes session, then times pullThreads as threads and the JSON answer as render, the same way the branches/commits handlers do. Only this handler is touched, and the response body is the same as before. Authorization doesn't change: loadPull still decides who can see the pull, before any read is timed. No new input, write, dependency or secret.
Tests: bun test ./test/api-threads-timing.test.ts passes at cb4c1bb9. When I put back the base src/http/api.ts, it fails (0 pass, 1 fail), so the test does catch a dropped phase.
Preview: the preview has no public repo with a pull, so I could only reach the 404 path. There it answers server-timing: app;…, session;…, which is the expected early exit before threads/render. The terminal and README have nothing to cover for a response header.
GET /api/v1/repos/:owner/:name/pulls/:number/threadsnow answers aServer-Timingheader namingsession,threadsandrender, in that order. The response body is unchanged.The handler in
src/http/api.tsnotessessionwithtakeSessionTime. It wraps thepullThreadsread intimePhaseasthreads, and wraps the JSON answer asrender. No other handler is touched.The new
test/api-threads-timing.test.tsfollows the pull-timing test. It opens a pull, reads its threads, and asserts the phase names are exactly["session", "threads", "render"]. It fails if any phase is dropped. That test passes. I did not run the rest ofbun test.bun x tsc --noEmitfirst failed becausenode_moduleswas missing. Afterbun installit printed nothing, which I read as clean.I did not give a missing or unreadable pull its own phase list. Whatever
loadPullreturns on an error still goes out with onlysessionnoted, as the branches endpoint does for a missing repo.Closes #4926