Repository navigation
fix: preserve Core updates across restart timeouts - #1181
TheAngryPit wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 25, 2026, 8:41 PM ET / August 26, 2026, 00:41 UTC. ClawSweeper reviewWhat this changesThe PR carries WSL command timeout status into gateway restart recovery so an ambiguous timeout skips forced distro termination while definitive failures still cold-restart. Regression provenancePossible regression — probable (reproduction; failure trace; reviewed change). No predecessor PR is attributed. Merge readinessKeep open, but do not merge this head unchanged: its timeout fix is useful, while its WSL command delivery conflicts with current main’s later stdin-based PATH repair. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe Windows Companion invokes gateway recovery inside WSL, then decides whether to preserve or terminate the distro. That decision affects gateway availability and whether an ongoing Core update handoff can complete. flowchart LR
A[Gateway reconnect failure] --> B[WSL in-distro restart]
B --> C[Command result]
C --> D{Timed out?}
D -->|Yes| E[Keep distro running]
D -->|No, failed| F[Terminate and cold restart]
E --> G[Later repair observes outcome]
F --> G
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Land the timeout distinction on top of current main while retaining stdin-based WSL script delivery and proving both timeout and definitive-failure recovery paths again. Do we have a high-confidence way to reproduce the issue? Yes. The timeout branch is source-reproducible, and the contributor supplied a current-head disposable-WSL runtime trace for timeout versus definitive failure behavior. Is this the best way to solve the issue? No. The timeout distinction is appropriate, but the branch must preserve current main’s stdin transport instead of restoring a documented argv-expansion hazard. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c446f34882af. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Exact-head real Windows/WSL recovery proof (
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: preserve Core updates across restart timeouts This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Superseded by the current-main replacement #1231, which preserves your fix and contributor attribution while avoiding the workflow-scope branch-update blocker. |
Related: openclaw/openclaw#99666
What Problem This Solves
Fixes an issue where the Windows Companion could interrupt a supported OpenClaw Core update when its automatic gateway repair timed out. After waiting 30 seconds for an in-distro restart, the Companion treated the timeout as a definitive failure and terminated the entire WSL distro, killing the detached Core updater.
Why This Change Was Made
The WSL command runner now carries an explicit timeout result through the gateway controller. Automatic repair treats that result as indeterminate and skips forced distro termination. Definitive non-timeout restart failures retain the existing terminate-and-cold-restart recovery path.
This stays on the Windows Companion boundary. Core already owns the managed-service update handoff and its parent wait budget; the destructive escalation happened later in the external Windows supervisor.
User Impact
Long-running Core updates are no longer killed merely because the Companion's host-side restart wait expired. Users still retain automatic recovery when an in-distro restart fails definitively.
Evidence
Observed before the fix:
21:02:57: Core acceptedupdate.runand started the managed-service handoff.21:03:21: Companion auto-repair invoked an in-distro gateway restart.21:03:51: the 30-second wait timed out and Companion invokedwsl.exe --terminate, killing the detached updater.FETCH_HEADadvanced.The regression test now proves that a timed-out in-place restart makes zero terminate calls, while existing tests continue to prove that a definitive failure performs the terminate-and-cold-restart path.
Change Type
Scope
winnodeValidation
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~WslGatewayControllerTests": 11 passed, 0 failed, 0 skipped..\build.ps1: all 5 projects built; 46 documentation files validated.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,698 passed, 0 failed, 32 intentional environment/integration skips.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,621 passed, 0 failed, 0 skipped.git diff --check: clean apart from Git line-ending conversion notices.Real Behavior Proof
origin/main12b84457a46492b8e3f4df99ea1ea17370f75992.e4dd1735b47eb7cadc19e0c73e9fea1c93d87e09.test_provenfor the timeout decision and preserved definitive-failure path.Yes/No/N/A): N/A.runtime_provenorend_to_end_proven.Security Impact
Yes/No): No.Yes/No): No.Yes/No): No.Yes/No): Yes.Yes/No): No.Yes, explain the risk and mitigation: automatic repair no longer invokes the destructive host-side terminate command after an ambiguous timeout. The existing forced recovery remains available after a definitive non-timeout failure.Compatibility and Migration
Yes/No): Yes.Yes/No): No.Yes/No): No.Review Conversations