{"record":{"id":"012a1ea8be55674f","repo":"zeroclaw-labs/zeroclaw","slug":"memory-backend-none-disables-persistence-choose","errorCode":null,"errorMessage":"memory backend 'none' disables persistence; choose sqlite, lucid, or markdown before migration","messagePattern":"memory backend 'none' disables persistence; choose sqlite, lucid, or markdown before migration","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-memory/src/lib.rs","lineNumber":902,"sourceCode":"            }\n            Err(e) => {\n                ::zeroclaw_log::record!(\n                    WARN,\n                    ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)\n                        .with_outcome(::zeroclaw_log::EventOutcome::Failure)\n                        .with_attrs(::serde_json::json!({\"error\": format!(\"{e}\")})),\n                    \"memory: background re-embed after embedding identity change failed; \\\n                     run `zeroclaw memory reindex` to retry\"\n                );\n            }\n        }\n    });\n}\n\npub fn create_memory_for_migration(config: &Config) -> anyhow::Result<Box<dyn Memory>> {\n    let backend = backend_kind_from_dotted(&config.memory.backend);\n    if matches!(classify_memory_backend(&backend), MemoryBackendKind::None) {\n        anyhow::bail!(\n            \"memory backend 'none' disables persistence; choose sqlite, lucid, or markdown before migration\"\n        );\n    }\n\n    // Operator surface (bulk import + CLI management): writes are still\n    // scanned and logged, but flagged rows are persisted rather than\n    // rejected so an import never stops partway through, and read-time\n    // withholding is disabled so `memory list` / `get` show every stored\n    // row for inspection and removal. The runtime factory\n    // (`create_memory_with_storage_and_routes`) applies the configured\n    // `[memory.policy]`, so flagged rows remain withheld from recall\n    // wherever `threat_scan_load_time` is enabled.\n    let policy = MemoryPolicyConfig {\n        threat_scan_on_hit: \"block-on-read\".into(),\n        threat_scan_load_time: false,\n        ..MemoryPolicyConfig::default()\n    };\n","sourceCodeStart":884,"sourceCodeEnd":920,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-memory/src/lib.rs#L884-L920","documentation":"create_memory_for_migration builds the operator memory store used by bulk import/export and CLI migration tooling. A memory.backend of \"none\" disables persistence entirely, so migration has nowhere to read rows from or write rows to. The factory rejects it up front and names the backends migration supports: sqlite, lucid, markdown.","triggerScenarios":"Running a migration or CLI import command while the active Config has `memory.backend = \"none\"`. The check uses backend_kind_from_dotted, so both bare \"none\" and a dotted form that classifies as none trip it.","commonSituations":"Dev or privacy-hardened profiles that disable memory being reused for an operational command; forgetting to switch config before running migration tooling; a shared default config that sets none for safety.","solutions":["Point the command at a config with a persistent backend: `memory.backend = \"sqlite\"` (or \"lucid\"/\"markdown\", optionally with a storage alias).","If persistence is intentionally disabled for this deployment, skip migration/import tooling for it entirely."],"exampleFix":"# before\n[memory]\nbackend = \"none\"\n\n# after\n[memory]\nbackend = \"sqlite\"","handlingStrategy":"validation","validationCode":"if backend_kind_from_dotted(&config.memory.backend) == \"none\" {\n    anyhow::bail!(\n        \"cannot run migration/import with memory.backend = \\\"none\\\"; \\\n         switch to sqlite, lucid, or markdown first\"\n    );\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate migration/import commands on a config lint that rejects memory.backend = \"none\" before doing any work.","Keep operator profiles separate from privacy-hardened dev profiles so a disabled-memory config is never handed to migration tooling."],"tags":["migration","config","memory-backend","cli","import-export"],"backgroundTag":"invalid-config-value","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}