console-perf-1
Console 150 ms budget, plan 1: measure every screen (spec docs/superpowers/specs/2026-10-25-console-ux-perf-design.md Part 2; plan docs/superpowers/plans/2026-10-25-console-perf-1-measure.md). Also carries the round's spec and plans.
What changed
- internal/perf: per-request timing middleware (copied design of Rastrillo's perf, no import): Server-Timing with app/db/s3/box/render spans, 2,048-sample ring, per-route p50/p95, over-budget warnings throttled to once a minute per route and 120 a minute overall (rolling, on warning time), detached outbound calls counted as background.
- Console: middleware wraps the mux in NewServer; render and renderCLI buffer through writeTemplate (a failed template answers a plain 500; a failed write is not a served page); spans at the S3 doer, app host, gate DB reads and registry; Assemble/Versions take the request context; the edge-fold refresh is attributed to the page that waits for it.
- /fleet/metrics gains a Console speed table (Luna-approved copy CPF-1..11).
- CI walk (internal/console/perfwalk_test.go): every HTML screen through the production fixture over internal/s3fake (real S3Store, 25 ms/S3 request, 40 ms/app-host call, transport-level request counts), cold + warm, statuses always checked; today's slow screens recorded as
over:in testdata/perf-budgets.txt (the to-do list for plan 2); scripted session S3 ceiling 1000. Walk ~5 s. - No production behaviour change beyond measurement and buffered rendering; production DirStore untouched.
Tested: targeted runs per task, perf with -race, walk with CI=1, session ceiling, s3fake held to the MinIO contract body, cross-builds. Every task reviewed by Astra; final whole-branch review clean at fbf4b7b4. Census: body units approved by Astra; six new units accepted per Paul's 2026-10-26 ruling (recorded on #280).
Commits
45
Files changed
60
+9,129 −225
Discussions
0
0 open
Tasks
11/12
done
Discussions
- No discussions on this branch yet.
Tasks 11/12 done
- perf-1 Task 1: copy record and Luna pass Done
- perf-1 Task 2: internal/perf ring, groups, throttled log Done
- perf-1 Task 3: internal/perf middleware, Server-Timing, spans Done
- perf-1 Task 4: wire perf into the console handler; buffered render Done
- perf-1 Task 5: spans at the seams (S3, app host, DB, registry) Done
Activity
- task updated: perf-1 Task 11: census, full gate, review, merge
- task updated: perf-1 Task 12: roll and read real numbers (Paul's go-ahead)
- claude agent, operated by paul@keymail.dev pushed 05c4b2ea2 Merge origin/main (plans 6a checkout, rootfs root-image ruling) into console-perf-1
- claude agent, operated by paul@keymail.dev pushed fbf4b7b45 census: console-perf-1 overlays, the six new units as Paul's decision rows, and the record-write entries
- claude agent, operated by paul@keymail.dev pushed d903f87d7 console: the Console speed table's Route cell names the method beside the pattern
- claude agent, operated by paul@keymail.dev pushed 22df54a73 console: the perf walk measures the plan keep page on a seeded lapsed account
- claude agent, operated by paul@keymail.dev pushed f76516616 console: the walk and session tests keep the console's log, leaving out only over-budget warnings
- claude agent, operated by paul@keymail.dev pushed e42436c7f console: the registry's db span and the app-host call count have tests of their own
- claude agent, operated by paul@keymail.dev pushed 9c11f55be perf: detached calls after the request count as background; the log throttle runs in warning time
- claude agent, operated by paul@keymail.dev pushed 2ba518480 console: the perf walk skips main's new plan keep page, dormant without a plan catalogue
- claude agent, operated by paul@keymail.dev pushed c763ebc55 Merge origin/main into console-perf-1
- task updated: perf-1 Task 10: the CI walk, every screen timed and counted
- claude agent, operated by paul@keymail.dev pushed b070ef8c5 console: the walk's log lines share a clock hour, so the session count does not depend on the time of day
- claude agent, operated by paul@keymail.dev pushed 64c0e3bf6 release, s3fake: DirStore back as it was; the fake lists from the fixture directory itself
- claude agent, operated by paul@keymail.dev pushed b06384095 test-weights: the perf walk and session tests at their new times
- claude agent, operated by paul@keymail.dev pushed a6c2cb47b console: the scripted session polls the Logs tab's /logs/data as the page does; ceiling 992 to 1000
- claude agent, operated by paul@keymail.dev pushed f5599d455 release, s3fake: listings walk only the prefix's directory, and the fake hashes only the page it returns
- claude agent, operated by paul@keymail.dev pushed bf02d73c7 console: perf-budgets.txt, the /fleet/metrics record says why the walk sees it warm
- claude agent, operated by paul@keymail.dev pushed 15340599d console: CI walk of every screen with latency injection and remote-call counts; today's slow screens recorded as over
- task updated: perf-1 Task 9: S3 fake with latency and request counting
- claude agent, operated by paul@keymail.dev pushed bcc13f00c tests: capture the over-budget warning from the cold view on
- claude agent, operated by paul@keymail.dev pushed f8ec2f1d5 tests: the latency host prefers cancellation over its delay
- claude agent, operated by paul@keymail.dev pushed 920b099da tests: s3fake applies start-after to common prefixes; exact page counts and bounded held-request cleanup
- claude agent, operated by paul@keymail.dev pushed 523794236 console: the edge-fold refresh a page waits for carries the page's context
- claude agent, operated by paul@keymail.dev pushed 5f49f01b0 tests: an S3 fake that counts at the transport, its contract with the MinIO suite, fixture options and a counting app client
- task updated: perf-1 Task 8: budgets file and screen inventory
- claude agent, operated by paul@keymail.dev pushed 080c17743 console: perf-budgets.txt, # starts a comment anywhere on a line
- claude agent, operated by paul@keymail.dev pushed 51756632f console: perf-budgets.txt grammar and the screen inventory from registerRoute
- task updated: perf-1 Task 7: Console speed table on /fleet/metrics
- claude agent, operated by paul@keymail.dev pushed 143055f49 console: Console speed table on /fleet/metrics