refactor: add a replaceable node runtime and sidecar adapter proof - #1068
giodl73-repo wants to merge 33 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 1:10 AM ET / 05:10 UTC. ClawSweeper reviewWhat this changesThe PR adds a replaceable node-runtime interface, moves Windows capability execution into a shared dispatcher, and adds a non-selectable C# conformance adapter for a proposed authenticated sidecar protocol. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 9 items remain Keep open. The branch is conflicted with current main and its new runtime contract omits main’s protocol-compatibility notification path; it also combines three independently risky ownership transfers whose sidecar authority boundary has only in-process proof. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherGateway connections create a Windows node runtime, then NodeService registers native capabilities before the runtime handshake. Gateway or sidecar invocations flow through the shared dispatcher to Windows handlers, which return results and connection status to the gateway and local MCP consumers. flowchart LR
G[Gateway connection request] --> C[Node connection coordinator]
C --> F[Runtime factory]
F --> R[Default Windows runtime]
R --> D[Shared capability dispatcher]
S[Authenticated sidecar frames] --> A[Sidecar adapter]
A --> D
D --> H[Windows capability handlers]
H --> O[Gateway and MCP results]
Decision needed
Why: The adapter intentionally has no selectable runtime, process launch, protected bootstrap, or concrete IPC, so deciding whether its source-only conformance implementation belongs in this repository is a product and ownership choice. Before merge
Findings
Agent review detailsSecurityNeeds attention: The sidecar adapter crosses into native capability execution, but the proposed authenticated boundary has no real process or protected-handoff proof at the current head. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Split and rebase the work: preserve current protocol compatibility in a small runtime/dispatcher change, and keep the sidecar adapter as conformance work until the upstream contract is accepted and can receive real process, gateway, and authority-boundary proof. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence merge reproduction: current main forwards protocol compatibility through the node connector, while the new runtime interface omits that event and the PR is conflicted with main. Is this the best way to solve the issue? No. A rebased seam must preserve the current-main compatibility contract, and the three ownership transfers should not be landed as one source-only sidecar experiment. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68. LabelsLabel 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 (38 earlier review cycles; latest 8 shown)
|
69fe021 to
194928f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3ca913a to
711fe09
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing the stale speculative sidecar bundle. It lacks current compatibility propagation and protected IPC proof; preserve the design in a smaller proposal if sponsored. |
Summary
Adds one replaceable Windows node-runtime boundary, one shared Windows capability
dispatcher, and a non-selectable C# conformance consumer of OpenClaw's proposed
authenticated Rust sidecar contract. It is independent contract proof, not a
second production runtime.
This consolidated Windows adopter PR now:
INodeRuntimeClientand an injectable factory while keepingWindowsNodeClientselected by default;NodeServiceand A2UI consumers behind that runtime contract;cancellation, telemetry, and completion into the transport-independent
NodeCapabilityDispatcher;cancelled candidates without blocking later reconnects;
configuration, admission, invocation, cancellation, result, and status
contracts proposed by OpenClaw PR3; and
NodeCapabilityDispatcher, without adding a second Windows policy orexecution path.
The former stacked fork proof
#2 has been
fast-forwarded into this branch. The C# runtime remains the production default.
Position in the series
Gateway client, bounded node-host foundation, headless binary, and Linux
Tauri convergence.
lifecycle/reconnect, duplex invocation, admission, Gateway authority,
connection manifests, and shared conformance.
authenticated/versioned sidecar framing, handshake, immutable configuration,
and the bounded ordinary-command runtime bridge.
independent C# adopter proof.
OpenClaw and
openclaw-windows-nodeare separate repositories, so this PRcannot be Git-rebased onto #116863. The dependency is contractual: this branch
pins and reproduces #116863's three fixture corpora at OpenClaw head
71c1c8cb23c5647dc07fd4ee1f8663068c92a482. Production Rust selection remainsblocked until that contract is accepted and the remaining adoption gates close.
Ownership boundary
RFC #54 proposes that OpenClaw own the reusable protocol, Gateway authority
semantics, Rust runtime, and conformance corpora. Under that boundary, Windows
retains WinUI, operator behavior, MCP, approvals, native capability handlers,
process/artifact verification, protected bootstrap, concrete IPC, audit,
packaging, rollout, and rollback.
WindowsNodeClientstill owns production Gateway wire parsing and responseframing.
NodeCapabilityDispatcherowns Windows capability execution. Thesidecar adapter can only deliver authenticated, admitted ordinary invocations
into that dispatcher; it is not an
INodeRuntimeClient, launches no process,chooses no transport, and cannot be selected.
The generic Rust runtime still rejects the reserved
system.*namespace. Theexisting Windows
system.runfamily therefore stays on C# until OpenClaw ownsan explicit authorization mechanism.
Remaining adoption gates
Before Rust can become selectable, Windows still needs verified artifact/process
launch, protected credential handoff, concrete local IPC, live Gateway pairing
and issued-token lifecycle, duplex sidecar input/progress/heartbeat transport,
process/crash supervision, health and resource proof, product audit export,
packaging, rollout, and rollback.
Validation
RustSidecar/NodeCapabilityDispatchertests — 63/63 passedNodeConnectorConnection tests — 22/22 passedwin-x64projects built; 60 focused sidecar, 3,462Shared, 2,023 Tray, and 519 Connection tests passed
./scripts/validate-mxc-e2e.ps1on the runtime-seam head — 2/2 live Gateway MXC tests passedgit diff --check— passedsecurity reviews — all findings resolved; exact combined-head passes clean
The combined Windows head is
711fe095028a025fa0649c9b8e20f480644a6967. The rebase preserves the currentfail-closed pre-credential handshake authorization gate through the generic
runtime seam. The adapter review also fixed
cancellation/registration races, response ordering, admission lifetime,
handshake role/version binding, result/envelope bounds, serde-compatible typed
and untyped number handling, and bounded canonicalization across
JsonElement,JsonNode, andJsonDocument.Real behavior proof
Behavior or issue addressed:
Windows needs one migration-safe execution boundary that preserves current
Gateway-to-native behavior while proving that the OpenClaw sidecar contract can
be consumed independently without bypassing Windows policy or handlers.
Real environment tested:
Windows 11, .NET SDK 10.0.302, combined head
711fe095028a025fa0649c9b8e20f480644a6967, OpenClaw sidecar fixtures from71c1c8cb23c5647dc07fd4ee1f8663068c92a482, and the existing live Gateway/MXCproof collected on runtime-seam head
c0cfa8ba66802e601de23875b07caf941209e554. The sidecar proof is an in-processsource harness; it does not launch an external Rust binary.
Exact steps or command run after this patch:
cancellation, result, and status flows.
NodeCapabilityDispatcher.cancellation, and resource-bound failures.
for successful contained
system.runand denied tray-data writes.Evidence after fix:
The rebased head passes 63 focused sidecar/dispatcher tests, 3,701 Shared tests,
and 22 focused Connection tests. Prior-head larger-suite evidence and the
retained live MXC transcript remain recorded; MXC reports 2/2 passed: contained
system.runreturnedOPENCLAW_GATEWAY_SYSTEM_RUN_MXC_OK, and a write outsidethe sandbox failed with
Access is deniedandfileExists=False.Observed result after fix:
The incumbent C# runtime still executes real Gateway commands through the shared
dispatcher. Independently, the non-selectable adapter accepts the exact
OpenClaw sidecar contracts, routes ordinary admitted commands into that same
dispatcher, and fails closed on authentication, ordering, identity, admission,
cancellation, serialization, and output/work-bound violations.
What was not tested:
No Rust process was launched; no concrete IPC or protected bootstrap was used;
no live Gateway session selected the Rust runtime; and no
system.*sidecarcommand, crash recovery, production audit, resource measurement, packaged
artifact, rollout, or rollback was exercised. Production selection remains the
existing C#
WindowsNodeClient.