feat: manage the OpenClaw gateway inside the isolated session - #48
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 real behavior proof before merge. Reviewed September 17, 2026, 4:02 PM ET / 20:02 UTC (Revision 28). ClawSweeper reviewWhat this changesAdds commands to start, inspect, and stop a detached OpenClaw gateway inside the isolated Windows session, with persisted process identity and supervised cleanup. Merge readiness⛔ Blocked before merge - 5 items remain This remains useful, collaborator-authored work that is absent from the default branch. No blocking code defect was established, but the gateway-specific authority and saved-settings proof gaps remain unresolved. Priority: P2 Review scores
Verification
How this fits togetherThe Windows package launcher sends gateway requests through MXC to a helper inside the isolated agent session. The helper supervises the gateway and returns process and listener observations used by the launcher’s lifecycle commands. flowchart TD
A[Operator gateway command] --> B[Launcher lifecycle controller]
C[Saved configuration and process identity] --> B
B --> D[Validated workspace exchange]
D --> E[MXC guest helper]
E --> F[Supervised gateway process]
F --> G[Process and listener observations]
G --> B
B --> H[Operator status or stop result]
Before merge
Findings
Agent review detailsSecurityNeeds attention: No exploitable defect was established, but the introduced gateway filesystem boundary still needs adversarial production-path evidence. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the scoped lifecycle design and establish gateway-boundary containment plus fresh-install and saved-settings upgrade behavior before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds gateway-management capability; no concrete current-main bug or blocking introduced defect was established. Is this the best way to solve the issue? Yes, the scoped guest supervisor and identity-checked lifecycle fit the package’s external-supervision model; acceptance still depends on the identified authority and upgrade evidence. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 685ee93b7ebb. LabelsLabel 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 (27 earlier review cycles; latest 8 shown)
|
839ee67 to
78ed69e
Compare
78ed69e to
16e48d3
Compare
16e48d3 to
eabfd0f
Compare
eabfd0f to
fd829bc
Compare
fd829bc to
3703d77
Compare
e66472d to
6ff017c
Compare
6ff017c to
6d75843
Compare
6d75843 to
8d98367
Compare
16673a8 to
eb2fdba
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
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
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
eb2fdba to
056de40
Compare
What Problem This Solves
An isolated gateway needs explicit lifecycle control and ownership checks so an operator does not accidentally stop a different process listening on the same port.
User Impact
clawctl gateway-service start,status, andstopmanage a gateway in the owned session. The service is detached from the calling console and is stopped with its kill-on-close job.Why This Change Was Made
Gateway supervision records ownership using PID and process creation time, and verifies listener ownership. When
--portis omitted, OpenClaw's owngateway.portconfiguration wins;--portis used only when the operator pins it.Review fixes addressed
PathPrefixand prepended to the guest PATH; no host PATH replaces the guest environment.gateway-service stopremains conservative.Current validation
Current layer head:
056de40546c2e40ab40864bf6d9b659184a4382f. 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 6 of 12. Parent: #47 - feat/session-agent-shell. Child: #49 - feat/session-logon-recovery