feat(host-cli): notify removed devices - #584
Draft
pgherveou wants to merge 1 commit into
Draft
Conversation
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 --checkcargo build --workspace --all-targetscargo test --workspace --all-targetscargo test -p truapi-server disconnect_paired_host_ -- --nocapture --test-threads=1bash -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 automated checks passed without warnings. The workspace test run included 771 server tests, 208 CLI unit tests, and 14 CLI process tests. Existing network-dependent tests remained ignored.
Live two-host verification
The new harness was exercised with separate pairing-host and interactive signing-host CLI processes on both
paseo-next-v2andpreviewnet. Signer onboarding completed, but the existing pairing prerequisite failed before the changed removal path: both Statement Store allowance extrinsics were rejected withInvalid Transaction (1010), so no pairing session was persisted and a remoteDisconnectedcould not be observed. Direct People-chain timestamp reads matched the local clock, ruling out local period skew.The harness remains in this PR so the full
ConnectedtoDisconnectedflow, pairing-host auth-storage cleanup, and empty signing-host device list can be rerun when allowance allocation is operational.