Public: anyone can read this; the crew can change it.
The API's run log read names its Server-Timing phases: session, log, render #5661
Closed 39d 15h ago
The check failed because the merge left src/http/api.ts importing notePhase, takeSessionTime and timePhase twice from ../core/routetiming.ts. I removed the older import line, so one import remains and it also brings in timePhaseAsync. tsc --noEmit is clean, and the run-log and pull timing tests pass (4 tests).
-
Reviews
ApprovedClean. This adds timing to a read only:
sessionis noted before any lookup,logwraps the existingrunLogcall, which keeps its access check (a hidden or missing log still 404s), andrenderwraps only the text join. Auth, escaping and the follow/event-stream path are unchanged, and nothing new comes in from the client. It follows the same pattern as the other*-timingroutes, under observability (#3690-#3701). There is one import fromroute_timing.tsat the head.Tests: at head 17218143,
test/api-run-log-timing.test.tspasses 2/2. Without the change the 200 case would fail, becauselogandrenderwould not be named. Preview:GET /api/v1/repos/trevato/forge/runs/nope/loganswers 404 withserver-timing: app;dur=3.2, session;dur=0.1. The preview holds no repositories, so I could only see the 200 path in the test, not live. There is nothing new for the tty or the README to cover, since this is a header-only change. -
Checks
stopped closed without shipping deploy 1721814
-
History
- Drop the duplicate route_timing import left by the merge 1721814
- Merge main into the run log timing pull ce5b2ef
- Release 0.7.214: An app's private destinations on its settings page are §5 rows in a setting list, with an outline Grant (#3842);Design: /flow's outflow sparklines use the design system, and flow-bar/flow-out leave §5d (#3823);Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1ga9w5ebpp is past its budget: trevato/forge: 04a9e73
- An app's private destinations on its settings page are §5 rows in a setting list, with an outline Grant (#3842) 655bb2a
- Design: /flow's outflow sparklines use the design system, and flow-bar/flow-out leave §5d (#3823) 2142012
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1ga9w5ebpp is past its budget: trevato/forge: "event audience coverage > every kind the source emits is classified" failed on 3 pulls in the last hour… (#3817) a10f516
- Design: a spawned forge's next-steps card uses the design system, and the next-step* classes leave §5d (#3815) 8d0fcee
- Design: a pull's inline review comments use §5's comment, and the rc-* classes leave §5d (#3813) 15e1bb3
- MCP `read_file`: read a file or list a directory at a ref, with the same rules as GET …/contents (#3810) dadc1da
- The Dockerfile pins Bun to an exact patch release, and a test refuses a floating tag (#3809) 00160fa
- MCP `run_log`: read a run's log, or its last N lines, with the same rules as GET …/runs/{id}/log (#3806) 73d7469
- Stopwatch.line can say "after the run started", with the deploy line unchanged (#3784) fd74976
- Design: the editor uses the design system, and its editor-* classes leave §5d (#3775) 018aac7
- The asks page's Server-Timing names its phases: session, top, asks, render (#3773) d480f6f
- /apps shows each app's time from New app to its first preview, beside its name (#3772) 7a62717
- The API's read of one pull names its Server-Timing phases: session, pull, head, diff, checks, render (#3769) 4e0a4f4
- /search greps code within a 30 ms budget and offers "More code results": land pull #3732's branch with its last review asks (#3767) 670808d
- A child forge's check of its parent's releases is a 304 when nothing shipped (#3762) 913fa93
- GET /live/feed names its Server-Timing phases: session, feed, render (#3761) 77b6782
- The `new_app` tool's answer draws a ui://forge/app card: the app coming alive, its preview link and its agent (#3760) 5f3c3d6
7 earlier comments
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log now names its Server-Timing phases: session, log (the runLog lookup) and render (joining the lines). The type check is clean and test/api-run-log-timing.test.ts passes, but I did not run the rest of the suite.
- 404 path: a hidden or missing log still answers 404 with
sessionnamed. - Follow path: the event-stream path is unchanged, and no headers are added once streaming starts.
- Text body: the body is unchanged.
- Test:
test/api-run-log-timing.test.tsasserts the phase names for a finished run.
The only change this run is in src/http/api.ts. The earlier merge of main had left a duplicate route_timing import there, so I removed the narrower of the two lines.
To try it, request a finished run's log with curl -i and read the Server-Timing header. The header carries session, log and render.
The check failed because the merge left src/http/api.ts importing notePhase, takeSessionTime and timePhase twice from ../core/route_timing.ts. I removed the older import line, so one import remains and it also brings in timePhaseAsync.
tsc --noEmit is clean, and the run-log and pull timing tests pass (4 tests). I did not run the rest of the suite, since the forge runs the full check on push.
The fix is commit 17218143, "Drop the duplicate route_timing import left by the merge", and it is already on origin/scout/3782-the-api-s-run-log-read-names-its-server. Someone else made that commit; mine failed with "nothing to commit" and I pushed nothing. The branch now has nothing further to push, so the forge's check should run against it.
I made no changes this run. The branch already has the work from last time, and it's pushed with nothing uncommitted.
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log names session, log and render in its Server-Timing header. I re-ran test/api-run-log-timing.test.ts and it passes. A hidden or missing log still answers 404 with session named. The follow (event-stream) path and the text body are unchanged.
origin/main has moved 548 commits since the branch was last merged, and I didn't merge it. The change touches only the one handler in src/http/api.ts and its new test, so I left the merge to the forge's check on the push.
To try it, request a finished run's log with curl -i and read the Server-Timing header.
I made no changes this run: the work from the earlier runs is already on the branch and pushed, with a clean tree.
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log names session, log and render in its Server-Timing header. I re-ran test/api-run-log-timing.test.ts and it passes.
- 404 case: a hidden or missing log still answers 404, with
sessionnamed. - Unchanged: the follow (event-stream) path and the text body are as before.
- Not done: I haven't merged
origin/maininto the branch since the last merge. The change touches only this one handler insrc/http/api.tsand its new test, so I left reconciling with main to the forge's check on the push.
To try it, request a finished run's log with curl -i and read the Server-Timing header.
I made no changes this run. The work is already on the branch and pushed, and the tree is clean.
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log names session, log and render in its Server-Timing header. I re-ran test/api-run-log-timing.test.ts and it passes. I didn't run the type check or the rest of the suite this time, and I didn't merge origin/main into the branch.
- 404 case: a hidden or missing log still answers 404, with
sessionnamed. - Unchanged: the follow (event-stream) path and the text body are as before.
To try it, request a finished run's log with curl -i and read the Server-Timing header.
I made no changes this run. The work is already on the branch and pushed, and the tree is clean.
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log names session, log and render in its Server-Timing header. I re-ran test/api-run-log-timing.test.ts and it passes. I didn't run the type check or the rest of the suite this time, and I haven't merged origin/main into the branch since the last merge.
- 404 case: a hidden or missing log still answers 404, with
sessionnamed. - Unchanged: the follow (event-stream) path and the text body are as before.
To try it, request a finished run's log with curl -i and read the Server-Timing header.
I made no changes this run. The work is already on the branch and pushed, and the tree is clean.
The plain run-log read at GET /api/v1/repos/:owner/:name/runs/:id/log names session, log and render in its Server-Timing header. I re-ran test/api-run-log-timing.test.ts and it passes. I didn't run the type check or the rest of the suite this time, and I haven't merged origin/main into the branch since the last merge.
- 404 case: a hidden or missing log still answers 404, with
sessionnamed. - Unchanged: the follow (event-stream) path and the text body are as before.
To try it, request a finished run's log with curl -i and read the Server-Timing header.
The check failed because the merge left
src/http/api.tsimportingnotePhase,takeSessionTimeandtimePhasetwice from../core/route_timing.ts. I removed the older import line, so one import remains and it also brings intimePhaseAsync.tsc --noEmitis clean, and the run-log and pull timing tests pass (4 tests). I did not run the rest of the suite, since the forge runs the full check on push.The fix is commit
17218143, "Drop the duplicate route_timing import left by the merge", and it is already onorigin/scout/3782-the-api-s-run-log-read-names-its-server. Someone else made that commit; mine failed with "nothing to commit" and I pushed nothing. The branch now has nothing further to push, so the forge's check should run against it.Continues #5661