Skip to content

feat(host-cli): notify removed devices - #584

Draft
pgherveou wants to merge 1 commit into
mainfrom
fix/notify-removed-paired-device
Draft

feat(host-cli): notify removed devices#584
pgherveou wants to merge 1 commit into
mainfrom
fix/notify-removed-paired-device

Conversation

@pgherveou

Copy link
Copy Markdown
Collaborator

Summary

  • send one SSO Disconnected message to the selected pairing host before deleting its local pairing
  • keep peer-initiated disconnect cleanup local so it never echoes another disconnect
  • preserve the saved pairing, responder, and renewal target when notification submission fails
  • add focused runtime and CLI regression coverage plus a reusable two-host CLI harness

This matches the removal order on polkadot-ios-community/develop: RemoveDeviceInteractor awaits disconnectHost, and SSOTruAPICoordinator sends 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 --check
  • cargo build --workspace --all-targets
  • cargo test --workspace --all-targets
  • cargo test -p truapi-server disconnect_paired_host_ -- --nocapture --test-threads=1
  • bash -n rust/crates/truapi-host-cli/e2e/device-removal-disconnect.sh
  • shellcheck rust/crates/truapi-host-cli/e2e/device-removal-disconnect.sh
  • Prettier check and Bun compilation for device-removal-disconnect.ts
  • git diff --check

All 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-v2 and previewnet. Signer onboarding completed, but the existing pairing prerequisite failed before the changed removal path: both Statement Store allowance extrinsics were rejected with Invalid Transaction (1010), so no pairing session was persisted and a remote Disconnected could 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 Connected to Disconnected flow, pairing-host auth-storage cleanup, and empty signing-host device list can be rerun when allowance allocation is operational.

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.

1 participant