Repository navigation
feat(validator): add the dynamic and static pairing-code suites - #165
Merged
chrisuthe merged 1 commit intoOct 15, 2026
Conversation
Walk a client through each pairing-code method its client/hello offers, in the pairing suite: P2 in the qr_code format before P1, then P2 in the digits format or P3, then P4. A method the client does not offer reports its checks N/A. P2 enters the code the user reads from the app, then a wrong one, and expects client/pair-retry or pair/abort pairing_code_mismatch before the right code completes the pairing. P3 activates with the pairing window closed and expects client/pair-pending. P4 cancels an attempt; its idle timeout, and P3's five-failure lockout, run only when the user opts in at their prompt. Machine checks cover commit_B, pairing_index, CPace field lengths and the server's verification order; human checks cover how the code is shown and spoken, under PAIR-DYN-*, PAIR-STATIC-* and PAIR-CTL-*. Pairing runs through the bundled SDK's initiate_pairing and end_pairing, so no new aiosendspin patch is needed. The server names a non-English language in server/hello, picked by the run seed, which the CLI now draws before the session. Redacted secret fields keep their length, so the field lengths stay judgeable, and every entered code is registered as a secret before it is used. --auto-answer reads a secret it cannot know from stdin, which replaces --auto-answer-token. The self-test pairs the bundled client by both code methods in both directions, and shows that a client never answering a wrong code fails.
chrisuthe
marked this pull request as ready for review
October 15, 2026 12:33
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.
Phase 2b of sendspin-validate (Sendspin/backlog#84): P2 dynamic code (digits and qr_code), P3 static code, and P4 cancel and timeout, all under
--suite pairing. A method the client does not advertise reports N/A. The timeout step and the 5-failure static lockout run only when the user opts in at their prompt.No aiosendspin patch was needed. Pairing runs through the bundled SDK's public
initiate_pairing/end_pairing. Changingserver/hello.languagesmid-session has no public API, so the spoken-language check uses a random non-English language set when the server is built (picked by the run seed, which the CLI now draws before the session) instead of repeating the step with a changed one.Also:
<redacted:N>), so the CPace field lengths are judged from frames.--auto-answerreads a secret it cannot know from stdin, which replaces--auto-answer-token.Tests: check unit tests over hand-built frames (pass and fail), including the pairing.md:165-169 QR vector and a guard that every vendored post-confirm failure reason maps to a verification stage. The self-test pairs the bundled client by the dynamic code (both formats, with speaker) and by the static code, in both directions, with zero FAIL or TOOL_ERROR. A client that never answers a wrong code fails.
python -m unittest discover -s tests: 522 OK;vendor_aiosendspin.py --checkpasses.Manual run against sendspin-cpp-cli main@7501898, both code methods, driven by a script that typed the code the CLI logs and ran
pair confirmas the window gesture: 0 FAIL and 0 TOOL_ERROR, including the lockout and the real 2-minute timeout. One WARN against the CLI: it logs the dynamic code ungrouped (211030), where pairing.md:242 says it should show211-030.Known limits: P4 runs once, on the client's code method; declining an opt-in step is reported SKIPPED; an English-only speaking device gets a WARN on the language check.