feat: restart the managed gateway after sign-in - #49
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: blocked before merge. Reviewed September 17, 2026, 4:01 PM ET / 20:01 UTC (Revision 27). ClawSweeper reviewWhat this changesAdds per-user gateway restart after Windows sign-in through a scheduled task or Startup-folder fallback, using a package-bound management entrypoint. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this remains a distinct contribution absent from current main and belongs to an active collaborator-owned stack. The earlier concrete findings are addressed. Priority: P2 Review scores
Verification
How this fits togetherThe Windows launcher manages OpenClaw’s isolated gateway session. Setup registers sign-in recovery, which activates the installed package’s management command to restart that gateway. flowchart TD
A[Explicit setup] --> B[Register recovery]
B --> C[Per-user scheduled task]
B --> D[Startup-folder fallback]
C --> E[Shared package activation script]
D --> E
E --> F[Management entrypoint]
F --> G[Owned gateway session]
Decision needed
Why: The released package already exposes clawctl under App, and the supplied pre-release isolation decision does not explicitly settle compatibility for that existing alias. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain package-bound recovery while preserving installed alias preferences and demonstrating working dispatch and sign-in recovery across the supported package upgrade. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds automatic sign-in recovery; it is not a reproduced current-main bug. Alias upgrade behavior remains unverified. Is this the best way to solve the issue? Yes, the shared package-bound activation path is a coherent solution and avoids versioned executable paths; its installed-alias compatibility still needs resolution. 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:
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 (26 earlier review cycles; latest 8 shown)
|
3ce959e to
cae697b
Compare
cae697b to
dbc9c60
Compare
dbc9c60 to
ef8f740
Compare
ef8f740 to
4c809aa
Compare
5bcbb60 to
9af89b5
Compare
9af89b5 to
91c0983
Compare
91c0983 to
876965c
Compare
876965c to
3070fe4
Compare
3070fe4 to
3a11ece
Compare
3a11ece to
e591968
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
e591968 to
7130e29
Compare
What Problem This Solves
A managed gateway must restart after sign-in so a completed setup does not leave the operator to start it manually.
User Impact
Setup reports recovery state. The managed gateway restarts at user logon through a per-user scheduled task, with a Startup-folder fallback if task registration is refused.
Why This Change Was Made
One generated launcher is shared by both recovery lanes, making their command behavior reviewable and preventing them from diverging. This layer adds recovery registration; it does not add diagnostic collection or fresh reset.
Review fixes addressed
clawctl.exeapp execution alias rather than a versioned installation path or the agent entrypoint. Existing actions with the old versioned path are treated as drift and repaired.schtasksXML remains UTF-16 with a BOM as required by that tool.Current validation
Latest hosted follow-up: CodeQL traced generated recovery-file operations to .NET's environment-sensitive Startup-folder lookup. Recovery now resolves the Windows Startup known folder directly with
SHGetKnownFolderPathbefore constructing any managed path; the 40 focused persistence tests, static-analysis quality gate, full 628-test suite, and x64 NativeAOT launcher publish pass.Latest review hardening: generated activation C# now uses Windows PowerShell 5.1-compatible predeclared
outvariables. A regression test extracts the emitted source and compiles it with inbox Windows PowerShell 5.1.Current layer head:
7130e294640f04fe712624cdaf52094b761263f2. 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 7 of 12. Parent: #48 - feat/session-gateway-service. Child: #50 - feat/session-diagnostics