Repository navigation
fix: wizard shutdown no longer reports a timeout - #1018
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: ef1a489e-d0db-416e-a8da-ac6184e5f6af
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 5:41 PM ET / 21:41 UTC. Summary Reproducibility: no. executed current-main reproduction was established in this read-only review, but the source path is clear: cancellation of the delay task in the current Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the narrow Do we have a high-confidence way to reproduce the issue? No executed current-main reproduction was established in this read-only review, but the source path is clear: cancellation of the delay task in the current Is this the best way to solve the issue? Yes. Using the framework timeout-and-cancellation wait while retaining the compatible deadline message is the narrowest maintainable fix; the remaining need is live gateway/setup proof, not a different implementation direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ee4817d2c2e7. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
Co-authored-by: Copilot App <[email protected]> Copilot-Session: ef1a489e-d0db-416e-a8da-ac6184e5f6af
|
Addressed the paired test-quality findings in
Current-head validation:
|
… timeouts A chat.send or exec.approval.resolve response wait races its timeout delay against the client-lifetime token. A cancelled delay completes Task.WhenAny exactly like an elapsed one, so client shutdown mid-request surfaced as 'Timed out waiting for ... response from gateway' instead of a cancellation. Classify the cancelled-token case before throwing TimeoutException at both sites, mirroring the wizard-request fix in openclaw#1018. Fixes the two sibling sites of openclaw#1021.
… timeouts A chat.send or exec.approval.resolve response wait races its timeout delay against the client-lifetime token. A cancelled delay completes Task.WhenAny exactly like an elapsed one, so client shutdown mid-request surfaced as 'Timed out waiting for ... response from gateway' instead of a cancellation. Classify the cancelled-token case before throwing TimeoutException at both sites, mirroring the wizard-request fix in openclaw#1018. Fixes the two sibling sites of openclaw#1021.
…al timeouts (#1026) * fix: report gateway shutdown as cancellation instead of chat/approval timeouts A chat.send or exec.approval.resolve response wait races its timeout delay against the client-lifetime token. A cancelled delay completes Task.WhenAny exactly like an elapsed one, so client shutdown mid-request surfaced as 'Timed out waiting for ... response from gateway' instead of a cancellation. Classify the cancelled-token case before throwing TimeoutException at both sites, mirroring the wizard-request fix in #1018. Fixes the two sibling sites of #1021. * fix: report gateway shutdown as cancellation instead of chat/approval timeouts A chat.send or exec.approval.resolve response wait races its timeout delay against the client-lifetime token. A cancelled delay completes Task.WhenAny exactly like an elapsed one, so client shutdown mid-request surfaced as 'Timed out waiting for ... response from gateway' instead of a cancellation. Classify the cancelled-token case before throwing TimeoutException at both sites, mirroring the wizard-request fix in #1018. Fixes the two sibling sites of #1021. --------- Co-authored-by: Peter Steinberger <[email protected]>
Related: #1010
What Problem This Solves
Fixes an issue where users running the gateway setup wizard could see a timeout when the client was actually shutting down or being disposed.
Why This Change Was Made
The wizard request wait now uses the framework timeout-and-cancellation primitive so deadline expiry and client-lifetime cancellation remain distinct. Request completion and method tracking are cleaned in one terminal
finallypath without changing gateway response or error propagation.User Impact
Wizard shutdown and connection teardown now report cancellation rather than a misleading timeout. Real gateway deadlines still report
TimeoutException.Evidence
Five loopback WebSocket behavioral tests exercise real request serialization, transport response handling, timeout, disposal ordering, and a late response after timeout. They prove response payloads and gateway errors propagate unchanged, timeout remains a timeout with the compatible message, disposal surfaces
OperationCanceledException, late responses cannot replace a completed timeout, and both pending trackers are empty on every terminal path.Rubber-duck closeout: clean; no blocking or non-blocking findings.
Structured autoreview was attempted with Codex (
gpt-5.6-sol, high) and Claude. It was blocked before review by local reviewer tooling: Codex 0.137.0 refused helper binaries in the isolated temporary runtime, and Claude Code 2.1.156 is older than the helper's required 2.1.169 safe-mode version. No autoreview findings were produced.Change Type
Scope
winnodeValidation
./build.ps1- passed; 5/5 projects builtdotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore- passed; 2,906 passed, 31 skipped, 0 faileddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore- passed; 1,823 passed, 0 skipped, 0 faileddotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --filter "FullyQualifiedName~OpenClawGatewayClientTests.SendWizardRequestAsync" --logger "console;verbosity=normal"- passed; 5 passed, 0 failedReal Behavior Proof
1558aaaaOpenClawGatewayClientTests.SendWizardRequestAsync*filter aboveok:falsepreservedInvalidOperationException("wizard rejected"); a 250 ms unfulfilled request threwTimeoutException("Timed out waiting for wizard.status response"); dispose-before-response threwOperationCanceledException; a late response after timeout was processed ahead of a successful probe response but left the original task on the same timeout exception and both trackers emptyYes/No/N/A): N/ASecurity Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations