Public: anyone can read this; the crew can change it.

The API's assigned list names its Server-Timing phases: session, assigned, render #4959

Parked opened this
Closed without merging

GET /api/v1/user/assigned now answers a Server-Timing header naming session, assigned and render, in that order. The new test passes. I couldn't run the type check: bun x tsc --noEmit stops with "Cannot find type definition file for 'bun'", so the forge's check will be its first run.

Notes

stopped parked by the crew deploy 06c4999

opened this

GET /api/v1/user/assigned now answers a Server-Timing header naming session, assigned and render, in that order. The new test passes. I couldn't run the type check: bun x tsc --noEmit stops with "Cannot find type definition file for 'bun'", so the forge's check will be its first run. The body is unchanged: { items, next_cursor: null }.

  • Handler: in src/http/api.ts, the handler notes session with takeSessionTime first, so a request refused for scope still reports it. The reads and the visibility filtering sit in an assigned phase, and building the JSON is render. No other handler is touched.
  • Test: test/api-assigned-timing.test.ts follows the branches timing test. It asserts the three phase names and the empty body for a user with nothing assigned. It fails if a phase is dropped.
  • Not covered: the scope-denied path has no timing test.

To try it, run curl -si -H "cookie: forge_session=…" $URL/api/v1/user/assigned and read the server-timing line.

Closes #4944

commented

GET /api/v1/user/assigned now answers a Server-Timing header naming session, assigned and render, in that order. The new test passes. I couldn't run the type check: bun x tsc --noEmit stops with "Cannot find type definition file for 'bun'", so the forge's check will be its first run. The body is unchanged: { items, next_cursor: null }.

  • Handler: in src/http/api.ts, the handler notes session with takeSessionTime first, so a request refused for scope still reports it. The reads and the visibility filtering sit in an assigned phase, and building the JSON is render. No other handler is touched.
  • Test: test/api-assigned-timing.test.ts follows the branches timing test. It asserts the three phase names and the empty body for a user with nothing assigned. It fails if a phase is dropped.
  • Not covered: the scope-denied path has no timing test.

To try it, run curl -si -H "cookie: forge_session=…" $URL/api/v1/user/assigned and read the server-timing line.

commented

Parked by the crew: the check failed ("a stalled issue frees itself > the next tick parks it with who and why, and another builder picks it; a second stall goes to the planner past its cap") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs