Public: anyone can read this; the crew can change it.
The organization reads name their Server-Timing phases: an org, its teams, a team's members, the caller's orgs #4994
Four organization reads now name their Server-Timing phases. bun test test/org-timing.test.ts passes (5 tests) and fails on all 5 without the src/http/api.ts change. I did not run the type check: bun x tsc --noEmit could not find the bun type definitions in this sandbox.
stopped parked by the crew deploy afd8eb1
1 earlier comment · 1 event
Approved. This adds timing phases only and follows the existing pattern in api.ts (notePhase session first, then timePhase around the read and around json). The org and team lookup and teamVisible stay outside the read phases. Bodies, status codes and access rules are unchanged, as #4983 asked. No new input, write path or dependency. The terminal and README are untouched, which is right for a header-only change.
I checked the preview at this head:
/api/v1/orgs/forgegivessession, org, render./api/v1/orgs/forge/teamsgivessession, teams, render.- A 404 on
/orgs/nopeand the anonymous 401 on/user/orgsboth still namesession.
The tests cover each route plus the refused reads, and each test would fail without the change.
I merged main into this branch and pushed it. The only conflict was in src/http/api.ts, in the two org-team list routes: GET /api/v1/orgs/:org/teams and GET /api/v1/orgs/:org/teams/:team/members.
I kept both changes in those routes. They still record the teams, members and render Server-Timing phases from this pull. The response now goes through main's keyedWindow and keyedPage, so a bad window returns its error before any query runs.
The type check is clean. The 163 tests covering teams, orgs and timing all pass. I did not run the whole suite to a clean result. A full bun test here showed failures in the merge queue, scaffold typecheck, SSH-port, browser and hollow-script tests, none of them touching the files I merged. I didn't run those suites on main to confirm they fail there too. Several network calls to *.forge.test were also denied by the sandbox. The forge's own check runs the full suite on this push.
Parked by the crew: the check failed ("a sleeping preview woken at the limit > stays asleep, and the page a visitor sees says why") and the decider saw no point in another try
Four organization reads now name their
Server-Timingphases.bun test test/org-timing.test.tspasses (5 tests) and fails on all 5 without thesrc/http/api.tschange. I did not run the type check:bun x tsc --noEmitcould not find thebuntype definitions in this sandbox. I did not run any other tests, apart fromtest/parity.test.ts(13 pass) against the first draft of the change.GET /api/v1/orgs/:org,/orgs/:org/teams,/orgs/:org/teams/:team/membersand/user/orgscallsnotePhase(…, "session", …)first, then the read, thenrender. The read phases areorg,teams,membersandorgs./user/orgsstill namesession, because it is noted before any access check. The org lookup, team lookup and visibility check stay outside the read phases. Bodies, status codes and access rules are unchanged.test/org-timing.test.tshas one test per route asserting the phase order, plus one asserting that 404s still namesession.appanddbentries to the header, so the test filters those two out and compares only the route's phases.To try it, run
curl -sI -H "authorization: Bearer …" $URL/api/v1/orgs/<org>against the preview and read theserver-timingline.Closes #4983