Repository navigation
test(orchestrate): run send-prompt.bats on a private tmux server, never the default socket (#312) - #316
Merged
Conversation
…er the default socket (#312) setup() puts a generated tmux wrapper first on PATH that adds -L sp-<pid>-<n> to every call, so the file's own tmux lines and send-prompt.sh's `command -v tmux` reach a per-test private server. teardown kills that server and removes its socket. Three new cases prove the route (inside a pane, with no default server) and the teardown, including that the server process dies. Claude-Session: https://claude.ai/code/session_01AANCMYzYQXMX2Zb3NXn2kE Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/send-prompt.batsno longer starts or uses the default tmux server (#312).setup()writes a per-testtmuxwrapper first onPATHthat adds-L sp-<pid>-<test#>to every call, so both this file's owntmux …lines andsend-prompt.sh'scommand -v tmuxreach a private server.-Lwins over an inheritedTMUX, so a run inside a tmux pane does not touch the pane's server either. The fake-tmux helpers still prepend their own bin and win.teardown()kills only that private server and removes its socket file and the wrapper dir; bats runs it on failure too.mk_sessioncloses fd 3 for the server it may start, so bats does not wait on it.show-environment -gstay unchanged,send-prompt.shaddresses the private server, and cleanup holds after a failing test.Production code is unchanged.
Test plan
PATH=/opt/homebrew/bin:$PATH bats tests/on0aca143: 1..1738, 1738 ok, 0 not oktests/send-prompt.batswithTMUXpointed at a live stand-in server andLO_*/GROUNDWORK_*exported: 103 ok; 0 test sessions on the default or stand-in server across 204 samples; both servers' session lists and global env identical before/after; 0 leftover sockets or processesmk_sessionbypassing the wrapper turns both new normal cases red; a wrapper without-Lturns the negative control redCloses #312
🤖 Generated with Claude Code
https://claude.ai/code/session_01AANCMZc7YqHR1wmnMozoN6