Repository navigation
fix: preserve definite command refusals in Gateway responses - #1794
Conversation
Extract the independently reviewed reliability seam without the held native timeout consumer. No change to executor releases, package pins or sandbox enforcement.
Expose the actual synthetic-loopback response envelopes through the existing test output channel for public behavior receipts. Preserve every refusal, infrastructure-error and zero-runner-call assertion. No product or native dependency changes.
|
🦞👀 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 maintainer review before merge. What this changesPreserves confirmed command refusals in Gateway responses while distinguishing unavailable policy, prompt failures, and uncertain execution outcomes. Example: The Windows owner denies a system.run request for ["where.exe", "cmd.exe"].
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: current main still loses structured command-refusal codes, and this PR supplies a useful fix with no actionable code findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway invocations enter WindowsNodeClient, pass through SystemCapability and local approval policy, and reach the MXC runner only when authorized; typed failures return through the existing Gateway response paths. flowchart LR
G[Gateway invocation] --> W[WindowsNodeClient]
W --> S[SystemCapability]
S --> A[Approval coordinator]
A --> P[Policy store and native prompt]
S --> M[MXC command runner]
M --> R[Gateway response]
A --> R
Technical reviewBest possible solution: Land the existing refusal-propagation change once the draft is ready. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically drops structured refusal information when serializing Gateway errors; this review ran no target code. Is this the best way to solve the issue? Typed provenance in the existing approval, runner, and response owners fixes the reporting boundary without weakening execution checks or introducing another authorization path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ed1444b0de69. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
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 HistoryReview history (7 earlier review cycles)
Reviewed October 27, 2026, 12:49 AM ET / 04:49 UTC (Revision 8). |
|
Update from GitHub Copilot triage (not Scott personally): I closed this draft during a batch review without first getting Scott's approval. That was my mistake, and the PR is open again. Sorry for the confusing message. The direction here looks useful. The main concern raised by the current review is that a policy-file read failure may be reported as a confirmed denial. That distinction matters, but this is a draft and there is no rush created by my earlier comment. Please continue when it makes sense for you. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Pin Node 24.22.1 for the current official installer and verify the installed runtime against that same contract. Add an independent runtime response regression. This fixes the proven setup prerequisite, not the unresolved 15-second reload-restoration timeout. Host focused tests: 46 passed, zero skipped. Full guest build, Shared, Tray, and live WSL/MXC proof remain pending. Hold all pushes.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Return the definite pre-execution refusal code for both run commands when the live permission guard rejects a cached invocation. Cover revocation after advertisement on both node wire transports. Co-authored-by: Copilot App <[email protected]>
|
Copilot triage agent here, not Scott. Thank you, Paul. Added the small maintainer patch Validation: |
…w#1794) * fix: preserve definite command refusals in Gateway responses Extract the independently reviewed reliability seam without the held native timeout consumer. No change to executor releases, package pins or sandbox enforcement. * test: capture actual command refusal wire responses Expose the actual synthetic-loopback response envelopes through the existing test output channel for public behavior receipts. Preserve every refusal, infrastructure-error and zero-runner-call assertion. No product or native dependency changes. * fix: preserve refusal provenance through SDK prelaunch checks * test: separate wire execution scratch from protected settings * fix: keep expired approval prompts out of definite refusals * fix: preserve unavailable approval-store provenance without claiming denial * test: isolate disposed-store approval regression * fix(setup): use sqlite-capable Node for official WSL installer Pin Node 24.22.1 for the current official installer and verify the installed runtime against that same contract. Add an independent runtime response regression. This fixes the proven setup prerequisite, not the unresolved 15-second reload-restoration timeout. Host focused tests: 46 passed, zero skipped. Full guest build, Shared, Tray, and live WSL/MXC proof remain pending. Hold all pushes. * fix: preserve refusals after system tools permission is revoked Return the definite pre-execution refusal code for both run commands when the live permission guard rejects a cached invocation. Cover revocation after advertisement on both node wire transports. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Scott Hanselman <[email protected]> Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes: Gateway callers lose a definite command refusal when local approval or execution policy rejects a Windows node command.
User Impact
Callers receive the actual refusal rather than an ambiguous execution failure, without relaxing approval, filesystem policy, or containment requirements.
Why This Change Was Made
Preserve the known outcome through the approval coordinator, command execution and Gateway response. A confirmed refusal remains a refusal; unreadable policy, prompt infrastructure errors and uncertain execution failures remain distinct. The Node prerequisite merges cleanly with main's
24.22.1; there is no remaining GatewayInstallPolicy delta.Published candidate:
c9bf312e9f9a6f5f791e767be06b2a49d87c8068, with parents2521b90d4179674c6cc65c3c74ef9bb3eca4057eandd318127350b5a42586a654ddd3657c28a73c27f9. No runtime source overlay or substituted historical composition is used for the current proof below.Evidence
Fresh exact-head runtime proof: formal WSL -> Gateway -> Windows node -> MXC suite 18/18 PASS, zero skips; six native approval/refusal cases 6/6 PASS. Both used the same freshly built
c9bf312e9f9a6f5f791e767be06b2a49d87c8068app, with no source overlay or version override. The formal suite includes real Gateway command execution and its port-lease contracts.scripts\validate-mxc-e2e.ps1 -NoBuildActual executable SHA256:
83093677A3CD5D0D86EC5B7B519120E02B866144E0F82232E634E2293C2B958A. All 168 frozen executables, DLLs and packaged PowerShell outputs were read back unchanged before/after native proof. The formal in-flight fixture and actual loaded native fixture DLL matched SHA256E8EF0B0D3C1A81A2284B326D1D7E10FA2B6F71379F4DE5D9AC24BD966E492C5E. There is no substituted historical runtime binary.Exact-head formal WSL receipts
Copied completed-run terminal output:
Exact-head native approval and execution
The actual native app process owned all six decisions. Native decisions used real native UI Automation; dispatch used ordinary Gateway/operator/node admission in the disposable fixture. Authenticated MCP
tools/listandtools/call(device.info) additionally bound discovery/version to that app. No host-installed Gateway, credentials, profile, or device pairing was modified. The proof-only native adapter initially mangled WSL JSON arguments; passing its RPC script throughbash -sstdin restored normal dispatch. No source, pairing approval, runtime pin, case assertion or 300-second timeout changed to obtain acceptance.Copied terminal result:
Source and binary correspondence
OpenClaw.Tray.WinUI.exe83093677A3CD5D0D86EC5B7B519120E02B866144E0F82232E634E2293C2B958AOpenClaw.Tray.WinUI.dll0E8F171D97C95CCF7F02197F26B7306D79339BD9A69CF919A1D6AADB89FD91D6OpenClaw.Shared.dll3BD8CE1E2D00A0109B6D26AE12C271BFC8A739F78E65E26C41ECD21944DEC20BMicrosoft.Mxc.Sdk.dll05ADA5E94BE2E2A374CC9E8AEBE04776CB21F7B680AE1DFD460A83A9F527798Fmxc_ffi.dll56B152836698771FBE56D2AB8BE72F2F619031601DD2F00188B95C0FEC2A53DEE32E2D16081CF644F88392934288086E7662529D0D43277C34F7AAD2207CFAFBGenuine product version:
2026.10.7-draft-hub-denial.1+146.Branch.draft-hub-denial.Sha.c9bf312e9f9a6f5f791e767be06b2a49d87c8068.c9bf312e9f9a6f5f791e767be06b2a49d87c8068.Redacted executed-outcome receipt:
{ "sourceHead": "c9bf312e9f9a6f5f791e767be06b2a49d87c8068", "sourceFullHistory": true, "trackedSourceChanges": [], "overlayApplied": false, "versionOverrideUsed": false, "appSha256": "83093677A3CD5D0D86EC5B7B519120E02B866144E0F82232E634E2293C2B958A", "actualCompiledBinaryCount": 168, "actualCompiledBinariesReadBackUnchanged": true, "formalAndNativeSameAppBinary": true, "formal": { "executed": 18, "passed": 18, "failed": 0, "skipped": 0, "allowSkip": false }, "native": { "executed": 6, "passed": 6, "approvalDeadlineSeconds": 300, "lateInvokeRejected": true, "appliedBackendTier": "unknown" } }These are actual exclusive guest-desktop pixels of Console Host windows rendering the completed-run receipts, not generated terminal images. Each capture has a window-owner/time/image/text-hash receipt. All three PNG URLs are pinned to normal fork asset commit
43c4f17cc4db5cfe57665616de6077b268490bb8, parent mained1444b0; anonymous GET returned HTTP 200 for each, and downloaded bytes matched the inspected originals. No upstream upload permission was bypassed. Reviewed receipt archive SHA256:C5397E70E88AD427CCCDC24CC68DCACF0CB13F023BA5B4ABFBD43B2246489473(retained locally, not represented as a public archive URL).Change Type
Scope
winnodeRequired proof pools
windows-wsl-mxc: real Gateway -> Windows node -> MXC behavior, not a Linux-only proxy. The formal exact-head run below supplies the relevant end-to-end evidence; no broader inventory-bound pool completion is asserted.Validation
C:\crabbox\exact1794\tools\pwsh\pwsh.exe -NoProfile -ExecutionPolicy Bypass -File C:\crabbox\exact1794\source\build.ps1: PASS, exit 0.C:\crabbox\exact1794\tools\pwsh\pwsh.exe -NoProfile -ExecutionPolicy Bypass -File C:\crabbox\exact1794\source\scripts\validate-mxc-e2e.ps1 -NoBuild -ResultsDirectory C:\crabbox\exact1794\formal18: PASS, exit 0, actual 18/18/0 skips, no-AllowSkip.dotnet build <owned-payload>\native\NativeProof.csproj -c Debug, thendotnet <owned-payload>\native\bin\Debug\net10.0-windows\win-x64\NativeProof.dll: PASS, exit 0, actual six native cases. The native driver loaded the hash-verified fixture and the same app binary observed in the formal run.Real Behavior Proof
cbx_a892f9f4e147, no provider run URL returned. Gateway2026.10.5, Linux Nodev24.22.1, .NET SDK10.0.402, PowerShell7.6.7, official app-local VC.Tools CRT. Four CPUs / 16 GiB configured; an initial guest-memory observation is not a constant-resident-memory claim.c9bf312e9f9a6f5f791e767be06b2a49d87c8068, genuine full history, no tracked edits, no overlay or version override. Build/runtime interval:2026-10-27T03:04:01.0662261Zto2026-10-27T04:28:22.3713298Z.validate-mxc-e2e.ps1 -NoBuild, six-case native approval/refusal driver, authenticated MCP discovery/invocation, in-flight and final source/binary hash readbacks.Yes/No/N/A) Yes, three commit-pinned real terminal PNGs, anonymous HTTP 200 and image-byte hash matches verified. Raw private logs, credentials and profiles were not uploaded.2026-10-27T04:43:06.0935727Z, verified VM absence and unchanged parent VHDX metadata.Security Impact
Yes/No) No.Yes/No) No.Yes/No) No.Yes/No) Yes, refusal propagation on the existing command surface.Yes/No) No.Yes, explain the risk and mitigation: no command is granted automatically; local approval, pairing, policy and containment remain authoritative. Proof uses only disposable guest/device state, not the developer's host or installed Gateway. Denied canary access is not independent containment-tier attestation.Compatibility and Migration
Yes/No) Yes, existing commands and approval defaults remain.Yes/No) No product configuration migration; the setup prerequisite agrees with main's Node24.22.1.Yes/No) No.Review Conversations