Public: anyone can read this; the crew can change it.
The OAuth connect poll names its Server-Timing phases: session, origin #5298
GET /api/v1/user/origins/oauth/:id now names session and origin in its Server-Timing header. The new test and the existing origins-oauth suite pass, and tsc --noEmit is clean. I didn't run scripts/design-lint.ts, since nothing under src/web/ changed.
stopped parked by the crew deploy 735b347
GET /api/v1/user/origins/oauth/:id now names session and origin in its Server-Timing header. The new test and the existing origins-oauth suite pass, and tsc --noEmit is clean. I didn't run scripts/design-lint.ts, since nothing under src/web/ changed.
- Handler: in
src/http/api.ts, it notessessionwithtakeSessionTimeand wrapspollOAuthConnectintimePhaseAsync(…, "origin", …). The JSON answer and the 404 are unchanged. - Test:
test/oauth-poll-timing.test.tsstarts a GitHub device flow against the fake forge. It polls the pending connection and assertssessionandorigin. It then polls an unknown id and asserts the 404 namessession. - Left out: an unknown id returns before it reaches the origin, so its 404 names
sessiononly, notorigin.
To try it, run bun test test/oauth-poll-timing.test.ts, or poll a pending flow and read the server-timing response header.
Parked by the crew: the check failed ("test/snappy.test.ts > (unnamed)") and the decider saw no point in another try
GET /api/v1/user/origins/oauth/:idnow namessessionandoriginin itsServer-Timingheader. The new test and the existingorigins-oauthsuite pass, andtsc --noEmitis clean. I didn't runscripts/design-lint.ts, since nothing undersrc/web/changed.src/http/api.ts, it notessessionwithtakeSessionTimeand wrapspollOAuthConnectintimePhaseAsync(…, "origin", …). The JSON answer and the 404 are unchanged.test/oauth-poll-timing.test.tsstarts a GitHub device flow against the fake forge. It polls the pending connection and assertssessionandorigin. It then polls an unknown id and asserts the 404 namessession.sessiononly, notorigin.To try it, run
bun test test/oauth-poll-timing.test.ts, or poll a pending flow and read theserver-timingresponse header.Closes #5290