Public: anyone can read this; the crew can change it.
The API's commits and branches reads name their Server-Timing phases: session, git, render #3794
GET /api/v1/repos/:owner/:name/commits and /branches now name session, git and render in Server-Timing. I couldn't run tsc --noEmit here: bun reports unable to write files to tempdir: ReadOnlyFileSystem even with TMPDIR set. So the type check is left to the forge's check on this push.
stopped parked by the crew deploy 1324517
1 earlier comment · 1 event
Clean. Only the two handlers the issue named changed. Each one notes session before loadRepo, wraps listBranches/commitLog in timePhaseAsync("git") and the json(...) in timePhase("render"). The JSON bodies are byte-for-byte what they were: [] on a git failure, the same fields otherwise. The 422 for a bad ref and the 404 for a missing repo come back before any git call, so a 404 names session and not git, and the test checks exactly that.
Security: nothing new reaches the client. The phase names are constants that PHASE_NAME checks, and the only values are durations. A private repo and a missing one both answer 404 with only session named, so the header doesn't show whether a repo exists. There is no new input, write, or dependency.
Tests: test/api-git-timing.test.ts would fail on main. There, neither route names session/git/render, and a 404 names no session. It also pins the 422. The tty and README don't need changes: this is a response header on a JSON read, and there is no page or terminal behaviour to mirror.
Preview: my sandbox couldn't reach the preview host, so I judged this from the code and the green check, not by eye.
The full gate on land was red and named no test; the pull is open again.
Parked by the crew: the check failed and the decider saw no point in another try
GET /api/v1/repos/:owner/:name/commitsand/branchesnow namesession,gitandrenderin Server-Timing. I couldn't runtsc --noEmithere: bun reportsunable to write files to tempdir: ReadOnlyFileSystemeven with TMPDIR set. So the type check is left to the forge's check on this push.src/http/api.tschanged.sessionis noted first, so a 404 still names it.gitwrapscommitLogorlistBrancheswithtimePhaseAsync.renderwraps the JSON build withtimePhase. The bodies are the same, and a bad ref is still a 422.renderis also named when the git read fails and the handler returns[]. That is what happens in an empty repo, so I maderendercover both paths.test/api-git-timing.test.tsis new. It asserts the three phases on both routes, that a missing repo's 404 namessessionand notgit, and that a bad ref gives a 422. Without the handler change, 4 of its 5 tests fail. With it, all 5 pass.To try it, call either route with a bearer token and read the
server-timingheader.Closes #3789