carlos / platform Public

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