diff --git a/src/commands/doctor-config-preflight.process.test.ts b/src/commands/doctor-config-preflight.process.test.ts index e156ba2b43ba..9a0012471510 100644 --- a/src/commands/doctor-config-preflight.process.test.ts +++ b/src/commands/doctor-config-preflight.process.test.ts @@ -16,6 +16,8 @@ import { closeOpenClawStateDatabaseForTest } from "../state/openclaw-state-db.js const STARTUP_REFUSAL = "OpenClaw startup migrations did not complete cleanly; refusing to report the gateway ready."; +const STARTUP_RECOVERY = + 'Run "openclaw doctor --fix" against the same state/config, then restart the gateway.'; const tempDirs = useAutoCleanupTempDirTracker(afterEach); function runIsolatedModuleScript(env: NodeJS.ProcessEnv, script: string) { @@ -130,6 +132,7 @@ describe("gateway startup-migration refusal", () => { expect(result.status, output).toBe(1); expect(result.signal, output).toBeNull(); expect(result.stderr).toContain(STARTUP_REFUSAL); + expect(result.stderr).toContain(STARTUP_RECOVERY); expect(result.stderr.split(STARTUP_REFUSAL)).toHaveLength(2); expect(result.stderr).not.toContain("[openclaw] Could not start the CLI."); expect(hasActiveStartupMigrationLease({ env })).toBe(false); diff --git a/src/commands/doctor-config-preflight.ts b/src/commands/doctor-config-preflight.ts index 95cf5c843642..0306324d0f09 100644 --- a/src/commands/doctor-config-preflight.ts +++ b/src/commands/doctor-config-preflight.ts @@ -169,7 +169,7 @@ function formatStartupMigrationFailure(params: { warnings: string[]; blockers: s return [ "OpenClaw startup migrations did not complete cleanly; refusing to report the gateway ready.", ...details, - 'Run "openclaw doctor --fix" against the mounted state/config, then restart the container.', + 'Run "openclaw doctor --fix" against the same state/config, then restart the gateway.', ].join("\n"); }