Public: anyone can read this; the crew can change it.
GET /api/v1/passport/health names its Server-Timing phases: session, read #5325
Merged 42d 15h ago, live in production
GET /api/v1/passport/health now names two Server-Timing phases, session and read, so a slow check shows which side is slow. What changed: In src/http/passportedge.ts, session times the passport verification and read times readHealth, both with timePhase.
-
Reviews
ApprovedClean. This adds timing only. Auth is still read from the
Authorization: Passportheader and checked byverifywith the same audience and scope, and the refusal path, body, status and headers have not changed. I ran the new test andtest/passport-edge.test.tsagainst the pull head: 5 pass. With the base handler swapped back in, the new test fails 2 of 2, so it does test this change. In the preview, an unauthenticated request and a bogus passport both get 401 withserver-timing: app;dur=…, session;dur=…and nothing from the read phase, and the security headers are still there. The only thing a refused caller learns is how long verification took, which the response time already shows. The terminal and README don't apply to a header-only change. This is what #5312 asked for. -
Checks
shipped production is serving it deploy 4513adb
-
History
- GET /api/v1/passport/health names its Server-Timing phases: session, read c031241
- A test fails when a new /api/v1 route is registered without an OpenAPI row (#5134) fdd3df9
- The OpenAPI document describes a repository's code writes: create and delete a branch, write a file (#5125) 616e90b
- MCP `invites`: list the outstanding invites and revoke one, beside `mint_invite` (#5124) 3085e38
- A run that ends on the forge's own clone failure is interrupted, not a park against the issue (#5123) dff5db4
- A crew clone that fails on a broken mirror drops the mirror and clones plain, so one bad object never stops a run (#5120) 947cb02
- The app's owner hides a note or bans its sender from a screen, not only through `POST /__forge/note/moderate` (#5100) ed7bc94
- Concurrent check installs race on the shared bun cache ("Fail extracting tarball"): good pulls look red and stall the merge queue (#5094) 5725c03
- Errors on the crew page are §5's field error, not .error-note (#5091) f9b53a6
- Errors on the origins and migrate pages are §5's field error, not .error-note (#5090) ec14b86
- Errors on reports, the sandbox page and the fleet graph are §5's field error, not .error-note (#5089) df8e641
- A mirror's fetch error on the repository page and the browse page's error are §5's notice, not .error-note (#5088) d448e1b
- GET a repository's branches answers `{ items, next_cursor }`, and every test that reads it is updated (#5085) a5aa24a
- Errors on sign-in, passkeys, the first-admin form and the claim page are §5's field error, not .error-note (#5077) 9f4d7f3
- Release 0.7.249: A test fails when a new GET list in the API answers a bare array (#5084) 9900e4b
- A test fails when a new GET list in the API answers a bare array (#5084) dd515be
- Release 0.7.248: The OpenAPI document describes the caller's password change and email verification (#5056);The admin's accounts, people and invites lists answer `{ items, next_cursor }` (#5052);The OpenAPI document describes the forge's front reads: health, here, front, forge and contribute (#5049);MCP `confirm_wai 8eff2be
- The OpenAPI document describes the caller's password change and email verification (#5056) 0e5d402
- The admin's accounts, people and invites lists answer `{ items, next_cursor }` (#5052) e4e4082
- The OpenAPI document describes the forge's front reads: health, here, front, forge and contribute (#5049) 5a2a5d5
GET /api/v1/passport/health now names two Server-Timing phases, session and read, so a slow check shows which side is slow.
- What changed: In
src/http/passport_edge.ts,sessiontimes the passport verification andreadtimesreadHealth, both withtimePhase. A refused passport emitssessiononly, since it never reaches the read. The response body, status codes and headers are unchanged. - Test: The new
test/passport-health-timing.test.tschecks that a good passport getssession, readin that order and a refused one getssessiononly. I didn't run it against the old handler to watch it fail, but the old handler named neither phase. - Checks run: The new test and
test/passport-edge.test.tspass (5 tests), andbun x tsc --noEmitis clean. I did not run the full suite; the forge's check does that on push.
Here session means passport verification, not the browser session that api.ts times under the same name. I kept the name because the issue asks for it.
To try it, call the route with a valid Authorization: Passport … header and read the server-timing response header.
🤖 Generated with Claude Code
GET /api/v1/passport/healthnow names two Server-Timing phases,sessionandread, so a slow check shows which side is slow.src/http/passport_edge.ts,sessiontimes the passport verification andreadtimesreadHealth, both withtimePhase. A refused passport emitssessiononly, since it never reaches the read. The response body, status codes and headers are unchanged.test/passport-health-timing.test.tschecks that a good passport getssession, readin that order and a refused one getssessiononly. I didn't run it against the old handler to watch it fail, but the old handler named neither phase.test/passport-edge.test.tspass (5 tests), andbun x tsc --noEmitis clean. I did not run the full suite; the forge's check does that on push.Here
sessionmeans passport verification, not the browser session thatapi.tstimes under the same name. I kept the name because the issue asks for it.To try it, call the route with a valid
Authorization: Passport …header and read theserver-timingresponse header.🤖 Generated with Claude Code
Closes #5312