test(web): H3 terminal replay budget spec + live acceptance (WI-124) - #675
Closed
thedancingdeveloper wants to merge 1 commit into
Closed
Conversation
Add web/tests/browser/terminalReplay.spec.ts, the acceptance harness the terminal-attach-budget fixes are measured against (WI-124). Mocked project (desktop/phone, Vite dev server) — a new routeWebSocket harness streams a 1 MiB corpus (built from the H2 transcript) into a REAL terminal as a cold snapshot, then asserts the per-pane `vogt-terminal-replay.snapshot` performance measure exists and is under the CI budget (2500 ms), and that the `[vogt] terminal replay` telemetry the live spec reads was logged. This is the first WebSocket-mocked terminal test in the suite; it is stable and box- independent (the measure's existence proves the bounded snapshot rendered; the budget has generous headroom over the ~5-6 MB/s parse rate). Live project (PLAYWRIGHT_LIVE_BASE_URL only) — drives a real load session via POST /api/sessions and asserts the two operator symptoms directly: switching away past the ring and back replays <= budget with no reset and no `[disconnected]` (F1/F4/F2), and a reload keeps the active pane under budget (F3/F5). Gated to the `live` project, so mocked runs skip it. e2e wiring: the playwright container already runs `playwright test --project=live` over the whole testDir, so this spec is picked up automatically; the live-step comment is updated to name it. Not added to demo gating. Verified: the mocked test passes and is stable across repeated runs; the live tests skip in the mocked projects. The live half runs against a real stack in e2e.yml (advisory/continue-on-error there) — an agent session cannot reach one, so its green/red-before-F1 confirmation is owed to a stack run. WI-124. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UtEFLJAhLiq4NfZCN2vuBb
2 tasks
Contributor
Author
|
Cleanup: superseded by the single promotion PR #676. All of this work is already integrated into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ninth PR of the terminal-attach-budget initiative (WI-121). Stacked on #674 (F4); all land on
feat/terminal-attach-budget.What this adds (H3 / WI-124)
web/tests/browser/terminalReplay.spec.ts— the acceptance harness the whole initiative is measured against.Mocked project (
desktop/phone, Vite dev server) — a newrouteWebSocketharness (the first WebSocket-mocked terminal test in the suite) streams a 1 MiB corpus (built from the H2 transcript) into a real terminal as a cold snapshot, then asserts the per-panevogt-terminal-replay.snapshotperformance measure exists and is under the CI budget (2500 ms), and that the[vogt] terminal replaytelemetry was logged. Box-independent: the measure's existence proves the bounded snapshot rendered; the budget has generous headroom over the ~5–6 MB/s parse rate. Verified locally — passes, stable across repeated runs.Live project (
PLAYWRIGHT_LIVE_BASE_URLonly) — drives a real load session viaPOST /api/sessionsand asserts the two operator symptoms directly:reset, no[disconnected](F1 / F4 / F2).Gated to the
liveproject, so mocked runs skip it.e2e wiring
The playwright container already runs
playwright test --project=liveover the wholetestDir, so this spec is picked up automatically; I updated the live-step comment ine2e.ymlto name it. Not added to demo gating (per the plan).The gap
The mocked half is verified here. The live half runs against a real stack in
e2e.yml(advisory /continue-on-errorthere) — an agent session cannot reach a stack, so its green-on-branch / red-before-F1 confirmation is owed to a stack run. This is also where F4's switch-away-under-load acceptance lands.🤖 Generated with Claude Code
https://claude.ai/code/session_01UtEFLJAhLiq4NfZCN2vuBb