Fix: Signature mode fallback never retried connect message#134
Closed
Fix: Signature mode fallback never retried connect message#134
Conversation
When the gateway rejects a device signature with 'device signature invalid', HandleRequestError now re-sends SendConnectMessageAsync with the stored challenge nonce after advancing _signatureTokenMode to the next fallback mode. - Add _challengeNonce field to persist the nonce from HandleConnectChallenge - Store nonce in HandleConnectChallenge before calling SendConnectMessageAsync - In HandleRequestError, fire SendConnectMessageAsync(_challengeNonce) after advancing the signature mode so the client retries immediately - Add tests for the full fallback behavior and nonce storage Agent-Logs-Url: https://github.com/openclaw/openclaw-windows-node/sessions/87927bc4-fc20-49ed-9f1d-0b6047452166 Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix signature mode fallback to re-send connect message
Fix: Signature mode fallback never retried connect message
Apr 1, 2026
This was referenced Apr 2, 2026
Collaborator
|
Superseded by PR #141 (merged) — signature fallback fix. |
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.
After advancing
_signatureTokenModeon adevice signature invalidrejection, the client never re-sent the connect message — leaving the WebSocket open but permanently unauthenticated until a full reconnect cycle.Changes
_challengeNonce— persists the nonce received inconnect.challengeso it's available for retries triggered outside the challenge handlerHandleConnectChallenge— stores_challengeNoncealongside the existing_challengeTimestampMsHandleRequestError— after advancing the signature mode, immediately firesSendConnectMessageAsync(_challengeNonce)to retry auth; no retry when all modes are exhausted (mode unchanged)Tests
Four new tests cover: nonce persistence on challenge, per-step mode advancement, connect retry firing on fallback, and full exhaustion of all four modes without a spurious retry.