Skip to content

test(web): H3 terminal replay budget spec + live acceptance (WI-124) - #675

Closed
thedancingdeveloper wants to merge 1 commit into
feat/terminal-attach-f4-dormant-panesfrom
feat/terminal-attach-h3-budget-spec
Closed

test(web): H3 terminal replay budget spec + live acceptance (WI-124)#675
thedancingdeveloper wants to merge 1 commit into
feat/terminal-attach-f4-dormant-panesfrom
feat/terminal-attach-h3-budget-spec

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

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 new routeWebSocket harness (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-pane vogt-terminal-replay.snapshot performance measure exists and is under the CI budget (2500 ms), and that the [vogt] terminal replay telemetry 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_URL only) — drives a real load session via POST /api/sessions and asserts the two operator symptoms directly:

  • Symptom 1 — switch away past the ring and back: replay ≤ budget, no reset, no [disconnected] (F1 / F4 / F2).
  • Symptom 2 — reload with the session cached: 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; I updated the live-step comment in e2e.yml to 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-error there) — 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

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
@thedancingdeveloper

Copy link
Copy Markdown
Contributor Author

Cleanup: superseded by the single promotion PR #676. All of this work is already integrated into feat/terminal-attach-budget and is reviewable there per-commit (each commit is one initiative item with a full message). Closing to keep the initiative to one PR; the commit is preserved.

@thedancingdeveloper
thedancingdeveloper deleted the feat/terminal-attach-h3-budget-spec branch September 9, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant