Repository navigation
Require a new pairing gesture after the client hits the round limit - #627
Merged
Merged
Conversation
A pairing window the operator opened before or during a dynamic pairing attempt that then reached the round limit later lifted the hold-back and reset the round count.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Pairing cleanup can leave the code displayed and output channel suspended if the round-limit query fails or is cancelled, and can incorrectly close a fresh gesture window.
3 open issues
What changed in this PR
This PR tightens the client’s dynamic pairing-code flow to align with Sendspin spec PR #312: an earlier pairing gesture must not reset the round limit for the next attempt.
Changes:
- Closes an admitting pairing window when an attempt ends at the round limit.
- Adds a regression test confirming the next attempt sends
client/pair-pendingand preserves the round count.
| File | Description |
|---|---|
tests/test_client_pairing.py |
Tests that a window opened during an attempt cannot bypass the next hold-back. |
aiosendspin/client/connection.py |
Adds pairing-window cleanup when the round limit is reached. |
Review effort: Balanced
A server abort arriving while the hold-back cleared its gesture prompt closed the window the operator had just opened, and a failing round count query skipped releasing the pairing code out-channels.
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.

What does this implement/fix?
A pairing window the operator opened before or during a dynamic pairing code attempt that then hit the 20 round limit lifted the hold on the next attempt and reset the round count. The spec only lets a verified
server_kcor an operator action made after the limit reset it.The client now closes that window when the attempt ends at the limit, so the next attempt sends
client/pair-pendingand waits for a new gesture. A window opened after the limit still lifts the hold as before.Related issue or spec PR (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocumentationmaintenancecidependencies