feat: add the pinned MXC isolation backend - #44
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 maintainer review before merge. Reviewed September 17, 2026, 4:01 PM ET / 20:01 UTC (Revision 16). ClawSweeper reviewWhat this changesAdds a pinned Microsoft isolation runtime to Windows packages, an internal session transport, readiness checks, and packaging integrity validation. Merge readiness✅ Ready for maintainer review This remains a useful, distinct backend layer absent from the default branch. The reviewed changes address the earlier executor and packaging problems, and no actionable introduced defect remains. Priority: P2 Review scores
Verification
How this fits togetherThe Windows launcher packages and starts OpenClaw. This layer supplies the native isolation runtime and translates future session lifecycle requests into its protocol; user-facing lifecycle commands arrive in a later PR. flowchart LR
A[Pinned npm archive] --> B[Integrity and architecture checks]
B --> C[Windows package]
C --> D[Runtime locator]
E[Session lifecycle requests] --> F[Internal protocol adapter]
D --> F
F --> G[Native isolation runtime]
G --> H[Results and readiness]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep the preview CLI protocol behind the internal session interface so the official SDK can replace it without changing lifecycle callers. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds backend infrastructure rather than reporting a remaining existing-behavior bug; no blocking defect was established by source review. Is this the best way to solve the issue? Yes: the internal adapter follows the pinned dependency contract and keeps preview protocol details out of future lifecycle callers. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 685ee93b7ebb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (15 earlier review cycles; latest 8 shown)
|
803fbe6 to
19179b2
Compare
5ab2a0d to
704ac2e
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
704ac2e to
69d80ab
Compare
69d80ab to
c8cc6d5
Compare
c8cc6d5 to
b8487fb
Compare
ff2463e to
1975cc7
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97c31f3f-0c7b-43e8-b979-6418dcb7fedc
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97c31f3f-0c7b-43e8-b979-6418dcb7fedc
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97c31f3f-0c7b-43e8-b979-6418dcb7fedc
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97c31f3f-0c7b-43e8-b979-6418dcb7fedc
1975cc7 to
c1fa8f0
Compare
What Problem This Solves
The session lifecycle needs an isolation backend before it can create an agent session, but the intended
Microsoft.Mxc.Sdkis unreleased.User Impact
There is no user-visible session command yet. Contributors gain a pinned, inspectable MXC transport and runtime acquisition path that later lifecycle work can call.
Why This Change Was Made
The MXC runtime is a pinned CLI backfill standing in for the unreleased
Microsoft.Mxc.Sdk;IMxcSessionClientis the seam that the official SDK will replace.mxc-runtime.lock.jsonandGet-MxcRuntime.ps1acquire the runtime with provenance rather than accepting an ambient tool.Build-MSIX.ps1stages the pinned files intocontent\mxc\<architecture>, and the launcher project packages them asmxc\<architecture>. In the installed package,MxcRuntimeLocatorresolves that directory and supplieswxc-exec.exetoMxcCliSessionClient.The transport carries the MXC wire protocol and readiness probing needed by later provisioning code. PR #46 is the first consumer:
SessionRuntime.Createconstructs this client for provisioning, start, stop, deprovision, and attached execution. This layer deliberately does not create a session or expose lifecycle commands.It adds a third-party runtime to package content and to signing/trust inputs. The official SDK must replace the backfill through
IMxcSessionClient, not by spreading CLI assumptions through the lifecycle.Review fixes addressed
Buffered executor calls now receive stdin EOF, reject pre-cancelled requests before spawning, and kill and await the owned process tree before returning cancellation. Real-process regressions prove EOF, no-spawn cancellation, and no surviving PID. Clean MSIX composition now stages and verifies the pinned architecture-specific MXC runtime before MSBuild; a missing-runtime reproduction completed NativeAOT and produced the unsigned x64 MSIX. Attached calls initialize UTF-8 inside console capture, fixing the observed
ΓÇöoutput while restoring the caller codepage.Current validation
Current layer head:
c1fa8f0765850bdec24075c90c7d25a9f8b72b73. This layer is included in the final integrated stack tipcce2b02f3acd5791654b7a6b1a5a9c27db5ff63brebased onto685ee93b7ebbec1e784205a3544c460bea740e11.Integrated local gates: exact .NET SDK 10.0.100;
Test-DotNetQuality.ps1with 0 warnings/errors; full solution tests 642/642; NativeAOT x64 and ARM64 publishes for both launcher and session host; NativeAOT CLI, deployment, MXC, signing, runtime-input, release-identity, bundle, isolation-plugin, and packaging-relevance policy suites.Live x64 MXC evidence: final-tip Developer Mode deployment registered
OpenClaw.Gateway_0.1.2451.40134_x64__kaa03rpbbqef6from workflow payload run 35191206689;openclaw --versionreturnedOpenClaw 2026.9.4 (3a9d69d);clawctl statusconfirmed the isolated session was running. Earlier final-tip validation also exercised setup, Node.js 24.20.0 reuse, package-qualified activation, detached gateway launch, and redacted diagnostics collection.Signed package evidence: local NativeAOT x64 and ARM64 packages and a multi-architecture bundle were composed and test-signed. Elevated upgrade validation passed all four proof-release transitions (
v0.0.0.0andv0.0.0.1, standalone and bundle), retained package-family LocalState in every transition, and accepted fresh standalone and bundle installs. The temporary certificate and test package were removed, then the Developer Mode registration was restored.Layer 2 of 12. Parent: #43 - improve/session-console-environment