Repository navigation
fix: persist configure changes before gateway checks - #125751
Conversation
Local mode is persisted before health and daemon actions, and failed actions no longer receive a bare success outro.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready evidence for #125751 Root cause: in interactive configure, choosing Local only mutated Architectural owner and canonical fix: Production LOC: +55/-20 (net +35). Tests: +170/-21 (net +149). The production growth is the explicit owner state and side-effect outcome contract required to eliminate false-success states. Sibling coverage: remote setup's existing commit-before-health path, explicit section ordering, interactive config-producing sections, no-section Local persistence, default-agent ownership, daemon success/failure/skip, health success/failure/skip, and channel removal copy. Pre-fix order proof: Local commands: node scripts/run-vitest.mjs src/commands/configure.wizard.persistence.test.ts src/commands/configure.wizard.test.ts src/commands/configure.wizard.default-agent.test.ts src/commands/configure.daemon.test.ts src/commands/configure.channels.test.ts
node scripts/check-changed.mjs -- src/commands/configure.wizard.ts src/commands/configure.wizard.test.ts src/commands/configure.wizard.persistence.test.ts src/commands/configure.daemon.ts src/commands/configure.daemon.test.ts src/commands/configure.channels.ts src/commands/configure.channels.test.ts
.agents/skills/autoreview/scripts/autoreview --mode uncommittedResults: focused proof passed 5 files / 47 tests before rebase and 5 files / 50 tests after rebase; the full changed gate exited 0; fresh autoreview reported no accepted/actionable findings with patch-correct confidence 0.98. Exact-head CI: run 32121573454 completed success for source head ClawSweeper: the latest exact-head comment remains the review-started placeholder. No findings or Known source-blind proof gaps: isolated |
|
Merged via squash.
|
Local mode is persisted before health and daemon actions, and failed actions no longer receive a bare success outro.
Closes #125749
What Problem This Solves
Fixes an issue where operators starting with
gateway.mode=remotecould choose Local, run only Health check or Daemon, and finish with a configuration-success message even though Local had not been persisted before the side effect. It also corrects channel-removal copy that described removal as complete before the owning config write.Why This Change Was Made
The configure wizard now explicitly tracks pending versus persisted config and durably flushes pending changes before daemon or health side effects. Daemon and health paths return closed outcomes so completion text reflects failures or side-effect-only runs, while channel removal uses intent-only precommit wording. This changes no authentication, config schema, public API, dependency, or broader product behavior.
User Impact
Selecting Local now survives the configure flow before gateway checks or daemon setup run, and the final message truthfully distinguishes configuration writes, successful or skipped side effects, and failed side effects.
Evidence
Pre-fix ordering proof:
Focused regression command:
a80ffd043168fa2e5c20323f59ffffc80d94f4ee: 5 files, 50/50 tests passed.Full changed gate:
Exit 0 before and after rebase; dead exports, core production/test typechecks, lint, formatting, import cycles, architecture, and repository guards passed.
Fresh post-rebase Codex autoreview: clean, no accepted/actionable findings, patch-correct confidence 0.98.
Production LOC: +55/−20 (net +35). Tests: +170/−21 (net +149). The production growth is the explicit pending/persisted owner state and closed side-effect outcome contract required to prevent false success; no config/API/schema/dependency surface was added.
Source-blind live proof gap: an isolated
pnpm openclaw configureattempt could not reach prompts because a dirty-watched-tree artifact rebuild remained in progress under host contention. The daemon live flow was intentionally not attempted because it could alter the operator's real service. Focused tests are not presented as live proof.AI-assisted: Yes.