mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
refactor: move task state to shared sqlite
Move task run, delivery, and flow registry persistence onto the shared OpenClaw state SQLite database.
Summary:
- Store task runs, delivery state, and flow runs in state/openclaw.sqlite via the generated Kysely schema.
- Migrate shipped task sidecars into the shared state DB and archive old sidecars, including invalid-config/read-only CLI paths.
- Keep startup migration lightweight for read-only status/tasks paths while still detecting known legacy state markers and custom session stores.
Verification:
- .agents/skills/autoreview/scripts/autoreview --mode local: clean after final fix
- pnpm test src/tasks/task-registry.store.test.ts src/tasks/task-flow-registry.store.test.ts src/commands/doctor-state-migrations.test.ts -- --reporter=verbose
- pnpm test src/commands/doctor-state-migrations.test.ts src/cli/program/config-guard.test.ts src/cli/route.test.ts src/cli/command-path-policy.test.ts -- --reporter=verbose
- pnpm test src/cli/program/config-guard.test.ts src/cli/route.test.ts src/cli/command-startup-policy.test.ts src/cli/command-path-policy.test.ts src/cli/command-execution-startup.test.ts -- --reporter=verbose
- pnpm test src/cli/program/config-guard.test.ts src/cli/argv.test.ts src/cli/route.test.ts src/commands/doctor-config-preflight.state-migration.test.ts -- --reporter=verbose
- pnpm test src/tasks/task-flow-registry.store.test.ts -- --reporter=verbose
- pnpm test test/scripts/lint-suppressions.test.ts -- --reporter=verbose
- pnpm db:kysely:check
- pnpm lint:kysely
- git diff --check HEAD
- pnpm test:startup:memory
- PR CI green on 2f7d76f0d5
This commit is contained in:
committed by
GitHub
parent
e9dee8dfe1
commit
d115fb4cf9
@@ -56,7 +56,7 @@ describe("command-path-policy", () => {
|
||||
|
||||
it("resolves status policy with shared startup semantics", () => {
|
||||
expectResolvedPolicy(["status"], {
|
||||
routeConfigGuard: "when-suppressed",
|
||||
routeConfigGuard: "never",
|
||||
loadPlugins: "never",
|
||||
pluginRegistry: { scope: "channels" },
|
||||
ensureCliPath: false,
|
||||
@@ -221,6 +221,13 @@ describe("command-path-policy", () => {
|
||||
loadPlugins: "never",
|
||||
networkProxy: "bypass",
|
||||
});
|
||||
for (const commandPath of [["tasks"], ["tasks", "list"], ["tasks", "audit"]]) {
|
||||
expectResolvedPolicy(commandPath, {
|
||||
ensureCliPath: false,
|
||||
loadPlugins: "never",
|
||||
networkProxy: "bypass",
|
||||
});
|
||||
}
|
||||
for (const commandPath of [
|
||||
["plugins", "install"],
|
||||
["plugins", "inspect"],
|
||||
|
||||
Reference in New Issue
Block a user