{"record":{"id":"f92ba5b11015511e","repo":"tinyhumansai/openhuman","slug":"learning-list-facets-e","errorCode":null,"errorMessage":"learning_list_facets: {e:#}","messagePattern":"learning_list_facets: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":93,"sourceCode":"        json!({\n            \"type\": \"object\",\n            \"properties\": {\n                \"class\": { \"type\": \"string\", \"description\": \"Optional class filter (style|identity|tooling|veto|goal|channel).\" }\n            }\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] list_facets invoked\");\n        let class_filter = args\n            .get(\"class\")\n            .and_then(serde_json::Value::as_str)\n            .map(str::to_string);\n        let cache = get_cache().await?;\n        let all = cache\n            .list_all()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_list_facets: {e:#}\"))?;\n        let facets: Vec<serde_json::Value> = all\n            .iter()\n            .filter(|f| f.state == FacetState::Active || f.state == FacetState::Provisional)\n            .filter(|f| match &class_filter {\n                Some(cls) => {\n                    f.class.as_deref() == Some(cls.as_str())\n                        || f.key.starts_with(&format!(\"{cls}/\"))\n                }\n                None => true,\n            })\n            .map(facet_to_json)\n            .collect();\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"count\": facets.len(),\n            \"facets\": facets,\n        }))?))\n    }\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L75-L111","documentation":"Wrapped failure inside the learning_list_facets tool execute(): listing facets from the cache (memory driver read) errored after the cache was acquired. The message carries the underlying driver error chain; the tool produced no facet list.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the underlying memory driver error in the chain for the real cause","Retry the tool call once — transient module/bus errors resolve on retry","Return the error to the model as a tool failure so it can inform the user or retry"],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}