serviceability: require Activated status for UnlinkDeviceInterface#2871
Merged
martinsander00 merged 1 commit intomainfrom Feb 17, 2026
Merged
serviceability: require Activated status for UnlinkDeviceInterface#2871martinsander00 merged 1 commit intomainfrom
martinsander00 merged 1 commit intomainfrom
Conversation
cf57abf to
24fb589
Compare
d5d3fca to
1c31228
Compare
elitegreg
approved these changes
Feb 17, 2026
Contributor
elitegreg
left a comment
There was a problem hiding this comment.
Good fix, but please use case-insensitive comparison on interface names. We do normalize the names, but there exists some early devices on mainnet that were configured before interface name normalization that won't match unless you use case-insensitivity.
1c31228 to
5d6ea5e
Compare
nikw9944
pushed a commit
that referenced
this pull request
Feb 20, 2026
…2871) Resolves: #2230 ## Summary - `UnlinkDeviceInterface` now restricts which interface statuses can be unlinked: only `Activated` and `Pending` are allowed (previously all statuses except `Deleting` were accepted) - When unlinking an `Activated` interface, an optional link account can be provided; if present, the link must be in `Deleting` status, ensuring interfaces are only unlinked as part of proper link teardown - SDK `UnlinkDeviceInterfaceCommand` automatically discovers associated link accounts by scanning onchain link data for side-A/side-Z matches, and passes them to the instruction ## Testing Verification - Added dedicated `unlink_device_interface_test.rs` with comprehensive coverage: unlink from Pending, unlink from Activated with valid Deleting link, rejection of unlink from Linked/Unlinked/Deleting statuses, rejection when link is not in Deleting status, and rejection when link doesn't reference the device/interface
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.
Resolves: #2230
Summary
UnlinkDeviceInterfacenow restricts which interface statuses can be unlinked: onlyActivatedandPendingare allowed (previously all statuses exceptDeletingwere accepted)Activatedinterface, an optional link account can be provided; if present, the link must be inDeletingstatus, ensuring interfaces are only unlinked as part of proper link teardownUnlinkDeviceInterfaceCommandautomatically discovers associated link accounts by scanning onchain link data for side-A/side-Z matches, and passes them to the instructionTesting Verification
unlink_device_interface_test.rswith comprehensive coverage: unlink from Pending, unlink from Activated with valid Deleting link, rejection of unlink from Linked/Unlinked/Deleting statuses, rejection when link is not in Deleting status, and rejection when link doesn't reference the device/interface