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

The API's run read names its Server-Timing phases: session, run, carried #5178

Parked opened this
Closed without merging

GET /api/v1/repos/:owner/:name/runs/:id now names session, run and carried in its Server-Timing header. The change: in src/http/api.ts, the handler notes session and wraps getRepoRun in run and carriedBy in carried, as the issue read does.

Notes

stopped parked by the crew deploy c9a25cd

opened this

GET /api/v1/repos/:owner/:name/runs/:id now names session, run and carried in its Server-Timing header.

  • The change: in src/http/api.ts, the handler notes session and wraps getRepoRun in run and carriedBy in carried, as the issue read does. The answer body and the 404s are unchanged, and I did not touch the run log handler.
  • The test: test/api-run-timing.test.ts reads a run and asserts the header names all three phases.
  • The earlier failure: the check on closed pull #5170 failed on "anonymous spawn > a signed-in spawn still works (regression)", and I found nothing in this change that touches spawning. test/spawn-anon.test.ts passes here, and so do the new timing test and tsc --noEmit. I take that failure to be unrelated, but I could not reproduce it, so it may come back.
  • This push: I merged current main into the branch, since the earlier commit was already pushed, and reran both tests. The forge's check will run the full suite.

I left out every other API read; each would be its own small change.

To try it, run curl -si -H "authorization: Bearer $TOKEN" $URL/api/v1/repos/<owner>/<name>/runs/<id> | grep -i server-timing.

Closes #5157

2 earlier comments
commented

GET /api/v1/repos/:owner/:name/runs/:id now names session, run and carried in its Server-Timing header.

  • The change: in src/http/api.ts, the handler notes session and wraps getRepoRun in run and carriedBy in carried, as the issue read does. The answer body and the 404s are unchanged, and I did not touch the run log handler.
  • The test: test/api-run-timing.test.ts reads a run and asserts the header names all three phases.
  • The earlier failure: the check on closed pull #5170 failed on "anonymous spawn > a signed-in spawn still works (regression)", and I found nothing in this change that touches spawning. test/spawn-anon.test.ts passes here, and so do the new timing test and tsc --noEmit. I take that failure to be unrelated, but I could not reproduce it, so it may come back.
  • This push: I merged current main into the branch, since the earlier commit was already pushed, and reran both tests. The forge's check will run the full suite.

I left out every other API read; each would be its own small change.

To try it, run curl -si -H "authorization: Bearer $TOKEN" $URL/api/v1/repos/<owner>/<name>/runs/<id> | grep -i server-timing.

commented

The run read now names session, run and carried in Server-Timing, and I've pushed an empty commit to trigger the check again.

I found no code cause for the failing /map test. The check log shows the machine ran out of disk (Out of diskspace writing under /tmp/forge-qrun-…), and the other failing shards fit that. I can't tell from here whether the /map test failed for the same reason.

  • Locally: test/map-cache.test.ts, test/mcp-secrets.test.ts and test/search-budget.test.ts all pass here, as do the new timing test and the spawn test.
  • Untouched: /map and the other failing tests are not touched by this change.
  • The change: only src/http/api.ts and test/api-run-timing.test.ts. The answer body and the 404s are unchanged, and I left the run log handler alone.
  • To try it: curl -si -H "authorization: Bearer $TOKEN" $URL/api/v1/repos/<owner>/<name>/runs/<id> | grep -i server-timing.

If the check fails the same way again, the machine's disk needs clearing before the suite can pass.

commented

Parked by the crew: the check failed ("test/map-cache.test.ts > /map's Server-Timing names its phases > (unnamed)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs