Repository navigation
test: prevent tmux server leaks in endpoint safety fixtures - #55
Merged
Merged
Conversation
…when one outlives it The teardown endpoint-safety cleanup reached each case socket by absolute path. Under the default macOS per-user TMPDIR that path exceeds the unix socket limit, so tmux refused it and kill-server silently did nothing, leaking the close-failure server whenever a case failed or was interrupted. Reach the socket by its relative name from the case directory, and exit nonzero naming any server that still answers after the reap.
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.
Intent
I would like all bugs to be fixed so tomorrow can be focused entirely to Vernant and not problems preventning Vernant from getting built.
Context: the close-failure case in the fm-teardown-endpoint-safety test left its dedicated tmux server running (pid 2011 since 2026-10-07 11:54; its socket file deleted). A leaked tmux server owned by this user made
fm-control relaunch --reconcile-onlyrefuse with endpoint absence unproved, which blocked lane d6 worker recovery for Vernant PRs 3099 and 3096 overnight. PR #46 (missing tmux endpoint recovery despite unrelated servers) has since landed and d6 recovery then succeeded, so the remaining defect is the test fixture leak itself.What Changed
Risk Assessment
✅ Low: The change is narrowly scoped to fixture cleanup, uses the same relative socket addressing as server creation, and preserves failure status while detecting servers that remain responsive after cleanup.
Testing
Reproduced the baseline leak and exercised the changed cleanup against real isolated tmux servers with 281–308-character socket paths. Normal execution, failure, and all handled signals cleaned up correctly; deliberately blocked cleanup produced the named leak diagnostic and exit status 1. An unrelated isolated server remained untouched. CLI and process-state evidence was captured, and all disposable servers and fixtures were removed. No full suite, linters, or other pipeline phases were run.
Evidence: Baseline reproduction: server survives after socket removal
Source: Baseline reproduction: server survives after socket removal
Evidence: Normal endpoint-safety execution and cleanup
Source: Normal endpoint-safety execution and cleanup
Evidence: Failed-case cleanup preserves exit status
Source: Failed-case cleanup preserves exit status
Evidence: Live scenario outcomes, signal statuses, and unrelated-server isolation
Source: Live scenario outcomes, signal statuses, and unrelated-server isolation
Evidence: Blocked cleanup overrides an existing failure with leak status
Source: Blocked cleanup overrides an existing failure with leak status
Evidence: Leak guard fails an otherwise successful test run
Source: Leak guard fails an otherwise successful test run
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git diff 32fbe8edbbd9d7c75990c3c259b7fb4fbf80de6c 34f7083f65477509da473e00d1eb0ab62e10e378to scope the change.python3 .endpoint-cleanup-validation.pyusing disposable worktree-local fixtures and real tmux servers: baseline reproduction, normal endpoint-safety test execution, injected failure, INT/TERM/HUP/QUIT interruptions, refused cleanup, and an unrelated isolated server.run_case('successful-run-leak-guard', 'unreapable-success', ROOT / 'tests/fm-teardown-endpoint-safety.test.sh', 1)to verify that a surviving server changes an otherwise successful test run to exit status 1.Recorded CLI transcripts, tmux operations, server and initial-pane PIDs, process survival, and fixture-directory removal; terminated deliberately leaked servers by their recorded disposable PIDs.Removed the disposable driver, baseline script, and fixture directories; confirmed no transient validation files remained.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.