Repository navigation
fix(setup): approve only the pairing request setup just opened - #1523
Conversation
|
🦞👀 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: needs real behavior proof before merge. Reviewed September 29, 2026, 1:23 AM ET / 05:23 UTC (Revision 9). ClawSweeper reviewWhat this changesThe branch changes WSL setup to select pending operator and node pairing requests by a pre-connect snapshot and full device identity when a socket omits its request ID, with related cleanup, tests, and documentation. Merge readiness⛔ Blocked before merge - 7 items remain Keep this PR open. Current main still has the unsafe missing-ID approval path, and this branch is its active replacement. The exact-ID path has real Gateway validation, but approval behavior with competing ID-less requests and the required MXC proof remain unverified. Priority: P0 Review scores
Verification
How this fits togetherWindows setup opens operator and node connections to the WSL Gateway, then uses Gateway CLI approval commands when pairing is required. An approved request lets setup reconnect and hand the paired identity to the tray. flowchart LR
A[Windows setup] --> B[Pre-connect pending list]
A --> C[Gateway pairing socket]
B --> D[Approval selection]
C --> D
D --> E[Gateway approval command]
E --> F[Paired tray connection]
Decision needed
Why: The safety choice to fail closed is clear, but the upgrade experience for users whose existing setup previously completed needs an explicit product decision. Before merge
Findings
Agent review detailsSecurityNeeds attention: The approval selector changes a security-sensitive final effect, and its nearest forbidden ID-less cases still need real-Gateway proof. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep exact socket-ID approval, prove the ID-less selector against real competing requests, and give blocked setup users a visible retry or manual approval route before shipping the fail-closed path. Do we have a high-confidence way to reproduce the issue? Yes for the current-main defect: source shows missing-ID operator pairing invokes approve --latest, and the node path can select a pending request by queue size. A current-main live attack run was not performed in this read-only review. Is this the best way to solve the issue? Unclear pending final-effect proof: the new baseline and identity filter are a focused repair, but the missing-ID path has not demonstrated rejection of delayed same-identity requests against a real Gateway. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0844c0fa4035. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
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
HistoryReview history (8 earlier review cycles)
|
|
@clawsweeper re-review The P1 JSON-baseline finding and the same bug class in both changed drain paths are fixed at 511b176. Current-head regression tests cover misleading valid metadata and nonzero list failures for baseline, device drain, and node drain. The PR body now contains final validation and the remaining live-proof blockers. |
|
🦞👀 Re-review progress:
|
|
Closeout at
|
Signed-off-by: Sebastien Tardif <[email protected]>
When setup uses the separate wizard identity, load that identity even if context still holds an older operator id. Signed-off-by: Sebastien Tardif <[email protected]>
The end-to-end and node drains were still approving every pending request after the wizard selector. They now approve only the setup device request. Signed-off-by: Sebastien Tardif <[email protected]>
Reuse the existing identity-bound selector when the node socket has no request ID. Keep exact socket requests unchanged and cover foreign, missing, short, ambiguous, and unsafe requests through the actual approval path. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 50e2dd32-b79f-4654-9231-5766c9e5316d
Use an explicit review-safe synthetic credential in the new fixture; no production behavior changes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 50e2dd32-b79f-4654-9231-5766c9e5316d
Use explicit placeholder credentials in the new pairing tests and keep the added node-drain credential flow review-safe without changing behavior. Co-authored-by: Copilot App <[email protected]>
Keep the existing node-drain credential setup in place, select only requests bound to setup's full identity, and isolate the new pairing fixtures with explicit placeholder credentials. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> Copilot-Session: c61d6e69-5b8b-4fac-bdf8-7d468a9b5908
Co-authored-by: Copilot App <[email protected]> Copilot-Session: c61d6e69-5b8b-4fac-bdf8-7d468a9b5908
Co-authored-by: Copilot App <[email protected]> Copilot-Session: c61d6e69-5b8b-4fac-bdf8-7d468a9b5908
Co-authored-by: Copilot App <[email protected]> Copilot-Session: c61d6e69-5b8b-4fac-bdf8-7d468a9b5908
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
699397e to
c48f939
Compare
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 24bce02f-6ab2-4d36-b1f3-ca56f4657dba
|
@karkarl, final capable-host handoff for exact head The local WSL permission problem is resolved without changing global settings: one retry used a task-owned Build/full required suites, focused pairing tests (61/61), and independent security, app-native Codex, and rubber-duck reviews are recorded in the PR body. No known source blocker remains from this pass. Two proof gates are still explicitly not verified:
Scott identified your BaseContainer-capable machine for this handoff. Please bind any further proof to the tested SHA (or document the exact delta if the head moves), keep fixtures isolated, and require green current-head CI before landing. This controller is parked with no further retry or merge scheduled; active ownership is cleared for handoff. |
|
@karkarl @shanselman, capable-host follow-up to Scott's handoff, on exact head Strict MXC proof passed, and the operator ID-less discovery path now has real Gateway final-effect evidence. Node ID-less discovery remains explicitly not verified. ValidationThe Windows 11 Enterprise x64 host (build 26300) reported
The strict run passed Real behavior proofA session-local harness used the exact prebuilt production assemblies against a fresh, disposable Gateway 2026.9.6. Signed sockets created real pending requests; the command runner forwarded real CLI calls unchanged and recorded approval-command I/O.
Evidence boundary: the harness passes Still not verified: a genuine node socket returned pairing-required, but the Gateway placed its request in Retry history and local evidence fingerprints
All four owned disposable fixtures were cleaned up; their distros, data directories, identities, and listeners were verified gone. Before/after metadata manifests for real roaming/local The current-head CI Gate is green. The strict MXC gate is now satisfied, but the remaining node-discovery proof gap still needs resolution or explicit maintainer disposition before treating the complete pairing proof as closed. No merge is scheduled. |
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
…ation approval baseline The override validator rejected only keys denied by name, but llama.cpp's preset parser resolves every argument alias, so no-ag = false (the negated agent alias) enabled the CORS proxy and built-in host tools and hft = value supplied a Hugging Face credential the launch log does not redact. Replace the deny-list with an allowlist of canonical long tuning option names from the pinned runtimes' common/arg.cpp (b11026 and b11320 share the alias table), accepted only as canonical names and with a no- prefix only for options with a real negated form. scripts/bench-local-ai-recipe.ps1 mirrors the same allowlist so a grid cannot recommend a key the tray refuses at startup. Operator finalization also reused the setup-wide pre-connect approval baseline, so a pairing request minted after initial pairing but before finalization was absent from it and the ID-less approval fallback could approve that stale request (openclaw#1523 regression). Capture a fresh device baseline immediately before the finalization socket opens; the fast CLI transport keeps the removed grace-period wait out of the latency win.
What problem
When a pairing socket omitted its request ID, setup could choose a pending approval by queue position or identity alone. A foreign request or a stale same-identity request could be approved. This maintainer-owned replacement preserves the contributor and maintainer commits without rewriting the contributor repository.
What changed
approve --latest.wsl.exeargv-safety contract.edb08328e5e051c30d4604ab5527e765a0ce16ad. Current maintainer head:4bd18de4a46e507f93aed04aba38a171f6828b7bon base0844c0fa4035d4237c81ea270aceacab725cec1b.Required proof pools
windows-wsl-gateway-e2e: exact-head local product-path proof passed after using a task-ownedD:\temporary directory with verified inherited SYSTEM access and process-localTEMP/TMP. The run exercised real Gateway operator pairing, node role-upgrade pairing, tray/node connection, Gateway CLI paired-state inspection, safe node invocation, invalid/bad-token preservation, and cleanup. It did not inject foreign or delayed same-identity requests into the setup auto-approval queue, so the ID-less adversarial final-effect claim remains Partially verified / blocked.windows-wsl-mxc: this controller is known to lack BaseContainer. Strict MXC proof was not rerun or weakened, and no skip is represented as a pass. Not verified / blocked pending a capable host.Validation
OPENCLAW_REPO_ROOTwas set to this isolated worktree. Exact head4bd18de4a46e507f93aed04aba38a171f6828b7b:.\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore$env:TEMP='D:\openclaw-pr1523-temp-24bce02f'; $env:TMP=$env:TEMP; $env:OPENCLAW_RUN_E2E='1'; .\scripts\run-proof-tests.ps1 -Project 'tests\OpenClaw.E2ETests\OpenClaw.E2ETests.csproj' -Filter 'FullyQualifiedName~OpenClaw.E2ETests.Setup.SetupAndConnectTests' -ResultName 'gateway-setup-connect-dtemp' -RuntimeIdentifier win-arm64The first local WSL attempt used the user's default
%TEMP%and failed before pairing because WSL could not attach its temporaryswap.vhdx(Access is denied). One bounded retry used the verified task-ownedD:\temp path only in the test process and passed. No global environment, ACL, WSL configuration, shared distribution, or source changes were made for the retry.Independent review on the complete exact diff:
gpt-5.6-sol: no merge-blocking source finding.Real behavior proof
The exact-head real Gateway log recorded a socket-provided operator pairing request ID, explicit approval of that ID, successful operator reconnect, a socket-provided node role-upgrade request ID, explicit node approval, and successful node reconnect. The 22 passing product-path tests include:
FullSetup_TrayConnects_OperatorAndNodeFullSetup_GatewayCliShowsPairedDeviceAndNodeFullSetup_SafeNodeInvocation_RoutesThroughRealGatewayExternalLike_FreshTray_SharedTokenFlow_PairsOperatorAndNodeExternalLike_QrOnlyFreshTray_RequiresExplicitDeviceApprovalRealGateway_BadSharedToken_DoesNotDestroyExistingPairingRealGateway_InvalidSetupCode_DoesNotDestroyExistingPairingRealGateway_ReusedSetupCode_IsSafeAndIdempotentForSameDeviceCurrent-head unit tests separately exercise the ID-less production selector with full-identity and role matching, stale and foreign exclusion, ambiguous and malformed requests, late device/node drains, retry-baseline behavior, wizard identity selection, and WSL stdin use.
The live run proves the exact socket-ID operator/node path and existing-pairing preservation. It does not prove zero Gateway approval I/O for foreign or delayed same-identity requests in the ID-less fallback. That adversarial final-effect trace and strict BaseContainer/MXC proof remain unavailable on this controller.
Landing disposition: parked below the required 90% exact-head confidence because source, automated tests, and the normal real Gateway path are clean, but the required adversarial approval-boundary trace and strict MXC proof remain blocked.