Repository navigation
fix(setup): retry guarded restart after reload owner handoff - #1515
Conversation
Extract the guarded serving-owner recovery from a6190ba in PR #1447 (feat(setup): guide native Gateway installation and onboarding), onto main 273b018. Production recovery is unchanged. Omit native-package documentation and fixture isolation already present on main via fb8b9e7. Retain focused tests and setup documentation; add a coordinator-contention non-retry case and clarify provenance limitations. Related to #1498. Restart-intent coordinator contention remains unresolved. No guard bypass or broader retry policy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b57fee8a-96bb-4dd3-8352-588f901fffa8
|
Codex review: needs changes before merge. Reviewed September 25, 2026, 11:30 AM ET / 15:30 UTC (Revision 5). ClawSweeper reviewWhat this changesAfter WSL setup restores Gateway reload mode, the branch adds one guarded restart retry for a specific serving-owner refusal, with regression tests and setup documentation. Regression provenancePossible regression — suspected (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Needs changes before merge - 1 item remains The revised documentation resolves the earlier finding, and the guarded retry remains a distinct, useful fix absent from current main. The reviewed path has no concrete correctness finding; this collaborator PR remains open for the requested security review. Priority: P0 Review scores
Verification
How this fits togetherThe Setup Engine runs the WSL Gateway wizard, restores its reload setting, and asks the Gateway CLI to restart the service. Listener provenance and Gateway admission checks determine whether setup can continue to health verification. flowchart LR
A[WSL setup wizard] --> B[Restore reload mode]
B --> C[Guarded Gateway restart]
C --> D{Serving owner refused?}
D -->|Yes| E[Check managed listener]
E -->|Trusted| F[One guarded retry]
E -->|Untrusted| H[Setup fails]
D -->|No| G[Health and ownership check]
F --> G
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the bounded recovery after the requested security review, and track restart-intent coordinator contention separately in #1498 without weakening Gateway admission. Do we have a high-confidence way to reproduce the issue? Yes: an isolated official Gateway 2026.9.6 fixture observed the specific first-attempt refusal, and current main still has the single-attempt path. I did not run a fresh current-main reproduction. Is this the best way to solve the issue? Yes: the retry is limited to one classified refusal, checks the managed listener again, and invokes the existing guarded CLI path. Coordinator contention remains a separate failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 273b0182745a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Hi Karen, Copilot here. Thanks for extracting this narrow recovery and for the current-head official Gateway 2026.9.6 proof: the changed warning appeared once, the guarded CLI retry completed setup, and strict Gateway/MXC ran 17 passed, 0 skipped. The separate One concrete wording fix before readiness: Scott explicitly accepts one repeat through the normal guarded Gateway CLI after the exact serving-owner refusal and managed-endpoint recheck, provided both attempts keep Gateway owner/intent admission and other refusals (especially typed contention) fail closed. This is a policy disposition, not merge approval: your PR body currently says “Draft pending” / “No merge is authorized,” although GitHub marks the PR non-draft. Do you intend #1515 to remain a draft while you finish the documentation/review, or is it ready for a maintainer to reassess once those are aligned? I stopped without committing or pushing any changes. Local supplemental check, not new-head proof: the full ARM64 build passed. One Shared-suite run failed the unrelated intermittent MCP disposal test; its exact focused rerun passed. I did not call the full required floor green or waive it after stopping at your draft/no-merge wording. |
|
Global triage: HOLD_FOR_AUTHOR. Take confidence 65%; recommendation confidence 98%; effort extra-small; risk medium. The production retry remains narrowly bounded and guarded, and current-head proof is strong: build, Shared, Tray, SetupEngine, strict Gateway setup, and One documentation finding remains. Also reconcile the PR body's draft/no-merge wording with GitHub's non-draft ready state before maintainer reassessment. This is a policy and author-intent hold, not a request to broaden the accepted one-retry behavior. Restart-intent coordinator contention correctly remains outside this fix. |
Address Scott and adversarial review on PR #1515: the rejected owner-lease predicate is not exposed, and differing service snapshots do not establish admission-time lease state. Keep the accepted guarded retry and distinct coordinator-contention failure unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b57fee8a-96bb-4dd3-8352-588f901fffa8
|
Addressed both reviews in 2a685af. The setup documentation now describes a reload-triggered supervisor transition as a possible timing explanation, records the differing local/hosted service snapshots, and states that neither exposes the rejected admission-time owner-lease predicate. Production recovery and tests are unchanged; typed restart-intent coordinator contention remains outside the retry. Author intent is ready for maintainer reassessment, consistent with the existing non-draft state. The PR body no longer says Draft pending. Scott's acceptance of the single guarded repeat is recorded as a policy disposition, not merge approval; no agent merge is authorized. The structured-autoreview scanner limitation and security-sensitive review requirement remain explicit. Documentation validation passed (50 Markdown files, both proof-pool schema paths, and documentation-flow regression), as did git diff --check. Build/unit/runtime results remain attributed to 77b7e4b; they were not rerun or relabeled as new-head proof for this documentation-only follow-up. |
|
@clawsweeper re-review Please reassess current head 2a685af. Scott's and the adversarial review's documentation correction and readiness-wording requests are addressed. The guarded retry implementation is unchanged; coordinator contention remains outside scope. Documentation validation passed, and prior runtime proof remains explicitly attributed to 77b7e4b. Review only; no autofix or automerge requested. |
|
🦞👀 Re-review progress:
|
|
Security-review disposition for head 2a685af: the focused AI-assisted source review found no actionable security vulnerabilities. The retry remains limited to the specific serving-owner refusal, rechecks managed endpoint ownership, and invokes the same guarded Gateway CLI without an ownership bypass. Repeated refusal still fails setup. This is not a claim of independent live WSL security testing or formal security-team certification. The documentation concern is resolved. The user has explicitly authorized merging this reviewed head. The separate coordinator-contention failure remains tracked in #1498 and is not resolved by this PR. |
Brings in openclaw#1515 (fix(setup): retry guarded restart after reload owner handoff), which addresses the post-wizard serving-owner restart refusal introduced by Gateway 2026.9.6 and failing CI on every PR.
Summary
Related to #1498. This is a user-authorized, focused extraction from
a6190ba0935d20c97ecaf69bdc4f0871ebb63589in #1447 (feat(setup): guide native Gateway installation and onboarding), based directly on main273b0182745a3093c0e09f306ca8a1fff6ef3c5a. It does not include the native onboarding feature history. #1447 and its branch are unchanged. Do not close #1498: restart-intent coordinator contention remains unresolved.After reload-mode restoration,
SetupWizardRunner.RestoreReloadModeAsyncrecognizes only the exact diagnostic:It reuses
VerifyExpectedManagedGatewayAsync, then makes one recovery call to the same guarded Gateway CLI restart. The existing provenance wait allows up to 30 one-second retry delays, plus probe duration, forNoListenerorUnknownListenerspecifically taggedListenerSnapshotChanged. Other unknown/conflicting listeners, other restart errors, and repeated refusal fail closed.There is no direct systemd restart fallback, lock deletion, arbitrary signaling, silent downgrade, or ownership bypass.
SetupWizardRunnerremains the orchestration owner; the existing provenance policy and upstream Gateway admission retain their responsibilities. Listener provenance is not proof of owner-lease or coordinator readiness.A reload-triggered supervisor transition is a possible timing explanation, not an established cause of every refusal. Local diagnostics captured
activating/auto-restartwith no MainPID; hosted generic refusals captured anactive/runningunit and live PID. The public Gateway CLI does not expose the rejected owner-lease predicate, and these snapshots do not establish it.Extraction provenance and deviations
Current head:
2a685afc057411d695f7093c9b9c0bf3a8a7b923. Original extraction:77b7e4bb295e2c32df587c17e4e1a35ab0a2f428. The follow-up changes onlydocs/SETUP_ENGINE_REDESIGN.md; production code and tests are unchanged.a6190ba0.StateDatabaseCoordinatorContentionError/ restart-intent-recording refusal. Seven restart regression cases passed.docs/TEST_COVERAGE.mdand native onboarding context from the setup-document conflict.E2ESetupFixture.cs,SetupAndConnectTestsUninstallIsolation.cs, orAppRefactorContractTests.cs: they are already on main throughfb8b9e736f7473705ea14d8e97f6117bcbaddf68.Required proof pools
windows-wsl-gateway-e2e: post-wizard managed Gateway restart and setup recovery. Local strict fixture at77b7e4bbexercised the changed recovery on official Gateway 2026.9.6; runtime code is unchanged at current head.windows-wsl-mxc: required strict gateway setup/connect closeout, including real Gateway -> Windows node ->system.runcontainment. All 17 tests passed without skips at77b7e4bb.No new UI surface, node capability, or MCP command contract is introduced.
Validation
Documentation-only follow-up
2a685afc:.\scripts\validate-docs.ps1passed, checking 50 Markdown files, both proof-pool schema paths, and documentation-flow regression.git diff --checkpassed. Build/unit/runtime suites were not rerun for this documentation-only change; the results below belong to77b7e4bb, not a new-head execution.Extraction
77b7e4bb: local Windows ARM64, build 26694.OPENCLAW_REPO_ROOTpointed to this worktree; tray data and runtime TEMP/TMP were task-owned and isolated.$proofdenotes the session-owned results directory. Fresh-worktree tests intentionally allowed restore rather than risking a--no-restoreno-op.77b7e4bb.\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --logger "trx;LogFileName=Shared.trx" --results-directory $proofdotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --logger "trx;LogFileName=Tray.trx" --results-directory $proofdotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --logger "trx;LogFileName=SetupEngine.trx" --results-directory $proof$env:OPENCLAW_E2E_GATEWAY_VERSION='2026.9.6'; pwsh -NoProfile -File .\scripts\validate-mxc-e2e.ps1 -NoBuild -ResultsDirectory "$proof\mxc-results"-NoBuildreused the full ARM64 app build; the script rebuilt the E2E project. No-AllowSkip.git diff --cached --checkbefore extraction commitReal behavior proof
Strict local fixture at
77b7e4bb; production code and tests are identical at current head:Gateway restart owner was unavailable after restoring reload. Rechecking managed ownership before one restart retry.MirroredWslSafeGatewayPort_IsListeningAndRecorded,RealGateway_SystemRun_ExecutesThroughWindowsNodeMxcSandbox, andRealGateway_SystemRun_BlocksWritesToTrayDataDirectoryInMxcSandbox.Historical original-source evidence
Run 36055236206 at original
a6190ba0exercised the classified retry once in each Gateway 2026.9.6 shard: setup/connect 40 passed and 6 MXC skips, revocation 1 passed, network 2 passed. SetupEngine was 1,353 passed / 1 skipped; Tray was 3,097 passed. Overall run failed: Shared had 4,167 passed, 2 failed, 1 skipped. Failures:BoundedProcessWaitTests.WaitAsync_CancellationDoesNotWaitForInheritedPipeHandles(3,053 ms against a <3-second limit) andPiperVoiceExtractionTests.ExtractTarBz2Async_CancellationIsBoundedAndKillsExtractor(extractor still running). They are not attributed to #1498 or declared harmless flakes. These are not extracted-head validation results.Review and remaining gates
Author intent: ready for maintainer reassessment, consistent with GitHub's non-draft state. This is not merge approval or authorization for an agent to merge.
2a685afcand this PR-body update; no retry policy was broadened.python .agents\skills\autoreview\scripts\autoreview --mode local --prompt <focused-extraction-context> --output <session-report> --json-output <session-json>. Not verified / blocked: its secret-like-content guard rejected expanded diff context before the model ran. The scanner was not bypassed or weakened. This is not a clean autoreview result; the limitation remains visible for maintainer disposition rather than claiming a draft state that GitHub no longer has.clawsweeper:no-new-fix-prlabel. The separate focused PR was explicitly user-authorized, not an automated repair.StateDatabaseCoordinatorContentionError/ approximately 5,011 ms state-lifecycle admission failure occurs before owner resolution. It remains a separate, untreated intent-recording failure.