Repository navigation
Non-blocking remote/SSH/container backend teardown (#35) - #45
Merged
Merged
Conversation
This was referenced Sep 16, 2026
ElSargo
commented
Sep 16, 2026
ElSargo
left a comment
Owner
Author
There was a problem hiding this comment.
Brood QA (static) — request changes (COMMENT; cannot REQUEST_CHANGES on own PR)
Verdict: Would request changes — one clear doc defect; teardown logic otherwise looks aligned with #35. Please fix before merge.
Blocking
docs/frictions/ui-concurrency.mdheading corruption after the remittance edit:- Got:
### File drop reads### File drop reads and decodes synchronously - Want: restore the separate
### File drop reads and decodes synchronouslysection title (do not splice into the remitted teardown heading).
- Got:
What looks good (non-blocking once doc fixed)
- Presentation path signals cancel/disconnect then joins off-loop via
spawn_remote_connection_teardown/spawn_child_deployment_teardown. wait_child_with_timeout+ kill escalation replaces unboundedChild::wait; unit tests cover reap + hung kill.- Completion is generation-gated (
pending_backend_teardowns+BackendTeardownCompleted); stale completions no-op. - Residuals in PR body (sync shutdown when no proxy / event loop closed; fire-and-forget teardown threads) are acceptable for this remit.
CI
FAILED — GHA Nix ENOSPC. Do not treat as the reason for this review; fix the friction-doc heading regardless.
Stacking
Conflicts expected with #43 on clients/brood-client/src/remote.rs and with the friction-doc stack (#36/#37/#40/#43). Rebase after those land (and after fixing the heading).
Desktop verify: not run.
Signal remote cancel/disconnect on the UI thread, then join the transport worker and SSH/container children on background teardown threads with timeout+kill escalation. Gate completion with BackendTeardownCompleted so stale results cannot mutate newer UI state. Fixes #35.
ElSargo
force-pushed
the
fix/backend-teardown-nonblocking
branch
from
September 16, 2026 22:01
ccedb3c to
1e0d173
Compare
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
disconnect_remote_backend(and related attach failure paths) signal cancel/disconnect on the presentation thread, then join off-loop.try_waitwith timeout and kill escalation instead of unboundedChild::wait.ClientEvent::BackendTeardownCompleted.docs/frictions/ui-concurrency.md.Fixes #35
Test plan
RUSTFLAGS='-C linker=cc' cargo test -p brood-client --lib backend_teardownRUSTFLAGS='-C linker=cc' cargo test -p brood-client --lib remote::Residual risks
shutdown()(now timeout-bounded) when the event loop is already closed; those are off the presentation loop.