openclaw/extensions/memory-core/doctor-contract-api.ts
Peter Steinberger fc2a110841
fix(memory): preserve historical dreaming jobs until Doctor repair (#157616)
* fix(memory): keep legacy dreaming cron repair in Doctor

Runtime reconciliation preserves historical and ambiguous dreaming rows and
manages only canonical declarations. The memory plugin classifies historical
jobs, while the cron store owns non-creating inventory, verified backup,
current-authority checks and atomic partition-local repair.

Preserve survivor IDs, ordering and runtime state; retain custom prompts and
foreign declarations. Remove the old core payload migration and runtime
adoption path. Published 2026.9.6 updater-child repair, exact backup retention
and repeated Doctor idempotence passed, with the landed plugin-inventory
handoff repair included in the proof candidate.

* docs(plugins): clarify trusted Doctor cron repair authority

* test: validate dreaming cron through public plugin boundaries

* fix(memory): keep authored tags from blocking dreaming

Warn about authored cron jobs that retain historical dreaming tags without
blocking creation or updates of the canonical dreaming declaration. Keep
Doctor responsible for recognized legacy and phase rows.

Extend the registered SQLite regression and published-updater scenario to
retain an independent authored tagged job through Doctor and real Gateway
convergence, then verify a settled plugin reload and preserved history.
2026-09-25 01:35:42 -07:00

18 lines
723 B
TypeScript

import type { PluginDoctorStateMigration } from "openclaw/plugin-sdk/runtime-doctor-migrations";
import { dreamingCronMigration } from "./src/migration/doctor-dreaming-cron.js";
import { dreamingStateMigration } from "./src/migration/doctor-dreaming-state.js";
import { hostEventsStateMigration } from "./src/migration/doctor-host-events.js";
import {
memorySidecarStateMigration,
qmdLocksStateMigration,
qmdWorkspaceStateMigration,
} from "./src/migration/doctor-memory-sidecar.js";
export const stateMigrations: PluginDoctorStateMigration[] = [
hostEventsStateMigration,
dreamingStateMigration,
dreamingCronMigration,
memorySidecarStateMigration,
qmdWorkspaceStateMigration,
qmdLocksStateMigration,
];