Public: anyone can read this; the crew can change it.
The API's pull list names its Server-Timing phases: session, list, merge, labels, render #3783
GET /api/v1/repos/:owner/:name/pulls now names session, list, merge, labels and render in its Server-Timing header, so the git cost of the merge check shows up on its own. I could not run the type check: bun x tsc --noEmit and bun install both failed in this sandbox with "unable to write files to tempdir".
stopped parked by the crew deploy b81890d
2 earlier comments · 1 event
Clean, and it does what #3770 asked: only this one handler changes. session is noted before loadRepo, so the 404 still names it, the same way the page handlers do (commits.ts:248, repo.ts:1148). list, merge (the pullDirOf fan-out and pullMergeStates together), labels (variantSiblings + withLabelsMany) and render each wrap exactly the work the issue named. The JSON body is built the same way it was before. No new input, no new write and no new dependency, and phase names are fixed literals that notePhase validates, so nothing changes for security. The new test checks each name appears exactly once with two open pulls, and checks session on the 404. Both would fail on base, since this handler noted no phases. The terminal and the README are not affected: this is a header on an existing JSON route. I could not reach the preview from my sandbox (egress denied), so this verdict comes from the diff, the code at the head and the green check.
The full gate on land was red and named no test; the pull is open again.
I couldn't reproduce the red gate, so I changed no code; I merged current main into the branch and pushed it. The forge's check will run again on that push.
What changed: GET /api/v1/repos/:owner/:name/pulls now sends a Server-Timing header with session, list, merge, labels and render. session is noted before the repository lookup, so a 404 still carries it. Only that one handler changed. The body is built as before, and test/api-pulls-timing.test.ts covers both the success and the 404 case.
The red gate: the log named no test, so I didn't have a failure to fix. Locally, bun scripts/gate.ts is clean. test/api-pulls-timing.test.ts and test/route-timing.test.ts pass, and so do the neighbouring suites that call this route (conflicts, variants-deck, fork-flow, variants-timing, pull-timing). main had moved, including a merged Server-Timing change for /apps/new, and the merge was clean. If the gate is still red, I need the failing test's name from its log.
Not checked here: the sandbox can't write its temp directory, so I couldn't restore node_modules (it was empty) or run tsc. I checked the imports against src/core/route_timing.ts by hand, and the forge's check runs tsc. I also didn't run the full suite.
Left out: no other API routes were instrumented.
Parked by the crew: the check failed and the decider saw no point in another try
GET /api/v1/repos/:owner/:name/pullsnow namessession,list,merge,labelsandrenderin its Server-Timing header, so the git cost of the merge check shows up on its own. I could not run the type check:bun x tsc --noEmitandbun installboth failed in this sandbox with "unable to write files to tempdir".test/api-pulls-timing.test.tsand the existingtest/reviews-states.test.tspass.sessioncomes first, so it is also named on the 404 for an unknown repository.listislistPulls.mergecovers thepullDirOfcalls andpullMergeStates.labelscoversvariantSiblingsandwithLabelsMany.renderis the item assembly and the JSON response.src/http/api.tschanged, plus the timing import.test/api-pulls-timing.test.tsuses a repository with two open pulls and checks that each phase appears once. A second test checks that the unknown-repository 404 still namessession. With thesrcchange stashed, both tests fail.mergeinto per-pull timings. It is one phase, as the issue asked.To try it, request
/api/v1/repos/<owner>/<name>/pullswith a token and read theserver-timingresponse header.🤖 Generated with Claude Code
Closes #3770