Skip to content

test(acceptance): exercise provider/catalog TUI slash commands through real PTY #1294

Description

@dennisonbertram

Why this matters

Existing commands /keys and /model are unproven in the real TUI matrix because the fixture lacks configured/missing-provider and /v1/models catalog states. They must be driven through rendered selection/error/success states.

Acceptance contract

Create safe deterministic configured/missing-key and model-catalog fixtures; use 100x30 PTY with keyboard selection/invalid path; assert rendered state, API postcondition and follow-up conversation behavior.

Current architecture and search evidence

/keys cmd/harnesscli/tui/model.go:2091; /model :2068; existing harness provider/model endpoints and catalog fixture seams.

In scope

Create safe deterministic configured/missing-key and model-catalog fixtures; use 100x30 PTY with keyboard selection/invalid path; assert rendered state, API postcondition and follow-up conversation behavior.

Out of scope

All other TUI command groups, cron/callback scenarios, native GUI, and product fixes absent a separately filed live failure.

Work type

Engineering change / feature slice

Change class

Infrastructure, CI, or process change

Protected path

Registry-derived command case -> real harnesscli 100x30 PTY -> rendered TUI state -> isolated harness/API/store or filesystem postcondition -> continued usable conversation -> bounded cleanup.

Cross-surface impact map

Test-only PTY matrix/fixtures and existing read/write API endpoints. Isolated config/workspace/DB paths only. Explicit focus/keyboard/error/confirmation handling, durable probes, no secrets. Native GUI is excluded. No production behavior/schema/deployment change unless a live test demonstrates a separate bug. Required plan, impact map, logs, indexes, focused/race/full regression and hosted CI.

Product and UX contract

Drive exactly the keyboard interaction a user uses; capture success, invalid/error, selection/focus and destructive-confirmation states. A fixture shortage is not an N/A outcome.

Coordination and dependencies

Child work for #1088/#1010. It may build on the non-closing current 24-command matrix foundation, but must use a fresh current-main worktree and a single PR with Closes #N.

Test-first plan

Add red real-PTY fixture case(s) proving the command cannot be credited without rendered and durable evidence, then implement the narrowest deterministic fixture/driver support. Run focused tests, race, ./scripts/test-regression.sh, repeat bounded PTY smoke, and retain artifacts.

Verification plan

Record exact source SHA, terminal frame hashes/transcript, typed keys, API/SSE and relevant DB/filesystem evidence, IDs, cleanup, race/full regression and independent review. Do not claim GUI proof.

Rollout and rollback

Acceptance-only; revert the isolated PR, with no migration or deployment.

Documentation and handoff

Update active plan, impact map, engineering/observational/long-term logs, indexes and #1088 applicability matrix.

Definition of done

  • Each named command is driven through a real 100x30 PTY, not reducer-only
  • Rendered result and durable postcondition are retained
  • Required multi-message/confirmation/invalid behavior is covered
  • Focused/race/full regression, independent review and CI pass
  • No fixture shortage is recorded as a user-path pass

Process acknowledgement

  • I completed current-architecture search and impact analysis and will update scope if evidence changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions