Skip to content

Commit d2fd182

Browse files
fix(memory): satisfy rollback migration guards
1 parent 9e68e83 commit d2fd182

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎scripts/check-kysely-guardrails.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const rawSqliteAllowPathGroups = {
9292
"src/commands/status.scan.shared.ts",
9393
],
9494
"doctor SQLite maintenance and legacy state migration": [
95+
"src/commands/doctor-agent-memory-schema.ts",
9596
"src/commands/doctor/cron/legacy-run-log-migration.ts",
9697
"src/commands/doctor/cron/migration-ledger.ts",
9798
"src/commands/doctor-sqlite-compact.ts",

‎src/state/openclaw-agent-db.test.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,15 @@ describe("openclaw agent database", () => {
16371637
expect(database.db.prepare("SELECT id, text FROM memory_index_chunks").all()).toEqual([
16381638
{ id: "sentinel", text: "body" },
16391639
]);
1640+
expect(
1641+
database.db.prepare("SELECT hash FROM memory_index_sources WHERE id = 41").get(),
1642+
).toEqual({
1643+
hash: "",
1644+
});
1645+
// Provenance backfill invalidates the affected source once so the next
1646+
// memory pass can classify its chunks instead of trusting legacy provenance.
16401647
expect(database.db.prepare("SELECT revision FROM memory_index_state").get()).toEqual({
1641-
revision: 7,
1648+
revision: 8,
16421649
});
16431650
expect(
16441651
database.db

0 commit comments

Comments
 (0)