NS10 slice: Add keystroke-budget evidence to terminal E2E #73

Closed
opened 2026-06-21 16:36:08 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Extend the terminal E2E harness so every workflow scenario records how many user key events/bytes were required, publishes a keystroke receipt, and can fail when a protected workflow exceeds its declared budget.

AUTHORITY: Parent #65 (NS10), PRODUCT.md mobile-first terminal editor boundary, REQUIREMENTS.md testing/001-004 and input rows, KEYMAP.md operation grammar, tools/terminal_e2e.py and tools/TERMINAL_E2E.md.

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes
  • Handoff state: committed clean, tracker commented/closed

PARENT: #65 via parent checklist membership plus this explicit parent reference.

SCOPE: tools/terminal_e2e.py scenario model/runner/artifacts, tools/TERMINAL_E2E.md, and only minimal docs/tests needed to make keystroke budgets durable.

BOUNDARIES: Do not invent productivity claims or optimize keymaps in this slice; count and gate existing E2E workflows. Do not add external telemetry, runtime config, plugin hooks, or cloud services. Do not use wall-clock speed as a proxy for typing efficiency.

ACCEPTANCE:

  • Each terminal E2E scenario emits a stable artifact (for example keys.tsv/keystrokes.tsv plus manifest rows) showing logical user input steps, raw bytes sent, and total count.
  • Scenario definitions can declare a max keystroke/key-event budget; the runner fails with a useful message and artifact path when the budget is exceeded.
  • At least one existing mobile-default scenario and one attached-keyboard scenario are budgeted, proving the mechanism is enforced.
  • Documentation explains what is counted, what is not counted, and why counts are regression evidence rather than benchmark data.
  • zig build terminal-e2e remains deterministic and leaves the git tree clean except ignored artifacts.

REGRESSION CLASS: KEYMAP/workflow changes that silently increase thumb-key or attached-key burden, hide required symbol-layer detours, or replace direct workflows with too many panel/leader steps.

EVIDENCE ARTIFACTS: terminal E2E keystroke TSV/manifest rows, scenario failure output, existing screenshots/transcripts.

REQUIREMENT IMPACT: protects existing REQUIREMENTS.md testing/input authority; update requirements only if a new durable keystroke budget obligation is added there.

VERIFICATION: zig build terminal-e2e; zig build test; redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md.

BLOCKERS: none.

SLICE_CONTRACT:
objective: Add deterministic keystroke-budget receipts and gates to terminal E2E workflows.
authority: #65, PRODUCT.md, REQUIREMENTS.md testing/input rows, KEYMAP.md, tools/terminal_e2e.py.
acceptance: key counts artifact + max budget gate + one mobile and one attached scenario enforced.
verification: zig build terminal-e2e; zig build test; redgate lint/health.
non_goals: no keymap redesign, no runtime telemetry, no wall-clock benchmarking.
blockers: none.

OBJECTIVE: Extend the terminal E2E harness so every workflow scenario records how many user key events/bytes were required, publishes a keystroke receipt, and can fail when a protected workflow exceeds its declared budget. AUTHORITY: Parent #65 (NS10), PRODUCT.md mobile-first terminal editor boundary, REQUIREMENTS.md testing/001-004 and input rows, KEYMAP.md operation grammar, tools/terminal_e2e.py and tools/TERMINAL_E2E.md. AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes - Handoff state: committed clean, tracker commented/closed PARENT: #65 via parent checklist membership plus this explicit parent reference. SCOPE: tools/terminal_e2e.py scenario model/runner/artifacts, tools/TERMINAL_E2E.md, and only minimal docs/tests needed to make keystroke budgets durable. BOUNDARIES: Do not invent productivity claims or optimize keymaps in this slice; count and gate existing E2E workflows. Do not add external telemetry, runtime config, plugin hooks, or cloud services. Do not use wall-clock speed as a proxy for typing efficiency. ACCEPTANCE: - Each terminal E2E scenario emits a stable artifact (for example keys.tsv/keystrokes.tsv plus manifest rows) showing logical user input steps, raw bytes sent, and total count. - Scenario definitions can declare a max keystroke/key-event budget; the runner fails with a useful message and artifact path when the budget is exceeded. - At least one existing mobile-default scenario and one attached-keyboard scenario are budgeted, proving the mechanism is enforced. - Documentation explains what is counted, what is not counted, and why counts are regression evidence rather than benchmark data. - `zig build terminal-e2e` remains deterministic and leaves the git tree clean except ignored artifacts. REGRESSION CLASS: KEYMAP/workflow changes that silently increase thumb-key or attached-key burden, hide required symbol-layer detours, or replace direct workflows with too many panel/leader steps. EVIDENCE ARTIFACTS: terminal E2E keystroke TSV/manifest rows, scenario failure output, existing screenshots/transcripts. REQUIREMENT IMPACT: protects existing REQUIREMENTS.md testing/input authority; update requirements only if a new durable keystroke budget obligation is added there. VERIFICATION: `zig build terminal-e2e`; `zig build test`; `redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md`. BLOCKERS: none. SLICE_CONTRACT: objective: Add deterministic keystroke-budget receipts and gates to terminal E2E workflows. authority: #65, PRODUCT.md, REQUIREMENTS.md testing/input rows, KEYMAP.md, tools/terminal_e2e.py. acceptance: key counts artifact + max budget gate + one mobile and one attached scenario enforced. verification: zig build terminal-e2e; zig build test; redgate lint/health. non_goals: no keymap redesign, no runtime telemetry, no wall-clock benchmarking. blockers: none.
tmk241 added the sliceready-for-agent labels 2026-06-21 16:36:08 +00:00
Author
Owner

Implemented in e486856 (Add terminal E2E keystroke budgets).

What changed:

  • Each terminal E2E scenario now emits keystrokes.tsv with logical key event, raw byte count, hex bytes, and visible UTF/control representation.
  • manifest.tsv records key_events, raw_input_bytes, max_key_events, and key_budget.
  • matrix.tsv includes key-event totals and declared budgets for quick review.
  • The runner enforces max_key_events and fails with an artifact path if a protected workflow exceeds budget.
  • One iOS-default mobile scenario and one attached-keyboard scenario now have budgets enforced against current baselines.
  • tools/TERMINAL_E2E.md documents the counting rule: one payload is one logical user key event, while CSI/raw bytes are counted separately; budgets are workflow-burden regression guards, not speed benchmarks.

Verification:

  • zig build terminal-e2e
  • zig build test
  • zig build
  • zig build v1-smoke
  • redgate list /opt/repositories/mim/REQUIREMENTS.md
  • redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md

Evidence from latest run:

  • .zig-cache/terminal-e2e/raw-key-chrome-crlf/manifest.tsv: key_events=7, raw_input_bytes=7, max_key_events=7, key_budget=pass.
  • .zig-cache/terminal-e2e/attached-existing-medium/manifest.tsv: key_events=8, raw_input_bytes=10, max_key_events=8, key_budget=pass.
  • .zig-cache/terminal-e2e/*/keystrokes.tsv lists each step and raw bytes.

Follow-on: #74/#75 can now depend on the budget artifact instead of inventing their own input-cost measurement.

Implemented in `e486856` (`Add terminal E2E keystroke budgets`). What changed: - Each terminal E2E scenario now emits `keystrokes.tsv` with logical key event, raw byte count, hex bytes, and visible UTF/control representation. - `manifest.tsv` records `key_events`, `raw_input_bytes`, `max_key_events`, and `key_budget`. - `matrix.tsv` includes key-event totals and declared budgets for quick review. - The runner enforces `max_key_events` and fails with an artifact path if a protected workflow exceeds budget. - One iOS-default mobile scenario and one attached-keyboard scenario now have budgets enforced against current baselines. - `tools/TERMINAL_E2E.md` documents the counting rule: one payload is one logical user key event, while CSI/raw bytes are counted separately; budgets are workflow-burden regression guards, not speed benchmarks. Verification: - `zig build terminal-e2e` ✅ - `zig build test` ✅ - `zig build` ✅ - `zig build v1-smoke` ✅ - `redgate list /opt/repositories/mim/REQUIREMENTS.md` ✅ - `redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md` ✅ Evidence from latest run: - `.zig-cache/terminal-e2e/raw-key-chrome-crlf/manifest.tsv`: `key_events=7`, `raw_input_bytes=7`, `max_key_events=7`, `key_budget=pass`. - `.zig-cache/terminal-e2e/attached-existing-medium/manifest.tsv`: `key_events=8`, `raw_input_bytes=10`, `max_key_events=8`, `key_budget=pass`. - `.zig-cache/terminal-e2e/*/keystrokes.tsv` lists each step and raw bytes. Follow-on: #74/#75 can now depend on the budget artifact instead of inventing their own input-cost measurement.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#73