feat: reset an installation with clawctl setup --fresh - #52
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:01 PM ET / 20:01 UTC (Revision 26). ClawSweeper reviewWhat this changesAdds an explicit installation reset with pre-reset diagnostics, optional forced recovery, bounded local cleanup, and sanitized gateway log output. Merge readiness⛔ Blocked before merge - 5 items remain This remains useful work absent from the default branch. The reviewed fixes address the earlier code concerns, but destructive-reset authority still needs focused production-path evidence before merge. Priority: P2 Review scores
Verification
How this fits togetherThe Windows launcher manages the packaged OpenClaw runtime and its isolated agent session. Reset combines operator flags, saved ownership records, backend teardown, and local filesystem cleanup before provisioning a replacement session. flowchart TD
A[Operator requests fresh setup] --> B[Validate package and session support]
B --> C[Lock lifecycle and save diagnostics]
C --> D[Remove owned session and recovery]
D --> E{Cleanup confirmed or force selected}
E -->|No| F[Report incomplete reset]
E -->|Yes| G[Clear validated local roots]
G --> H[Provision session and report result]
Before merge
Findings
Agent review detailsSecurityNeeds attention: No concrete exploit was established, but the destructive authority boundary retains a material proof gap. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the explicit, bounded reset design with final-effect containment proof and observable recovery guidance when forced cleanup leaves external resources behind. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request; no new concrete code defect was established, and the destructive Windows path was not executed during this read-only review. Is this the best way to solve the issue? Yes, the explicit lifecycle-locked reset is a coherent extension of existing teardown and setup; merge confidence still depends on proving containment and recovery through the production boundary. 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 (25 earlier review cycles; latest 8 shown)
|
d4ecc6d to
5c47bf5
Compare
5c47bf5 to
a74bd3a
Compare
a74bd3a to
baa3c4d
Compare
baa3c4d to
a730598
Compare
da65d8d to
378a702
Compare
ffdf8fd to
3efca09
Compare
3efca09 to
abc7020
Compare
abc7020 to
24128ae
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
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
What Problem This Solves
An operator needs a bounded reset path for a broken installation that stays within owned agent data and reports cleanup failures accurately.
User Impact
clawctl setup --freshperforms a lifecycle-locked reset with pre-reset diagnostics. It is destructive to that installation's agent data;--fresh --forcecan proceed while explicitly reporting resources it could not remove.Why This Change Was Made
The reset captures diagnostics before removal and validates the complete ancestor chain before recursive cleanup, keeping deletion within owned paths. It is a bounded installation reset, not a general machine cleanup tool.
Review fixes addressed
clawctl setup --no-isolationon that unsupported build. On a supported build,--no-isolationremains session-free host-runtime setup.Detailreturned by inspection is restored toclawctl gateway-service statusandstopoutput.--fresh.Current validation
Latest review hardening: unpackaged automatic direct routing no longer creates a session runtime, and ANSI sanitization consumes complete CSI sequences so control parameters cannot leak into rendered output.
Current layer head:
d550ecaae7f0ec009e457431a13174143b0d6244. 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 10 of 12. Parent: #51 - fix/session-lifecycle-recovery. Child: #53 - docs/session-runtime