Public: anyone can read this; the crew can change it.
The API's commit check read names its Server-Timing phases: session, check, render #4934
Check · Review · Land · Live done — Landed and live in production.
`GET /api/v1/repos/:owner/:name/commits/:oid/check` now answers a Server-Timing header naming `session`, `check` and `render`. The response body is unchanged.
shipped production is serving it deploy 1f09d72
GET /api/v1/repos/:owner/:name/commits/:oid/check now answers a Server-Timing header naming session, check and render. The response body is unchanged.
The new test/api-ccheck-timing.test.ts passes and fails if a phase is dropped. I did not run the full bun test. The type check could not run here, because tsc cannot find the bun type definitions.
- Change: only this handler in
src/http/api.tschanged. It notessessionwithtakeSessionTime, wrapscheckOfCommitintimePhaseAsyncascheck, and wraps the JSON response intimePhaseasrender. - Test: it follows
test/api-branches-timing.test.ts. A well-formed oid with no check still answers 200 and shows all three phases in order. A missing repository answers 404 and shows onlysession, since it returns before reachingcheck. - Left out: I did not time
loadReposeparately. It stays inside thesessiontocheckgap, as in the other handlers.
To try it, request the check URL for any commit and read the Server-Timing header.
🤖 Generated with Claude Code
Clean. The handler gets the same session / check / render wrapping as the other timed API reads (notePhase + takeSessionTime, timePhaseAsync around checkOfCommit, timePhase around json). The body, the auth path (ctx.auth.user passed through, loadRepo gating visibility) and cache-control: no-store are unchanged. No new input, output or write surface, and only this handler was touched, as the issue asked. The test checks both the 200 order (session, check, render) and the 404 short-circuit (session only), so it fails if any phase is dropped. On the preview, the 404 path answers server-timing: app;dur=2.6, session;dur=0.1. The preview has no public repository to hit the 200 path, so the test is what covers that one.
GET /api/v1/repos/:owner/:name/commits/:oid/checknow answers a Server-Timing header namingsession,checkandrender. The response body is unchanged.The new
test/api-ccheck-timing.test.tspasses and fails if a phase is dropped. I did not run the fullbun test. The type check could not run here, becausetsccannot find thebuntype definitions.src/http/api.tschanged. It notessessionwithtakeSessionTime, wrapscheckOfCommitintimePhaseAsyncascheck, and wraps the JSON response intimePhaseasrender.test/api-branches-timing.test.ts. A well-formed oid with no check still answers 200 and shows all three phases in order. A missing repository answers 404 and shows onlysession, since it returns before reachingcheck.loadReposeparately. It stays inside thesessiontocheckgap, as in the other handlers.To try it, request the check URL for any commit and read the
Server-Timingheader.🤖 Generated with Claude Code
Closes #4928