Repository navigation
bench(web-ui): transcript replay harness: acpmux logs at top speed, shift, per-token slope, long tasks, heap, idle - #34382
Conversation
… speed, shift, per-token slope, long tasks, heap, idle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
…s summed, live only for streamed logs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
…kens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
|
Owned by an agent session · session |
|
Found 5 test failures on Blacksmith runners: Failures
|
|
Review (codex, router-review): SHIP at 559bd32 Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 559bd32 Visual verdict: no images; Leo tries the build
Follow-ups:
|
A newer verdict blocks 8dedabb (no independent SHIP at the head).
…e red from #34382) (#34695) * fix(webviews): move replayLogs.test.ts under test/ so the type check covers it #34382 put the test in webviews/bench/, outside tsconfig's include, so test_cmux_next_fast_gates.py's every-test-file-is-type-checked assertion failed and turned cmux-next guards / tooling-tests red on feat-cmux-next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64 * fix(webviews): point the moved replayLogs test's imports at ../bench/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-11-03, asking for fast simulations in place of more compute: "play things back at, like, 30,000 times speed" (point 3 of manaflow-ai/cmuxterm-hq#6740).
What
A replay harness for the agent transcript, as one more bench of the shared web UI perf harness (
webviews/bench/web-ui-suite.ts, the perf cron's advisoryweb-uipart, #31704). It adds no new harness, job, gate orruns-on.bench/replayLogs.ts: acpmux session logs, oneEventRecordper record as_acpmux/attachand_acpmux/eventcarry them. Each log is keyed byseq(1, 2, 3... per session, like acpmux'sSessionEvent), andcheckSeqrefuses a log with a gap, a second session or time running back, so a recorded daemon log or a simulated agent's log lines up record for record. The logs:?mockchat (mockFixture.ts: the worked turn and each session's history);replay/replayFixture.ts);loadFixture.tsturns (reads, large edits, long shell logs), 4,196 records and 2,716 rows, with a streamed turn at six checkpoints. Each streamed turn has 80 reply tokens and a shell call whose output streams in over 30 updates;--log FILE: any recorded log (JSON lines of SessionEvents, or{events: [...]}).bench/transcript-replay.bench.ts: plays each log into the production pane (a vite build of the pane's entry, joined to a stand-in acpmux) as fast as the page can take it. A replay clock makesDateread the time of the newest record played, so elapsed labels read what they read live, and no step waits on wall time. Each log is played in two phases:open.cls,live.clsopen.moved_px(a row in view at first paint that moved; a row that left counts the view height)live.long_tasksduring burstslong.token_ms,long.tool_output_ms(main-thread task time per record)long.*_slope_ms_per_krow(least-squares slope over the checkpoints, so O(rows) per token shows as a slope)long.heap_mb(after GC, compared with the empty pane)long.idle_ms_per_s(after the replay settles)BUDGET MISSline naming the row, the value, the budget and the cause: the elements that shifted (summed by source), or the per-checkpoint costs behind a slope. With--strictit exits 1. The suite runs it without--strict, so in CI it warns through the cron's regression issue and never fails a check.PROFILE=1builds the pane unminified, profiles every burst, and prints the functions whose self time per record grew most between the first and the last checkpoint. These are where the O(rows) work is.transcript-replayhas a 150 s timeout (the run below took about 75 s).thread-rail-jump's timeout drops from 300 s to 150 s, so the timeouts still sum to 29.5 minutes, under perf-cron's 30-minute cap. That bench ran in well under that in perf cron: web UI perf harness on Linux (web-ui part, PERF_ROW lines) #31704's runs.First numbers
Fleet Linux, 8 vCPU, headless Chromium, run 41743692374, via
bun bench/web-ui-suite.ts --only transcript-replay: 90 s, exit 0,failed []:transcript_replay.long.token_mstranscript_replay.long.token_slope_ms_per_krowtranscript_replay.long.tool_output_mstranscript_replay.long.tool_output_slope_ms_per_krowtranscript_replay.live.clstranscript_replay.live.long_taskstranscript_replay.open.clstranscript_replay.open.moved_pxtranscript_replay.long.heap_mbtranscript_replay.long.idle_ms_per_sPer-token cost at each checkpoint: 11 rows 5.70 ms, 545 rows 5.92, 1087 rows 6.58, 1629 rows 6.99, 2171 rows 7.64, 2709 rows 7.24.
Performance
This PR changes no product code. These are the bench's first values on this head, so there is no before.
Found
What the first runs found (filed as follow-ups, with the PRs from
git log -S):PROFILE=1) namewithoutQuietThoughts(a walk of every row per snapshot, from cmux NEXT: a finished thought is one quiet 'Thought for 12s' row #23084), the inbox projection's prefix copyprojectInboxRows/projectAllInboxRows(from fix(agent-pane): flatten inbox deliveries in waiting messages #29829 and Transcript: a turn's inbox notices and received lines are one "Received N messages" row #32720),rowPresence, andlayoutScrollTop. At 2,700 rows a tool output update costs 11-14 ms, over the 10 ms frame budget.cv-worked/cv-shimmer__band), code blocks of earlier answers (cv-codeblock), and the minimap rail. The live CLS of the long log was 0.02 to 0.26 across four runs.mock-home-screenshifted the dock and the header tools by 0.0458 in two of three runs. The third run showed 0, so this is intermittent.Verification
bun test bench/replayLogs.test.ts: 8 pass (seq keys of every log, a gap named, burst ranges, recorded log parsing, rows, slope, judging and the miss message).bun run checkon the fleet: no type or lint errors. Its one red,check:design-tokensonsubagents/subagents.css, is a file this PR does not touch.vp fmt --check bench/: clean.bun bench/web-ui-suite.ts --only transcript-replay: the bench's rows were collected and the bench was not listed as failed (fast-checks runs 41741180064, 41742499741 and 41743692374).Observed / Not run
web-ui.Changelog
none
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds a transcript replay benchmark to the web UI perf suite that plays recorded and generated acpmux session logs into the production transcript pane as fast as the page can take them, measuring layout shift, main-thread cost per streamed token and tool output update as the transcript grows, long tasks, heap, and idle CPU. A replay clock makes
Dateread the time of the newest record, so a session hours long replays in seconds. The suite adds a 150 s timeout fortranscript-replayand dropsthread-rail-jump's from 300 s to 150 s. No product code changes; this is the bench's first run on this head, so there are no before values.First numbers
Fleet Linux: token cost 6.58 ms p50 growing 0.70 ms per 1000 rows, tool output update 9.07 ms growing 0.64 ms per 1000 rows, live CLS 0.0003 p50, heap +39.5 MB, idle 0.75 ms/s — budgets are 0.1 for slope, 10 ms per record, 0.01 CLS, 64 MB heap, 1 ms/s idle.
Found
withoutQuietThoughts, the inbox projection's prefix copy,rowPresence, andlayoutScrollTop.mock-home-screenintermittently shifts the dock and header tools by 0.0458.Budgets
BUDGET MISSline naming the row, value, budget, and cause, and--strictexits 1. The suite runs without--strict, so CI warns through the perf cron's regression issue.PROFILE=1builds the pane unminified and diffs profiles across checkpoints;--log FILEreplays any recorded daemon log (JSON lines or{events: [...]}).Written for commit 8dedabb. Summary will update on new commits.