Skip to content

fix(test): stabilize tmux-backed test suites#551

Open
johnrichardrinehart wants to merge 1 commit intoasheshgoplani:mainfrom
johnrichardrinehart:fix/test-suite-stability
Open

fix(test): stabilize tmux-backed test suites#551
johnrichardrinehart wants to merge 1 commit intoasheshgoplani:mainfrom
johnrichardrinehart:fix/test-suite-stability

Conversation

@johnrichardrinehart
Copy link
Copy Markdown
Contributor

Summary

  • isolate tmux/session/integration/UI/TUI tests from the developer's real ~/.agent-deck state
  • restore shell-friendly non-sandbox tmux startup and broaden shell prompt detection for themed prompts
  • harden tmux/TUI smoke fixtures around unique session names, quit behavior, and local build temp dirs

Testing

  • go test ./... passed in the working tree with this test-fix diff applied
  • focused reruns passed for ./internal/tmux, ./internal/session, ./internal/integration, ./internal/ui, and ./internal/tuitest
  • clean-worktree full-suite verification hit host disk-full errors while writing Go/Nix temp files, so those failures were treated as environmental rather than code regressions

Several test packages were reading the developer's real ~/.agent-deck state,
reusing fixed tmux fixture names, and assuming classic shell prompts and a
single quit path. That made go test ./... fail nondeterministically depending
on local config, shell theme, and leftover tmux sessions.

This change gives the tmux/session/integration/UI/TUI tests a temporary HOME,
restores shell-friendly non-sandbox startup, broadens shell prompt detection,
uses unique control-pipe fixture sessions, and makes the smoke tests tolerant
of confirmation and remain-on-exit behavior.

Constraint: tmux-backed tests must remain runnable on machines with custom prompts and existing ~/.agent-deck state
Rejected: Skip the tmux smoke/integration tests by default | would hide real regressions in the main test path
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep package TestMain isolation in place for any test suite that touches tmux, HOME, or ~/.agent-deck state
Tested: go test ./... in the working tree with the same test-fix diff applied; focused reruns for internal/tmux, internal/session, internal/integration, internal/ui, and internal/tuitest
Not-tested: clean-worktree full go test ./... under disk-full conditions (verification there hit no-space errors unrelated to code)
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