[Repo Assist] test: add terminal auth-failure coverage for PR #206 fix#207
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Draft
Conversation
Tests for the auth-failure backoff and terminal error detection added in PR #206 (fix: stop aggressive retry on auth failures): - HandleRequestError_TerminalAuthError_SetsAuthFailedFlag (theory): token mismatch / origin not allowed / too many failed → _authFailed set - HandleRequestError_TerminalAuthError_RaisesAuthenticationFailedEvent: AuthenticationFailed event fired with message text - HandleRequestError_TerminalAuthError_RaisesErrorStatus: ConnectionStatus.Error raised on terminal auth error - HandleRequestError_TerminalAuthError_OnNonConnectMethod_DoesNotSetAuthFailed: terminal-auth guard is scoped to 'connect' method only - HandleHelloOk_AfterAuthFailed_ClearsAuthFailedFlag: hello-ok response resets the flag so reconnect is re-enabled - HandleRequestError_AllDeviceSignatureModesExhausted_SetsAuthFailed: cycling through all 4 signature modes fires AuthenticationFailed once 660 Shared pass (+8), 20 skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9 tasks
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.
🤖 This is an automated PR from Repo Assist.
Coverage for the auth-failure backoff fix merged in PR #206 (fix: stop aggressive retry on auth failures, add setup nudge).
What's tested
PR #206 introduced two new behaviours with no test coverage:
Part 1 — reconnect counter move: reset only after
hello-ok, not on TCP connectPart 2 — terminal auth errors: set
_authFailedflag and fireAuthenticationFailedeventHandleRequestError_TerminalAuthError_SetsAuthFailedFlag(theory ×3)_authFailedHandleRequestError_TerminalAuthError_RaisesAuthenticationFailedEventAuthenticationFailedevent fires with the error message textHandleRequestError_TerminalAuthError_RaisesErrorStatusConnectionStatus.Erroris raised on terminal auth errorHandleRequestError_TerminalAuthError_OnNonConnectMethod_DoesNotSetAuthFailedconnectmethod — other methods with same text don't set the flagHandleHelloOk_AfterAuthFailed_ClearsAuthFailedFlaghello-okresponse resets_authFailedso reconnect is re-enabled on successful authHandleRequestError_AllDeviceSignatureModesExhausted_SetsAuthFailedAuthenticationFailedexactly onceHelper additions
Two new methods on
GatewayClientTestHelper:GetAuthFailedFlag()— reads private_authFailedfieldCaptureAuthenticationFailedEvents()— subscribes toAuthenticationFailedeventTest Status
dotnet test OpenClaw.Shared.Tests— 660 passed, 20 skipped (↑8 from 652)dotnet test OpenClaw.Tray.Tests— not changed (no Tray dependency)