Repository navigation
fix: startup migration refusal suggests restarting a container - #119406
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 4, 2026, 10:10 PM ET / August 5, 2026, 02:10 UTC. ClawSweeper reviewWhat this changesThis PR makes startup-migration recovery guidance install-neutral and adds a process-level assertion for the updated text. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 2 items remain Keep this PR open: current main still sends container-specific recovery text through every Gateway startup, and the branch corrects that shared diagnostic without changing migration behavior. No patch correctness finding was identified; real operator-visible proof is still needed before merge. Priority: P3 Review scores
Verification
How this fits togetherGateway startup runs a migration preflight before reporting readiness. A failed preflight prints its owned recovery message, after which the operator runs Doctor against the active state/config and restarts the Gateway. flowchart LR
A[Gateway startup] --> B[Migration preflight]
B --> C{Migrations ready?}
C -->|No| D[Startup refusal]
D --> E[Doctor repair]
E --> F[Gateway restart]
C -->|Yes| G[Gateway ready]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +3. Total +3 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the generic wording in the shared formatter, retain container-specific instructions in container documentation, and attach a redacted non-container terminal capture of the corrected refusal before merge. Do we have a high-confidence way to reproduce the issue? Yes—source establishes that every Gateway startup checkpoint refusal uses the shared container-specific formatter, including non-container gateway runs. Is this the best way to solve the issue? Yes—the shared formatter is the correct owner because callers do not identify a container runtime, while container-only documentation can remain specific. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6a8e11e63cee. LabelsLabel changes:
Label 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
|
|
Land-ready proof for
PR #114678's state-directory classification repair remains separate and untouched. The previous ClawSweeper proof request was applied by adding the redacted real-Gateway terminal capture to the PR body. |
|
Merged via squash.
|
* origin/main: (22 commits) refactor(plugins): consolidate lifecycle hook dispatch (#119429) fix(ci): stabilize TUI PTY proof ownership (#119420) test(system-agent): reduce suite setup overhead (#119424) fix(ui): keep session rail pill status from overlapping the headline (#119397) fix(discord): avoid doctor runtime loading (#119391) fix(media): decouple playback cache retention (#119417) fix(slack): infer upload filename extensions from MIME types (#119399) refactor(channels): unify configured binding resolution (#119414) refactor(google-meet): unify gateway and tool dispatch (#119413) test(state): reuse legacy database fixtures (#119423) fix(reset): preserve bootstrap guidance for dynamic models (#119179) fix(chutes): honor serving context limits (#119196) refactor(status): consolidate scan projections and lazy loaders (#119412) fix(status): status --all slows down with missing plugins (#119203) refactor(gateway): consolidate usage reporting and caches (#119409) perf(gateway): keep reload and recovery machinery off gateway cold start (#119094) fix(cli): align TaskFlow controller columns for wide text (#118801) fix: make startup migration restart guidance install-neutral (#119406) fix(ci): preserve cache warmer shard envelopes (#119403) fix(sessions): preserve compatible auth profiles on model changes (#117550) ...
Related: #112395
What Problem This Solves
Fixes an issue where operators using npm, launchd, systemd, or other non-container installs could be told to restart a container when startup migrations refused Gateway readiness.
Why This Change Was Made
The refusal text originated in a container-image migration flow but now serves every Gateway startup method. The remediation now tells operators to run
openclaw doctor --fixagainst the same state/config and restart the Gateway, without assuming a container or service manager.This is intentionally separate from #114678: it changes only operator guidance and does not alter state-directory classification or migration behavior.
AI-assisted: yes.
User Impact
Operators now receive recovery guidance that is accurate for managed services, foreground processes, containers, and externally supervised Gateways.
Evidence
node scripts/run-vitest.mjs src/commands/doctor-config-preflight.process.test.ts— 2 tests passed, including the real-process refusal output, exit status, single emission, and lease cleanup../node_modules/.bin/oxfmt --check --threads=1 src/commands/doctor-config-preflight.ts src/commands/doctor-config-preflight.process.test.ts— passed.node scripts/run-oxlint.mjs src/commands/doctor-config-preflight.ts src/commands/doctor-config-preflight.process.test.ts— passed.git diff --check— passed.node scripts/check-changed.mjs -- ...could not acquire a ready Crabbox provider; the targeted trusted-source local fallback checks above passed.Real non-container Gateway proof
Ran the actual foreground Gateway from the PR head with an isolated config/state root and a real conflicting plugin-state sidecar. This is a non-container process; temporary paths were omitted from the capture.
The capture confirms the operator-visible refusal uses install-neutral guidance, exits 1, and contains no
restart the containerinstruction.