Skip to content

fix(setup): approve only the pairing request setup just opened - #1523

Merged
karkarl merged 14 commits into
mainfrom
land/pr-1480-pairing-identity
Sep 30, 2026
Merged

karkarl merged 14 commits into
mainfrom
land/pr-1480-pairing-identity

Conversation

@karkarl

@karkarl karkarl commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Socket-provided request IDs still use the exact device-approval path.
  • Operator and node setup capture a pending-ID baseline before the first socket attempt and retain a successful baseline across step retries. A transient failed capture is retried; requests already pending at the retry snapshot remain excluded.
  • Missing-ID fallback requires exactly one new request with the full device identity and appropriate role. Stale, foreign, unsafe, missing, and ambiguous requests fail closed. Wizard and finalization sockets take their own pre-connect snapshots.
  • Cleanup excludes requests predating setup's baseline and does not use approve --latest.
  • WSL PATH-prefix scripts pass through stdin, preserving the repository's wsl.exe argv-safety contract.
  • The latest maintainer commit changes only synthetic test credential literals to autoreview-allowlisted placeholders. Production behavior is unchanged.
  • Original contributor head: edb08328e5e051c30d4604ab5527e765a0ce16ad. Current maintainer head: 4bd18de4a46e507f93aed04aba38a171f6828b7b on base 0844c0fa4035d4237c81ea270aceacab725cec1b.

Required proof pools

  • windows-wsl-gateway-e2e: exact-head local product-path proof passed after using a task-owned D:\ temporary directory with verified inherited SYSTEM access and process-local TEMP/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_ROOT was set to this isolated worktree. Exact head 4bd18de4a46e507f93aed04aba38a171f6828b7b:

Command Result
.\build.ps1 Passed: Shared, CLI, WinNode CLI, SetupEngine, WinUI, documentation
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,143 passed, 36 skipped, 0 failed
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 3,180 passed, 0 failed
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore 1,423 passed, 1 skipped, 0 failed
dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore 1,213 passed, 5 skipped, 0 failed
Focused approval, baseline, drain, and wizard identity filter 61 passed, 0 failed
$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-arm64 22 passed, 1 unrelated Ollama-permission test skipped, 0 failed; uninstall cleanup passed and the task-owned temp directory was removed

The first local WSL attempt used the user's default %TEMP% and failed before pairing because WSL could not attach its temporary swap.vhdx (Access is denied). One bounded retry used the verified task-owned D:\ 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:

  • Security review: no vulnerabilities found.
  • App-native GitHub Codex gpt-5.6-sol: no merge-blocking source finding.
  • Rubber-duck: no source blocker; noted non-blocking fail-closed recovery and drain UX concerns.
  • CLI structured autoreview was not required for closeout and produced no result because its scanner rejects removed synthetic credential literals on the old side of the diff.

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_OperatorAndNode
  • FullSetup_GatewayCliShowsPairedDeviceAndNode
  • FullSetup_SafeNodeInvocation_RoutesThroughRealGateway
  • ExternalLike_FreshTray_SharedTokenFlow_PairsOperatorAndNode
  • ExternalLike_QrOnlyFreshTray_RequiresExplicitDeviceApproval
  • RealGateway_BadSharedToken_DoesNotDestroyExistingPairing
  • RealGateway_InvalidSetupCode_DoesNotDestroyExistingPairing
  • RealGateway_ReusedSetupCode_IsSafeAndIdempotentForSameDevice

Current-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.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@karkarl karkarl added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Sep 25, 2026
@clawsweeper clawsweeper Bot added the rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. label Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed September 29, 2026, 1:23 AM ET / 05:23 UTC (Revision 9).

ClawSweeper review

What this changes

The 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
Reviewed head: 4bd18de4a46e507f93aed04aba38a171f6828b7b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused repair has substantial regression coverage and a passing real normal-path run, while the security boundary and required containment proof remain open.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: The exact-head WSL setup run observed socket-ID operator and node approvals and successful reconnection, but it did not exercise the new ID-less selector with foreign or delayed same-identity requests through the final Gateway approval command. Fake-runner tests are supplemental. Strict MXC proof is also blocked; the new baselines are runtime state, so no stored-data migration applies. Redact tokens, IPs, and private endpoints in added evidence, then update the PR body for re-review; if that does not trigger, ask a maintainer to comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: The exact-head WSL setup run observed socket-ID operator and node approvals and successful reconnection, but it did not exercise the new ID-less selector with foreign or delayed same-identity requests through the final Gateway approval command. Fake-runner tests are supplemental. Strict MXC proof is also blocked; the new baselines are runtime state, so no stored-data migration applies. Redact tokens, IPs, and private endpoints in added evidence, then update the PR body for re-review; if that does not trigger, ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed 8 items Current main still needs the fix: On current main, missing-ID operator pairing calls approve --latest before selecting a request; the node fallback selects the sole pending request without binding it to setup's identity.
Introduced selection boundary: The new selector excludes baseline request IDs and requires one pending request matching the full device identity and role before returning an ID.
Final approval effect: The selected ID reaches an explicit devices approve command through the production WSL command runner; node approval has the corresponding nodes approve path.
Findings None None.
Security Needs attention Unproven ID-less approval boundary: A post-baseline request matching the setup identity can reach an approval command. The available live run covers socket-provided IDs but does not show rejection before Gateway I/O for foreign or delayed same-identity requests.

How this fits together

Windows 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]
Loading

Decision needed

Question Recommendation
When ID-less pairing cannot establish a trustworthy pre-connect baseline, should setup ship the current generic failure page or provide a pairing-specific in-product recovery path? Add guided recovery: Keep approval fail-closed and offer a visible retry or manual pairing route from the setup failure state.

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

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: The exact-head WSL setup run observed socket-ID operator and node approvals and successful reconnection, but it did not exercise the new ID-less selector with foreign or delayed same-identity requests through the final Gateway approval command. Fake-runner tests are supplemental. Strict MXC proof is also blocked; the new baselines are runtime state, so no stored-data migration applies. Redact tokens, IPs, and private endpoints in added evidence, then update the PR body for re-review; if that does not trigger, ask a maintainer to comment @clawsweeper re-review.
  • Resolve security concern: Unproven ID-less approval boundary - A post-baseline request matching the setup identity can reach an approval command. The available live run covers socket-provided IDs but does not show rejection before Gateway I/O for foreign or delayed same-identity requests.
  • Resolve merge risk (P1) - The missing-ID selector can pass a newly observed same-identity request to Gateway approval, but no real-Gateway trace yet shows zero approval I/O for a foreign or delayed stale request at the final effect.
  • Resolve merge risk (P1) - Strict WSL Gateway-to-Windows-node MXC validation has not run without a skip on a BaseContainer-capable host, as required for this setup/connect change.
  • Resolve merge risk (P1) - Existing ID-less setups that cannot capture a trustworthy pending-list baseline now fail closed. The setup failure page shows an error and log but offers no pairing-specific in-product recovery; maintainers need to settle that upgrade behavior before landing.
  • Complete next step (P2) - Before merge, provide current-head real-Gateway final-effect proof for allowed and forbidden ID-less requests, complete no-skip MXC validation, and resolve pairing-specific setup recovery.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [high] Unproven ID-less approval boundary — src/OpenClaw.SetupEngine/ApprovalRequestHelper.cs:212
Agent review details

Security

Needs attention: The approval selector changes a security-sensitive final effect, and its nearest forbidden ID-less cases still need real-Gateway proof.

Review metrics

Metric Value Why it matters
Code and test growth production +326 net lines, tests +601 net lines The production growth implements a bounded pairing selector and baseline; the larger test delta covers its failure cases.

Root-cause cluster

Relationship: canonical
Canonical: #1523
Summary: This live maintainer-owned replacement carries forward the closed, unmerged original pairing fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Prove final approval and recovery (recommended)
    Capture allowed and forbidden ID-less Gateway approval effects, complete strict MXC validation, and resolve the setup recovery choice.
  2. Keep parked
    Leave the PR open for a capable host if final-effect and containment proof cannot yet be collected.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P0: The item addresses automatic approval of a potentially unrelated pairing request during setup, a security boundary in a first-run flow.
  • merge-risk: 🚨 security-boundary: The new ID-less correlation decides which Gateway pairing request receives approval, and forbidden-request final-effect proof is outstanding.
  • merge-risk: 🚨 compatibility: A baseline-list failure now stops an ID-less pairing flow that previously attempted automatic approval, without pairing-specific in-product recovery.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: The exact-head WSL setup run observed socket-ID operator and node approvals and successful reconnection, but it did not exercise the new ID-less selector with foreign or delayed same-identity requests through the final Gateway approval command. Fake-runner tests are supplemental. Strict MXC proof is also blocked; the new baselines are runtime state, so no stored-data migration applies. Redact tokens, IPs, and private endpoints in added evidence, then update the PR body for re-review; if that does not trigger, ask a maintainer to comment @clawsweeper re-review.

Evidence

Security concerns:

  • [high] Unproven ID-less approval boundary — src/OpenClaw.SetupEngine/ApprovalRequestHelper.cs:212
    A post-baseline request matching the setup identity can reach an approval command. The available live run covers socket-provided IDs but does not show rejection before Gateway I/O for foreign or delayed same-identity requests.
    Confidence: 0.9

What I checked:

  • Current main still needs the fix: On current main, missing-ID operator pairing calls approve --latest before selecting a request; the node fallback selects the sole pending request without binding it to setup's identity. (src/OpenClaw.SetupEngine/PairOperatorStep.cs:346, 0844c0fa4035)
  • Introduced selection boundary: The new selector excludes baseline request IDs and requires one pending request matching the full device identity and role before returning an ID. (src/OpenClaw.SetupEngine/ApprovalRequestHelper.cs:174, 4bd18de4a46e)
  • Final approval effect: The selected ID reaches an explicit devices approve command through the production WSL command runner; node approval has the corresponding nodes approve path. (src/OpenClaw.SetupEngine/PairOperatorStep.cs:404, 4bd18de4a46e)
  • Regression coverage: Fake-runner tests cover stale and foreign requests, ambiguous matches, retry baselines, and drain behavior. They do not observe approval I/O against a real Gateway for delayed same-identity requests. (tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs:5456, 4bd18de4a46e)
  • Exact-head live proof and acknowledged gap: The PR body and maintainer handoff report 22 passing real setup/connect cases on this head, including exact socket-ID operator and node pairing. They explicitly say foreign and delayed same-identity requests were not injected into the ID-less path and strict MXC validation was blocked.
  • Repository proof policy: The root policy requires strict MXC validation for gateway setup/connect E2E changes, and the proof-pool inventory assigns WSL pairing to the windows-wsl-gateway-e2e pool. (docs/PROOF_POOLS.md:20, 4bd18de4a46e)

Likely related people:

  • Sebastien Tardif: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Barbara Kudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Scott Hanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture current-head final-effect approval traces for the intended request and the nearest foreign and delayed same-identity requests, including retry.
  • Run strict validate-mxc-e2e.ps1 without -AllowSkip on a BaseContainer-capable host.
  • Settle a pairing-specific in-product recovery route for unavailable or ambiguous ID-less correlation.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-25T23:52:08.621Z sha 897ed05 :: needs real behavior proof before merge. :: [P1] Parse list JSON before declaring the baseline empty
  • reviewed 2026-09-26T00:36:47.589Z sha 511b176 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-26T01:08:32.349Z sha 511b176 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-28T23:47:10.547Z sha 699397e :: needs real behavior proof before merge. :: [P1] Send the new pairing WSL commands through stdin
  • reviewed 2026-09-29T03:42:48.039Z sha c48f939 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-29T04:00:52.145Z sha c48f939 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-29T04:19:39.775Z sha c48f939 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-29T05:11:47.365Z sha 4bd18de :: needs real behavior proof before merge. :: none

@karkarl

karkarl commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator Author

@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.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 26, 2026
@karkarl

karkarl commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator Author

Closeout at 511b17680afb33de2544e9d985a7e4feb434fcf8:

  • Current-head GitHub Build and Test run 36205272379 passed on unchanged-head failed-job retry. The first setup/connect attempt hit the known Gateway SQLite restart-intent contention and cascaded through the shared fixture; the retry passed.
  • ClawSweeper re-reviewed the current head, recognized the parser/drain corrections, and remains needs-human for missing adversarial Gateway final-effect proof and no-skip MXC proof.
  • Local required build, Shared, Tray, SetupEngine, and 50 focused pairing tests pass. Rubber-duck review found no remaining source blocker.
  • Codex autoreview remains blocked because the local Codex CLI is not authenticated; no clean structured result is claimed.
  • No merge was performed. Active maintainer ownership is ending with proof blockers recorded in the PR body.

@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 26, 2026
@bkudiess bkudiess added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 28, 2026
SebTardif and others added 13 commits September 28, 2026 20:20
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
@bkudiess
bkudiess force-pushed the land/pr-1480-pairing-identity branch from 699397e to c48f939 Compare September 29, 2026 03:36
@bkudiess bkudiess removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 29, 2026
@shanselman shanselman added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 29, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 24bce02f-6ab2-4d36-b1f3-ca56f4657dba
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 29, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

@karkarl, final capable-host handoff for exact head 4bd18de4a46e507f93aed04aba38a171f6828b7b.

The local WSL permission problem is resolved without changing global settings: one retry used a task-owned D: temporary directory with verified inherited SYSTEM access and process-local TEMP/TMP. The real SetupAndConnectTests run passed 22 tests, 0 failed, 1 unrelated Ollama-permission skip. It exercised intended operator/node socket-provided exact-ID pairing, paired-state inspection, safe invocation, and existing-pairing preservation after bad tokens/invalid setup codes. Cleanup passed and the temporary directory was removed.

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:

  • ID-less discovery with foreign/stale pending requests: prove zero approval I/O for those requests before the intended request is resolved.
  • .\scripts\validate-mxc-e2e.ps1 on a qualified BaseContainer host, without -AllowSkip; no DACL fallback/skip result may stand in for containment proof.

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.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 29, 2026
@bkudiess

Copy link
Copy Markdown
Collaborator

@karkarl @shanselman, capable-host follow-up to Scott's handoff, on exact head 4bd18de4a46e507f93aed04aba38a171f6828b7b and base 0844c0fa4035d4237c81ea270aceacab725cec1b.

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.

Validation

The Windows 11 Enterprise x64 host (build 26300) reported tier=base-container, needsDaclAugmentation=false, and no probe warnings. OPENCLAW_REPO_ROOT pointed at the clean PR worktree.

Command Result
.\scripts\validate-mxc-e2e.ps1 -ResultsDirectory <proof-output> 17 passed, 0 failed, 0 skipped. No -AllowSkip or DACL fallback.
.\build.ps1 Passed
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,145 passed, 34 skipped, 0 failed
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 3,180 passed, 0 failed
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore 1,423 passed, 1 skipped, 0 failed

The strict run passed RealGateway_SystemRun_ExecutesThroughWindowsNodeMxcSandbox, RealGateway_SystemRun_BlocksWritesToTrayDataDirectoryInMxcSandbox, and the mirrored-WSL-safe listening-port proof. Child-executable and bound-executable allowlist proofs also passed.

Real behavior proof

A 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.

Operator scenario Observed final effect
Foreign request only Zero approval I/O; pending and paired sets unchanged.
Stale same-identity request captured before reconnect Zero approval I/O; stale and foreign requests remained pending.
Fresh intended request, after separately recorded fixture-only rejection of the stale request Exactly one approval, targeting only the fresh intended ID. Intended identity paired and reconnected successfully; foreign identity remained pending and unpaired.

Evidence boundary: the harness passes null at the production AutoApprovePairing recovery-method boundary and invokes production baseline capture. It does not strip IDs from live socket responses or claim a full setup-flow test of naturally missing IDs.

Still not verified: a genuine node socket returned pairing-required, but the Gateway placed its request in devices list; nodes list had no pending entry. Consequently the node ID-less discovery path was not exercised. No synthetic queue, undocumented request RPC, or Gateway security weakening was substituted for that proof.

Retry history and local evidence fingerprints
  • One Shared shutdown test initially observed a SafeFileHandle ObjectDisposedException; its targeted retry and two subsequent full Shared runs passed without source changes.
  • The initial SetupEngine run had 23 failures because the outer local-appdata override defeated the suite's per-test isolation. Correcting only the test-process environment yielded the passing result above.
  • Two initial harness attempts were blocked before pairing. The second recorded HTTP 403 during WebSocket upgrade. Removing the harness-only forwarded-address header, while retaining production Origin behavior, allowed the final operator proof to pass.
  • Local artifacts are retained, not uploaded here. These SHA256 fingerprints identify the evidence; they are not download links:
    • OpenClaw.E2ETests.Mxc.trx: BFB6795E7D80F2F6624CBD90A7620EB3554B5270329731EF1D85A716B8C406E8
    • Final adversarial-result.json: 945CD7594740D70DBA9B46DB9F9A9CFD53E39E1A667C703F7FD8F29757047A68

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 OpenClawTray data were unchanged. No source changes, commits, pushes, PR-body edits, or merge were made.

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.

@karkarl
karkarl merged commit 04a880f into main Sep 30, 2026
28 checks passed
@karkarl
karkarl deleted the land/pr-1480-pairing-identity branch September 30, 2026 18:29
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 8, 2026
…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.
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 16, 2026
…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.
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 16, 2026
…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.
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 19, 2026
…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.
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 27, 2026
…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.
larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Nov 6, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants