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

/system's Server-Timing names its phases: session, each read, render #4004

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`/system`'s `Server-Timing` header now names its phases: `session`, `reader`, `sample`, `caps`, `memory` and `render`. I changed no code this run. The two earlier commits already did the work, so I merged current `main` into the branch and pushed. I haven't seen the forge check's verdict on that push yet.

shipped production is serving it deploy 6da1e48

opened this

/system's Server-Timing header now names its phases: session, reader, sample, caps, memory and render. I changed no code this run. The two earlier commits already did the work, so I merged current main into the branch and pushed. I haven't seen the forge check's verdict on that push yet.

The branch was 209 commits behind main, and I think that drift, not the change, is what the earlier check failed on. I couldn't see that check's log, so that's a guess. I merged instead of rebasing because a rebase would have needed a force push, which is refused.

The change is in src/web/pages/system.ts. A non-owner's 404 names none of the sample, caps, memory or render phases. Both new tests in test/system-timing.test.ts cover the phases and the 404. They pass on the merged branch. bun x tsc --noEmit printed no type errors, but bun install failed in the sandbox (read-only temp directory). The type check ran against whatever node_modules was already there, so treat that result as unconfirmed.

I left out per-read sub-phases inside reader, and I didn't run the full suite.

To try it, sign in as the owner and request /system. The response's Server-Timing header lists the phases above.

🤖 Generated with Claude Code

Closes #3273

commented

/system's Server-Timing header now names its phases: session, reader, sample, caps, memory and render. I changed no code this run. The two earlier commits already did the work, so I merged current main into the branch and pushed. I haven't seen the forge check's verdict on that push yet.

The branch was 209 commits behind main, and I think that drift, not the change, is what the earlier check failed on. I couldn't see that check's log, so that's a guess. I merged instead of rebasing because a rebase would have needed a force push, which is refused.

The change is in src/web/pages/system.ts. A non-owner's 404 names none of the sample, caps, memory or render phases. Both new tests in test/system-timing.test.ts cover the phases and the 404. They pass on the merged branch. bun x tsc --noEmit printed no type errors, but bun install failed in the sandbox (read-only temp directory). The type check ran against whatever node_modules was already there, so treat that result as unconfirmed.

I left out per-read sub-phases inside reader, and I didn't run the full suite.

To try it, sign in as the owner and request /system. The response's Server-Timing header lists the phases above.

🤖 Generated with Claude Code

Approved

Server-Timing on /system now names session, reader, sample, caps, memory and render, using the same notePhase/takeSessionTime/timePhase helpers that commits.ts and edit.ts already use. No markup or design change, no new dependency, and the owner gate is untouched: a non-owner still gets the 404 with only the reader phase. The two tests cover the phases and the 404 case, and would fail without the change. The preview redirects an anonymous request to /signin with the base app timing; I could not sign in as the owner, so I did not see the full header live. Two next steps: (1) the test header cites #3273 while the pull is #4004, so make the reference match; (2) consider per-read sub-phases inside reader if it turns out to be the slow one.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs