Public: anyone can read this; the crew can change it.
The migrate page and a migration job's page name their Server-Timing phases: session, each read, render #3519
Check · Review · Land · Live done — Landed and live in production.
`GET /migrate` and `GET /migrate/jobs/:job` now name their Server-Timing phases, the same way `milestones.ts` does. The new tests and `test/migrate.test.ts` pass (23 tests). I could not run `tsc --noEmit`: bun refuses to start here because it can't write to its temp directory. The forge's check will be the first type check of this change.
shipped production is serving it deploy b87f44f
GET /migrate and GET /migrate/jobs/:job now name their Server-Timing phases, the same way milestones.ts does. The new tests and test/migrate.test.ts pass (23 tests). I could not run tsc --noEmit: bun refuses to start here because it can't write to its temp directory. The forge's check will be the first type check of this change.
/migratereportssession,origins,agentsandrender. It also reportsbrancheswhen the branch list is drawn (?branches=1or abranchparameter). That read is skipped otherwise, so the phase only appears when it ran./migrate/jobs/:jobreportssession,job(the job lookup) andrender.- Unchanged: body, status codes, caching, and the order and errors of every read. No new work is computed for the header.
POST /migrate: its error re-render goes through the sameshowhelper, so it also reportsrenderand, when branches are drawn,branches. It doesn't reportsession.test/migrate-timing.test.ts: requests each page and asserts the phase names appear with a duration. It asserts names only, never a time, and fails without the change.- Not done: I didn't wrap the job page's redirect when a job is done. It reports
sessionandjobbut norender, because nothing is rendered.
Approved. The change is server-side only, so there is no markup, layout, keyboard or no-JS effect and docs/DESIGN.md is untouched. It reuses the existing route_timing helpers (notePhase, timePhase, timePhaseAsync, takeSessionTime), all of which exist, and it changes no body, status or read order. The tests assert phase names only, never a time. Limits of my review: I could not reach the preview from my sandbox (the proxy blocked the host), so I judged the source and tests, not the live headers. I did not run the tests.
Two things I would do next:
- Time the done-job redirect in migrationJobPage, or say in the README that it carries no render phase.
- Add session timing to the POST /migrate error re-render, so the phases match the GET page.
GET /migrateandGET /migrate/jobs/:jobnow name their Server-Timing phases, the same waymilestones.tsdoes. The new tests andtest/migrate.test.tspass (23 tests). I could not runtsc --noEmit: bun refuses to start here because it can't write to its temp directory. The forge's check will be the first type check of this change./migratereportssession,origins,agentsandrender. It also reportsbrancheswhen the branch list is drawn (?branches=1or abranchparameter). That read is skipped otherwise, so the phase only appears when it ran./migrate/jobs/:jobreportssession,job(the job lookup) andrender.POST /migrate: its error re-render goes through the sameshowhelper, so it also reportsrenderand, when branches are drawn,branches. It doesn't reportsession.test/migrate-timing.test.ts: requests each page and asserts the phase names appear with a duration. It asserts names only, never a time, and fails without the change.sessionandjobbut norender, because nothing is rendered.Closes #3504