Repository navigation
fix: allow Gateway setup under AllSigned - #2370
Conversation
Continue setup when PowerShell policy blocks only automatic Gateway cleanup, and provide route-specific manual removal guidance. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 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. |
|
Codex review: blocked before merge. What this changesThis PR lets Gateway setup continue when automatic cleanup is blocked and adds manual-removal guidance and preservation recovery. Example: A packaged Companion installation creates OpenClawGateway while MachinePolicy is AllSigned.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open for repair: its maintainer-approved direction addresses a source-confirmed setup blocker that remains on main. Reviewed head: Before merge
Findings
Tests
Agent review detailsHow this fits togetherGatewayPackageCleanup coordinates packaged Companion cleanup registration, persisted ownership, and startup reconciliation; setup pages consume its result and display warnings. flowchart TD
A[Companion startup or setup] --> B[GatewayPackageCleanup]
B --> C[PowerShell policy probe]
C --> D[Cleanup registration or manual removal]
B --> E[Ownership and preservation files]
E --> F[Cleanup worker and reconciliation]
D --> G[Setup warning UI]
Technical reviewBest possible solution: Keep policy-aware cleanup in the existing owner, accept PowerShell-produced ownership files without changing their fingerprint, and preserve explicit recovery and ownership checks. Do we have a high-confidence way to reproduce the issue? The linked report provides the enforced-policy trigger, failing command, rollback logs, and matching screenshot; current main retains the responsible registration path, although this review ran no reproduction. Is this the best way to solve the issue? Making optional cleanup unavailable without weakening organizational policy is an approved, focused solution, but the new preservation reader must honor the existing producer format. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 17cadf79dbea. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 24, 2026, 7:23 PM ET / November 25, 2026, 00:23 UTC. |
…-registration fallback docs Windows PowerShell 5.1 writes owned.json with a UTF-8 BOM. Skip one optional BOM when parsing the ownership record, while keeping the SHA-256 ownership fingerprint over the original file bytes. Document that a Task Scheduler registration failure also lets setup continue, and that a retry needs owned.json and a permitting policy. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
789cae8bce57681649d5afe405899fb714908c8f↓ No AllSigned-GPO host or interactive UI proof; a stale-receipt edge remains under repeated reconciliation failure.
↓ No live reproduction on a managed AllSigned host.
↓ The reported environment and visible warning were not reproduced live.
Closes #2361
What Problem This Solves
On machines managed by an AllSigned Group Policy, unsigned cleanup scripts cannot run, so Gateway setup can fail even though the Gateway itself is available. This blocks users who need to keep strict PowerShell policy from completing setup.
User Impact
Users can complete setup without weakening PowerShell policy. If automatic Gateway cleanup is unavailable, Companion gives route-specific instructions for removing the WSL or Store Gateway manually.
Why This Change Was Made
Only policy/probe failures and the explicit cleanup-task-unavailable result are treated as optional; ownership and other registration failures still fail setup. Preservation intent is stored separately, bound to the exact prior ownership record, and checked by the worker under its lock. No machine policy is changed and no unsigned cleanup script is run to bypass AllSigned.
Evidence
The local build and all required test suites passed. Focused Windows PowerShell tests verify the worker stays gated after a failed preservation write, recovery only disowns the matching owner record, and task disarm does not remove a task while ownership exists. Final independent rubber-duck review found no blocking issues. It noted a non-blocking edge where a stale cleanup receipt could match a later same-name Gateway if reconciliation repeatedly fails.
Required proof pools
windows-clean-installer-upgrade: Not verified; no installer/MSIX upgrade run.windows-wsl-gateway-e2e: Not verified; no WSL Gateway E2E run.windows-winui-interactive: Not verified; no interactive UI screenshot or capture.Validation
.\build.ps1- passed.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore- 5,972 passed, 29 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore- 6,949 passed, 0 skipped, 0 failed.dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore- 2,674 passed, 4 skipped, 0 failed.git diff --check- passed.Real Behavior Proof
Not verified / blocked: this host is not configured with AllSigned GPO, and no active setup UI capture was collected. The worker tests execute Windows PowerShell 5.1 against an isolated profile and verify the preservation gate, but they do not prove the full AllSigned-managed setup flow.