{"record":{"id":"1c3699fa1220b9dd","repo":"tinyhumansai/openhuman","slug":"memory-query-e","errorCode":null,"errorMessage":"memory query: {e}","messagePattern":"memory query: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/query/backend.rs","lineNumber":33,"sourceCode":"//! `None` is passed for every `scope` argument, and that is not \"unrestricted\":\n//! the guard intersects it with the ambient per-turn allowlist before the call\n//! reaches the driver, so naming a scope here could only ever narrow what the\n//! turn may see.\n\nuse anyhow::Result;\n\nuse crate::openhuman::memory::api::chunks::SourceKind;\nuse crate::openhuman::memory::api::provider::{\n    MemoryProvider, RetrievalHit, RetrievalResponse, SourceRetrievalQuery,\n};\nuse crate::openhuman::memory::guard::MemoryGuard;\nuse crate::openhuman::memory::ops::guard::active_memory_guard;\n\n/// The retrieval family on the active driver, or a caller-facing error.\nasync fn retrieval() -> Result<std::sync::Arc<MemoryGuard>> {\n    let guard = active_memory_guard()\n        .await\n        .map_err(|e| anyhow::anyhow!(\"memory query: {e}\"))?;\n    if guard.as_retrieval().is_none() {\n        return Err(anyhow::anyhow!(\n            \"memory query: memory driver does not support the retrieval family\"\n        ));\n    }\n    Ok(guard)\n}\n\n/// Query the per-source summary trees. The global (time-axis) and topic\n/// (subject-axis) trees were removed; source trees plus the entity index are\n/// the substrate, so this is the only remaining tree-query backend.\npub async fn query_source_scope(\n    scope: Option<&str>,\n    time_window_days: Option<u32>,\n    query: Option<&str>,\n    limit: usize,\n) -> Result<RetrievalResponse> {\n    let guard = retrieval().await?;","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/query/backend.rs#L15-L51","documentation":"Wrapper around active_memory_guard(): acquiring the bound memory driver failed — no driver is bound yet, or the binding errored. Every memory query tool surfaces this as a caller-facing \"memory query: {e}\" rather than panicking on a missing subsystem.","triggerScenarios":"Thrown at src/openhuman/memory/query/backend.rs:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after boot — the driver binds during memory subsystem startup","Check logs for the underlying binding error (module load failure, missing engine)","Verify the memory module/driver is enabled in this build and config"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}