{"record":{"id":"46e880c15f985993","repo":"tinyhumansai/openhuman","slug":"learning-get-facet-e","errorCode":null,"errorMessage":"learning_get_facet: {e:#}","messagePattern":"learning_get_facet: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":145,"sourceCode":"        json!({\n            \"type\": \"object\",\n            \"properties\": {\n                \"class\": { \"type\": \"string\" },\n                \"key\": { \"type\": \"string\", \"description\": \"Key suffix within the class.\" }\n            },\n            \"required\": [\"class\", \"key\"]\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] get_facet invoked\");\n        let class_str = read_required_str(&args, \"class\")?;\n        let key_suffix = read_required_str(&args, \"key\")?;\n        let fk = full_key(&class_str, &key_suffix);\n        let cache = get_cache()?;\n        let facet = cache\n            .get(&fk)\n            .map_err(|e| anyhow::anyhow!(\"learning_get_facet: {e:#}\"))?;\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"found\": facet.is_some(),\n            \"facet\": facet.as_ref().map(facet_to_json),\n        }))?))\n    }\n\n    fn is_concurrency_safe(&self, _args: &serde_json::Value) -> bool {\n        true\n    }\n}\n\n/// Aggregate facet-cache statistics.\npub struct LearningCacheStatsTool;\n\n#[async_trait]\nimpl Tool for LearningCacheStatsTool {\n    fn name(&self) -> &str {\n        \"learning_cache_stats\"","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/learning/tools.rs#L127-L163","documentation":"Error \"learning_get_facet: {e:#}\" thrown in tinyhumansai/openhuman.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}