NS10: Browser-terminal E2E matrix that catches terminal regressions #65

Closed
opened 2026-06-21 14:45:27 +00:00 by tmk241 · 1 comment
Owner

OUTCOME: mim has a deterministic browser-terminal end-to-end test suite strong enough to catch regressions in terminal rendering, raw input, cursor movement, mode switches, panels, colors/chrome, CRLF/newline behavior, and the expected KEYMAP.md editor workflow before they reach manual dogfood.

WHY NOW: Recent raw terminal failures (Esc echoing as ^[, LF-only diagonal skew, missing chrome/cursor/gutter) were not caught by unit/headless smoke tests. The user explicitly wants an e2e suite with matrix coverage so these classes of bugs are detected automatically. NS8 and NS9 need this proof layer, but neither parent should own the harness itself.

AUTHORITY: PRODUCT.md mobile-first terminal editor boundary; AGENTS.md verification rules; REQUIREMENTS.md testing/001 through testing/004 plus input/ui/session rows; KEYMAP.md operation grammar; recent fixes f88f688 raw CRLF, 629605b raw mode/chrome, and 8c4d09f visible terminal debug helpers.

REQUIREMENT IMPACT: protects existing requirement authority in REQUIREMENTS.md for testing/001-004, input, ui, and session obligations; child slices should cite or update requirement authority when they add durable verification obligations rather than treating tracker text as the only contract.

SLICES:

  • #69 NS10 slice: Build PTY-backed browser terminal harness
  • #70 NS10 slice: Add terminal control-byte snapshots and golden policy
  • #66 NS10 slice: Define and run the terminal E2E matrix
  • #71 NS10 slice: Cover raw input, cursor movement, and mode switches in E2E
  • #67 NS10 slice: Cover editor workflows and panels in browser-terminal E2E
  • #68 NS10 slice: Cover colors, chrome, and viewport regressions in E2E
  • #72 NS10 slice: Gate terminal E2E in the developer verification path
  • #73 NS10 slice: Add keystroke-budget evidence to terminal E2E
  • #74 NS10 slice: Prove a multi-file coding loop under keystroke budget
  • #75 NS10 slice: Prove LSP-assisted coding workflows in terminal E2E

READY ORDER: Start with #69. #70, #66, #71, #67, #68, and #72 intentionally depend on the harness seam and should be marked ready as their blockers clear.

MEMBERSHIP MECHANISM: Gitea fallback via this parent checklist plus explicit parent link in each child issue body.

AGENT AUTHORITY DEFAULTS:

  • Delivery authority: local-commit
  • Tracker authority: child issues may be commented and closed when acceptance passes; this parent may be commented and updated to maintain child checklist.
  • Handoff state: committed clean, tracker commented/closed for completed child slices.

BLOCKERS: none for slicing. Tool choice is intentionally open but must satisfy the proof: browser-rendered terminal output, not only string/unit snapshots.

PROOF: A fresh checkout can run one documented command (for example zig build terminal-e2e) that launches mim through a pseudo-terminal into a browser-rendered terminal, drives representative input, captures screenshots/snapshots, and fails on visible regressions including diagonal line skew, missing CRLF, lost cursor, missing line-number gutter, broken Esc/Space leader, broken mode transitions, broken arrows/Home/End/Page keys, panel focus errors, malformed ANSI/color degradation, and key KEYMAP workflows. Failures expose visible LF/CR/ESC debug characters and enough screenshot/context evidence to diagnose the problem.

EVIDENCE ARTIFACTS: browser-terminal screenshots, semantic terminal transcripts with visible control characters, scenario matrix logs, failure artifact paths, and command receipts. Unit/headless output alone is not enough for this Northstar.

REGRESSION LEDGER: Esc echoed as ^[; typed spaces lost or corrupting insert text; LF-only raw output causing diagonal skew; missing cursor/gutter/status chrome; broken Space leader or Space-n mobile escape; broken attached-key aliases; stale panel focus/stack; missing color/ANSI degradation; overwide narrow-viewport lines; artifact generation dirtying the tree.

MATRIX EXPECTATION: Cover viewport widths/heights, empty/existing/new files, insert/normal/select/panel modes, attached-keyboard aliases and mobile-safe Space paths, CRLF/LF/ESC/control-byte cases, truecolor/256/16/mono or equivalent color capability modes, and representative workflows for edit/save/quit/search/diagnostics/jobs/format/code actions. Prefer a small orthogonal matrix with high signal over combinatorial noise.

TEST STANDARD: Child slices must include deterministic local verification. Screenshot/golden tests should be stable: normalize volatile text, expose visible control-byte diffs, and keep fixtures minimal. Unit/headless tests remain useful but do not satisfy this parent unless paired with browser-terminal evidence.

NON-GOALS: No native iOS automation, no external cloud browser service, no runtime plugin/config/theme system, no huge screenshot cemetery, no brittle pixel-only tests without semantic/debug output, no replacing DOGFOOD.md real-device proof where a tracker slice explicitly requires real iPhone evidence.

GOAL: Implement this Northstar by completing linked child slices. Close this parent only when every child is closed and the PROOF above is demonstrated.

PARENT_CONTRACT:
outcome: Build a browser-terminal E2E matrix suite that catches terminal rendering/input regressions and proves KEYMAP behavior visually.
authority: PRODUCT.md, REQUIREMENTS.md testing/input/ui/session rows, KEYMAP.md, NS8/NS9 regression history.
proof: one local command runs PTY + browser terminal tests with screenshots/snapshots and fails on CRLF, cursor/chrome, input/mode, panel, and representative workflow regressions.
evidence_artifacts: screenshots, semantic transcripts with visible control bytes, scenario logs, artifact paths, and command receipts.
regression_ledger: Esc echo, broken spaces, LF skew, missing chrome, broken leader/mode keys, panel focus, color/viewport regressions, and dirty artifact output.
requirement_impact: protects existing REQUIREMENTS.md testing/input/ui/session anchors; update authority if terminal-e2e becomes a new durable verification obligation.
non_goals: no cloud service, no native iOS automation, no runtime config/plugin system, no brittle pixel-only screenshot pile.

OUTCOME: `mim` has a deterministic browser-terminal end-to-end test suite strong enough to catch regressions in terminal rendering, raw input, cursor movement, mode switches, panels, colors/chrome, CRLF/newline behavior, and the expected KEYMAP.md editor workflow before they reach manual dogfood. WHY NOW: Recent raw terminal failures (Esc echoing as `^[`, LF-only diagonal skew, missing chrome/cursor/gutter) were not caught by unit/headless smoke tests. The user explicitly wants an e2e suite with matrix coverage so these classes of bugs are detected automatically. NS8 and NS9 need this proof layer, but neither parent should own the harness itself. AUTHORITY: PRODUCT.md mobile-first terminal editor boundary; AGENTS.md verification rules; REQUIREMENTS.md testing/001 through testing/004 plus input/ui/session rows; KEYMAP.md operation grammar; recent fixes `f88f688` raw CRLF, `629605b` raw mode/chrome, and `8c4d09f` visible terminal debug helpers. REQUIREMENT IMPACT: protects existing requirement authority in REQUIREMENTS.md for testing/001-004, input, ui, and session obligations; child slices should cite or update requirement authority when they add durable verification obligations rather than treating tracker text as the only contract. SLICES: - [x] #69 NS10 slice: Build PTY-backed browser terminal harness - [x] #70 NS10 slice: Add terminal control-byte snapshots and golden policy - [x] #66 NS10 slice: Define and run the terminal E2E matrix - [x] #71 NS10 slice: Cover raw input, cursor movement, and mode switches in E2E - [x] #67 NS10 slice: Cover editor workflows and panels in browser-terminal E2E - [x] #68 NS10 slice: Cover colors, chrome, and viewport regressions in E2E - [x] #72 NS10 slice: Gate terminal E2E in the developer verification path - [x] #73 NS10 slice: Add keystroke-budget evidence to terminal E2E - [x] #74 NS10 slice: Prove a multi-file coding loop under keystroke budget - [x] #75 NS10 slice: Prove LSP-assisted coding workflows in terminal E2E READY ORDER: Start with #69. #70, #66, #71, #67, #68, and #72 intentionally depend on the harness seam and should be marked ready as their blockers clear. MEMBERSHIP MECHANISM: Gitea fallback via this parent checklist plus explicit parent link in each child issue body. AGENT AUTHORITY DEFAULTS: - Delivery authority: local-commit - Tracker authority: child issues may be commented and closed when acceptance passes; this parent may be commented and updated to maintain child checklist. - Handoff state: committed clean, tracker commented/closed for completed child slices. BLOCKERS: none for slicing. Tool choice is intentionally open but must satisfy the proof: browser-rendered terminal output, not only string/unit snapshots. PROOF: A fresh checkout can run one documented command (for example `zig build terminal-e2e`) that launches `mim` through a pseudo-terminal into a browser-rendered terminal, drives representative input, captures screenshots/snapshots, and fails on visible regressions including diagonal line skew, missing CRLF, lost cursor, missing line-number gutter, broken Esc/Space leader, broken mode transitions, broken arrows/Home/End/Page keys, panel focus errors, malformed ANSI/color degradation, and key KEYMAP workflows. Failures expose visible LF/CR/ESC debug characters and enough screenshot/context evidence to diagnose the problem. EVIDENCE ARTIFACTS: browser-terminal screenshots, semantic terminal transcripts with visible control characters, scenario matrix logs, failure artifact paths, and command receipts. Unit/headless output alone is not enough for this Northstar. REGRESSION LEDGER: Esc echoed as `^[`; typed spaces lost or corrupting insert text; LF-only raw output causing diagonal skew; missing cursor/gutter/status chrome; broken Space leader or Space-n mobile escape; broken attached-key aliases; stale panel focus/stack; missing color/ANSI degradation; overwide narrow-viewport lines; artifact generation dirtying the tree. MATRIX EXPECTATION: Cover viewport widths/heights, empty/existing/new files, insert/normal/select/panel modes, attached-keyboard aliases and mobile-safe Space paths, CRLF/LF/ESC/control-byte cases, truecolor/256/16/mono or equivalent color capability modes, and representative workflows for edit/save/quit/search/diagnostics/jobs/format/code actions. Prefer a small orthogonal matrix with high signal over combinatorial noise. TEST STANDARD: Child slices must include deterministic local verification. Screenshot/golden tests should be stable: normalize volatile text, expose visible control-byte diffs, and keep fixtures minimal. Unit/headless tests remain useful but do not satisfy this parent unless paired with browser-terminal evidence. NON-GOALS: No native iOS automation, no external cloud browser service, no runtime plugin/config/theme system, no huge screenshot cemetery, no brittle pixel-only tests without semantic/debug output, no replacing DOGFOOD.md real-device proof where a tracker slice explicitly requires real iPhone evidence. GOAL: Implement this Northstar by completing linked child slices. Close this parent only when every child is closed and the PROOF above is demonstrated. PARENT_CONTRACT: outcome: Build a browser-terminal E2E matrix suite that catches terminal rendering/input regressions and proves KEYMAP behavior visually. authority: PRODUCT.md, REQUIREMENTS.md testing/input/ui/session rows, KEYMAP.md, NS8/NS9 regression history. proof: one local command runs PTY + browser terminal tests with screenshots/snapshots and fails on CRLF, cursor/chrome, input/mode, panel, and representative workflow regressions. evidence_artifacts: screenshots, semantic transcripts with visible control bytes, scenario logs, artifact paths, and command receipts. regression_ledger: Esc echo, broken spaces, LF skew, missing chrome, broken leader/mode keys, panel focus, color/viewport regressions, and dirty artifact output. requirement_impact: protects existing REQUIREMENTS.md testing/input/ui/session anchors; update authority if terminal-e2e becomes a new durable verification obligation. non_goals: no cloud service, no native iOS automation, no runtime config/plugin system, no brittle pixel-only screenshot pile.
tmk241 added the northstargoal labels 2026-06-21 14:45:27 +00:00
Author
Owner

NS10 closing receipt.

Tracker state:

  • All parent checklist children are closed: #69, #70, #66, #71, #67, #68, #72, #73, #74, #75.
  • #71 was updated and closed with the current product/keymap rule: Insert-mode Space remains literal; Esc is the durable mobile/attached SSH Insert→Normal path.

Clean-tree proof at 2277ed281d2f:

  • git status --short --untracked-files=all before/after terminal E2E emitted no source-tree dirt.
  • zig build terminal-e2e — 21 browser-terminal scenarios passed, with artifacts under .zig-cache/terminal-e2e/*:
    • raw-key/chrome/CRLF;
    • iOS/mobile and attached-key mode paths;
    • Esc, Space leader, dirty discard, arrows/Home/End/Page, counts, %, cursor movement, horizontal scroll, ragged vertical preferred-column motion;
    • select mode, directory/panel focus, multi-file loop, LSP-assisted workflow, project search, job cancel/output;
    • screenshots/SVG, semantic transcripts, visible-control artifacts, and scenario manifests.
  • zig build
  • zig build test
  • zig build v1-smoke
  • zig build run -- --help
  • zig build --prefix /tmp/mim-install verify-install-code
  • redgate list /opt/repositories/mim/REQUIREMENTS.md && redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md

Final audit:

  • Critic pass found no blocker and recommended closing #65.

Outcome: NS10 browser-terminal E2E matrix is complete and now catches the terminal rendering, raw input, mode, panel, color/chrome, CRLF/newline, and KEYMAP workflow regressions requested before manual dogfood.

NS10 closing receipt. Tracker state: - All parent checklist children are closed: #69, #70, #66, #71, #67, #68, #72, #73, #74, #75. - #71 was updated and closed with the current product/keymap rule: Insert-mode Space remains literal; Esc is the durable mobile/attached SSH Insert→Normal path. Clean-tree proof at `2277ed281d2f`: - `git status --short --untracked-files=all` before/after terminal E2E emitted no source-tree dirt. - `zig build terminal-e2e` ✅ — 21 browser-terminal scenarios passed, with artifacts under `.zig-cache/terminal-e2e/*`: - raw-key/chrome/CRLF; - iOS/mobile and attached-key mode paths; - Esc, Space leader, dirty discard, arrows/Home/End/Page, counts, `%`, cursor movement, horizontal scroll, ragged vertical preferred-column motion; - select mode, directory/panel focus, multi-file loop, LSP-assisted workflow, project search, job cancel/output; - screenshots/SVG, semantic transcripts, visible-control artifacts, and scenario manifests. - `zig build` ✅ - `zig build test` ✅ - `zig build v1-smoke` ✅ - `zig build run -- --help` ✅ - `zig build --prefix /tmp/mim-install verify-install-code` ✅ - `redgate list /opt/repositories/mim/REQUIREMENTS.md && redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md` ✅ Final audit: - Critic pass found no blocker and recommended closing #65. Outcome: NS10 browser-terminal E2E matrix is complete and now catches the terminal rendering, raw input, mode, panel, color/chrome, CRLF/newline, and KEYMAP workflow regressions requested before manual dogfood.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#65