feat: run commands through an attached session guest helper - #45
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 18). ClawSweeper reviewWhat this changesAdds a packaged Windows guest helper that reads JSON launch requests, runs attached commands without shell interpretation, and records their results. Merge readiness✅ Ready for maintainer review Keep open: this is a distinct, useful layer absent from current main and the latest release. No blocking defect was found in the introduced changes; the collaborator-authored stack remains active. Priority: P2 Review scores
Verification
How this fits togetherThe Windows package launches OpenClaw and bundles its runtime dependencies. This layer adds a guest-side execution helper for later isolated-session commands, accepting executable, argument, environment, and working-directory data and returning a separate execution result. flowchart LR
A[JSON launch request] --> B[Guest helper]
B --> C[Validate request and attached mode]
C --> D[Launch child without shell]
D --> E[Inherited console streams]
D --> F[Exit code and result file]
C --> G[Failure result]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one versioned guest request protocol and package its helper together with the launcher, leaving session ownership and routing to the dedicated lifecycle layer. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR introduces internal execution plumbing rather than reporting a current-main failure; runtime behavior was not executed during this read-only review. Is this the best way to solve the issue? Yes: a source-generated JSON request and shell-free guest launcher fit the existing MXC string-command boundary without introducing a competing user-facing route. 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 (17 earlier review cycles; latest 8 shown)
|
79d2015 to
d068497
Compare
d068497 to
64bb0c1
Compare
64bb0c1 to
4637b8c
Compare
61d525c to
3742845
Compare
3742845 to
20718e4
Compare
20718e4 to
b662b13
Compare
29254ed to
9f58a64
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
9f58a64 to
b0e304a
Compare
What Problem This Solves
Commands need a NativeAOT-safe way to reach a session guest without relying on a shell or flattening caller arguments into a command line.
User Impact
There is no user-visible invocation yet. The later session commands have a transport that preserves arguments exactly across the host/guest boundary.
Why This Change Was Made
The v1
SessionLaunchProtocoldefines the request/result contract between host and guest.openclaw-session-hostis the NativeAOT guest helper, andSessionProcessLauncherstarts it without a shell.Arguments cross that boundary as JSON rather than a flattened command line, avoiding Windows quoting and tokenization changes. The protocol is established now, but no command invokes it in this layer.
This is intentionally execution plumbing only: session ownership, provisioning, routing, and end-user commands are deferred to the lifecycle layer.
Review fixes addressed
The helper now rejects every non-
Attachedmode, including undefined numeric enum values, before calling the process launcher. A regression proves no launch occurs. The later gateway layer explicitly evolves this contract to supportDetached.Current validation
Current layer head:
b0e304adee62aa6caf49a68e0fa9e49ef979ec7e. 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 3 of 12. Parent: #44 - feat/session-mxc-backend