fix: make startup migration restart guidance install-neutral (#119406)

This commit is contained in:
Peter Steinberger
2026-08-04 19:28:27 -07:00
committed by GitHub
parent 392e1c0620
commit 195b0ea3fa
2 changed files with 4 additions and 1 deletions
@@ -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);
+1 -1
View File
@@ -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");
}