{"record":{"id":"1d029d911ebfc18b","repo":"tinyhumansai/openhuman","slug":"memory-tree-search-entities-memory-driver-does-no","errorCode":null,"errorMessage":"memory_tree_search_entities: memory driver does not support the retrieval family","messagePattern":"memory_tree_search_entities: memory driver does not support the retrieval family","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/query/search_entities.rs","lineNumber":80,"sourceCode":"        // Entity kinds are an open vocabulary on the wire (see\n        // `memory::api::provider::retrieval`): the engine's own `EntityKind` is\n        // `#[non_exhaustive]` and has grown twice, so a closed host-side copy\n        // would either reject a kind the engine understands or drift silently\n        // out of date. The driver owns the vocabulary and rejects an unknown\n        // kind with `Invalid`.\n        //\n        // The cost is real and worth naming: a bad `kinds` value used to fail\n        // without a workspace, and now needs a bound driver to fail. The\n        // alternative — duplicating an open vocabulary host-side — is the\n        // failure mode this contract was shaped to avoid.\n        let limit = req.limit.unwrap_or(5).min(100);\n        let guard = active_memory_guard()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_tree_search_entities: {e}\"))?;\n        let matches = guard\n            .as_retrieval()\n            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"memory_tree_search_entities: memory driver does not support the \\\n                     retrieval family\"\n                )\n            })?\n            .search_entities(&req.query, req.kinds.as_deref(), limit)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_tree_search_entities: {e}\"))?;\n        log::debug!(\n            \"[tool][memory_tree] search_entities returning matches={}\",\n            matches.len()\n        );\n        let json = serde_json::to_string(&matches)?;\n        Ok(ToolResult::success(json))\n    }\n}\n\n#[cfg(test)]\nmod tests {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/query/search_entities.rs#L62-L98","documentation":"The bound driver's as_retrieval() is None — it does not implement the retrieval family, so entity search cannot run. This host deliberately does not validate kinds itself; the failure is purely driver capability.","triggerScenarios":"Thrown at src/openhuman/memory/query/search_entities.rs:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a retrieval-capable memory driver","Diagnose why a driver without retrieval got bound","Pick a memory_tree mode the active driver supports"],"exampleFix":null,"handlingStrategy":"type-guard","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-14T05:17:10.506Z"}