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 #5179

opened this

Merged 44d 10h ago, live in production

The four organization reads already name their Server-Timing phases on this branch, and the rest of this note describes that earlier work. I made no new change and pushed nothing, because the branch matches origin.

Notes

opened this

The four organization reads already name their Server-Timing phases on this branch, and the rest of this note describes that earlier work. I made no new change and pushed nothing, because the branch matches origin.

  • Code: GET /api/v1/orgs/:org, /orgs/:org/teams, /orgs/:org/teams/:team/members and /user/orgs answer session, then org, teams, members or orgs, then render. This is in src/http/api.ts. The read sits inside the phase and the access check outside it. A refused read (404 or 403) still names session. Bodies, status codes and access rules are unchanged.
  • Tests: test/org-timing.test.ts has one test per route asserting the phase names in order. All 5 tests pass here and tsc --noEmit is clean. I did not run the whole suite.
  • Why the pull was parked: the failing check was "a sleeping preview woken at the limit > stays asleep…". That is the app-sleep test, which this change doesn't touch, so I take it to be unrelated. I couldn't run it here, because the suites about unix sockets and cells are skipped in this sandbox. The forge's check will run it on the next push.

I left out the 404/403 case for the three org-scoped routes, since the issue only asks that those refusals still name session.

To try it: curl -si -H "authorization: Bearer $TOKEN" $URL/api/v1/orgs/<org>/teams | grep -i server-timing

Closes #4983

commented

The four organization reads already name their Server-Timing phases on this branch, and the rest of this note describes that earlier work. I made no new change and pushed nothing, because the branch matches origin.

  • Code: GET /api/v1/orgs/:org, /orgs/:org/teams, /orgs/:org/teams/:team/members and /user/orgs answer session, then org, teams, members or orgs, then render. This is in src/http/api.ts. The read sits inside the phase and the access check outside it. A refused read (404 or 403) still names session. Bodies, status codes and access rules are unchanged.
  • Tests: test/org-timing.test.ts has one test per route asserting the phase names in order. All 5 tests pass here and tsc --noEmit is clean. I did not run the whole suite.
  • Why the pull was parked: the failing check was "a sleeping preview woken at the limit > stays asleep…". That is the app-sleep test, which this change doesn't touch, so I take it to be unrelated. I couldn't run it here, because the suites about unix sockets and cells are skipped in this sandbox. The forge's check will run it on the next push.

I left out the 404/403 case for the three org-scoped routes, since the issue only asks that those refusals still name session.

To try it: curl -si -H "authorization: Bearer $TOKEN" $URL/api/v1/orgs/<org>/teams | grep -i server-timing

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs