NS10 slice: Add keystroke-budget evidence to terminal E2E #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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:
zig build terminal-e2eremains 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.
Implemented in
e486856(Add terminal E2E keystroke budgets).What changed:
keystrokes.tsvwith logical key event, raw byte count, hex bytes, and visible UTF/control representation.manifest.tsvrecordskey_events,raw_input_bytes,max_key_events, andkey_budget.matrix.tsvincludes key-event totals and declared budgets for quick review.max_key_eventsand fails with an artifact path if a protected workflow exceeds budget.tools/TERMINAL_E2E.mddocuments 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.tsvlists each step and raw bytes.Follow-on: #74/#75 can now depend on the budget artifact instead of inventing their own input-cost measurement.