feat(host-cli): notify removed devices - #584
Open
pgherveou wants to merge 6 commits into
Open
Conversation
pgherveou
marked this pull request as ready for review
September 4, 2026 13:01
TarikGul
reviewed
Sep 4, 2026
TarikGul
reviewed
Sep 4, 2026
TarikGul
reviewed
Sep 4, 2026
TarikGul
reviewed
Sep 4, 2026
…ordering asymmetry The preservation test drives the no-local-session failure rather than a notification rejection, so it is named for that and points at the two places the other failures are covered. The notify-then-remove order fails asymmetrically: a failed notification keeps everything, while a failed local removal after a successful notification leaves the peer disconnected and the device still listed. Stating which direction is preferred keeps the order from reading as an accident.
Keep normal removal notify-first for iOS parity, while allowing operators to drop local responder state when disconnect submission fails.
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
Disconnectedmessage to the selected pairing host before deleting its local pairingThis matches the removal order on
polkadot-ios-community/develop:RemoveDeviceInteractorawaitsdisconnectHost, andSSOTruAPICoordinatorsends its disconnect request before removing the host. The iOS contact-device broadcast has no CLI equivalent and is not included here.Verification
cargo +nightly fmt --checkRUSTFLAGS='-D warnings' cargo build --workspace --all-targets --all-featuresRUSTFLAGS='-D warnings' cargo check --target wasm32-unknown-unknown -p truapi-servertruapi-providerclippy configurations with warnings deniedRUSTFLAGS='-D warnings' cargo test --workspace --all-features --all-targetsRUSTFLAGS='-D warnings' cargo test -p truapi-server disconnect_paired_host --all-featuresbash -n rust/crates/truapi-host-cli/e2e/device-removal-disconnect.shshellcheck rust/crates/truapi-host-cli/e2e/device-removal-disconnect.shdevice-removal-disconnect.tsgit diff --checkAll checks passed. The workspace test run included 814 server tests, 219 passing CLI unit tests with one declared network test ignored, and all 14 CLI process tests. Existing network-dependent tests remained ignored by their declarations.
Live two-host verification
Merged current
main, including #587's deployed People proof contexts, fixes the earlier allowanceInvalid Transaction (1010)prerequisite failure.The harness passed with separate pairing-host and interactive signing-host CLI processes on both
paseo-next-v2andpreviewnet. Each run proved:Connected,Disconnectedsequence00was cleared