Skip to content

fix(tui-tests): give each suite run its own tmux server - #455

Open
BunsDev wants to merge 1 commit into
mainfrom
fix/tui-tests-own-server
Open

BunsDev wants to merge 1 commit into
mainfrom
fix/tui-tests-own-server

Conversation

@BunsDev

@BunsDev BunsDev commented Nov 5, 2026

Copy link
Copy Markdown
Member

Summary

Each run of the terminal suite now gets its own tmux server, so two runs at once can't kill each other.

Context

Changes

Every run used the socket coven-tui-test and shut that server down when it started and when it exited. A run in another worktree or session could therefore kill a run in progress. The failures look like product faults: a blank frame, a missing draft, a boot that never finishes.

  • The default TUI_SOCKET now carries the run's process id.
  • A run removes its socket when it finishes, because tmux leaves the file behind and unique names would otherwise pile up.
  • An explicit TUI_SOCKET still works as before.

Validation

  • git diff --check: clean.
  • cargo fmt --all: N/A, no Rust changes.
  • cargo check --workspace: N/A, no Rust changes.
  • cargo clippy --workspace --all-targets -- -D warnings: N/A, no Rust changes.
  • cargo test --workspace: N/A, no Rust changes.
  • Targeted/manual checks:
    • Before: I started a second run at offsets of 2 to 6.5 s during a run of a 9-check streaming case that is not in this PR. The first run failed at offsets up to 4.5 s, and the second run failed at offsets up to 6 s, including TUI failed to boot.
    • After, same sweep: both runs passed at all 11 offsets.
    • On this branch: second run at offsets of 1 to 4 s during another run, both clean all 4 times.
    • Full suite on this branch: 83 of 84 on a build of main. The one failure, --help shows usage line, is from that binary's scratch filename. Case 01 passes when the same binary is named coven-code.
    • Unit tests: python3 -m unittest discover -s scripts/tui-tests -p 'test_*.py' passes.
    • No coven-tui-test-* socket files were left after any of these runs.
  • Not run: hosted CI, until this is pushed.

PR Readiness

  • Diff is limited to the intended files.
  • Generated files were not edited by hand.
  • User-facing docs/help were updated: the README's TUI_SOCKET row.
  • No secrets, credentials, local paths, or unrelated logs are included.
  • Remaining risks: a run killed with SIGKILL leaves its uniquely named socket file and possibly its server. Anything running the old scripts still shares the old socket until it picks this up.

Every run shared one socket and shut its server down when it started and when it
exited, so a run in another worktree or session could kill a run in progress. The
failures looked like product faults: a blank frame, a missing draft, a boot that
never finished. Starting a second run during the first reproduces them.

The default socket now carries the run's process id, and a run removes its socket
when it finishes because tmux leaves the file behind. An explicit TUI_SOCKET still
works as before.
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 5, 2026 4:36am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 300d869a Deployed Nov 5, 2026 by vercel[bot]
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