Skip to content

Stop running clients when their paired server is removed or replaced - #24

Merged
ekarulf merged 2 commits into
mainfrom
codex/issue-17
Dec 3, 2026
Merged

ekarulf merged 2 commits into
mainfrom
codex/issue-17

Conversation

@ekarulf

@ekarulf ekarulf commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

When a paired server is removed or replaced, running connect, forward, socks, and mosh clients cancel their sessions. The client checks the pinned identity every second, before sending a bootstrap message, and when bootstrap completes.

A regression starts qcat connect in a child process, exchanges data over an established tunnel, then removes the descriptor or atomically replaces its public key. Both cases check for stream EOF and process exit with stdin still open. The separate in-flight renewal test also runs.

Both focused tests passed three times under the race detector. Both live-stream cases failed as expected when the old command wiring was substituted. go vet passed for the CLI package.

Fixes #17.

ekarulf commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Rework requested before merge.

Please add the active qcat connect regression required by #17. TestClientTrustRemovalAndReplacement calls a stubbed Bootstrap on a client with no live connection. It proves cancellation and rejection of a returned key, but would still pass if client() stopped wiring the guard into connect or left the SSH byte stream open. Exercise the command path with an established stream, remove or replace the paired descriptor, and assert that traffic stops and the command exits within the documented polling bound plus test tolerance. Keep the in-flight renewal test as separate coverage.

@ekarulf
ekarulf marked this pull request as ready for review December 3, 2026 08:27
@ekarulf
ekarulf merged commit 5023c74 into main Dec 3, 2026
7 checks passed
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.

Honor removal of a paired server in running clients and renewals

1 participant