{"record":{"id":"67a57e1098bf6460","repo":"tinyhumansai/openhuman","slug":"learning-cache-stats-e","errorCode":null,"errorMessage":"learning_cache_stats: {e:#}","messagePattern":"learning_cache_stats: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/learning/tools.rs","lineNumber":188,"sourceCode":"    }\n\n    fn description(&self) -> &str {\n        \"Report facet-cache health: total facets, counts by state \\\n         (active/provisional/candidate/dropped), and a per-class breakdown of \\\n         active facets.\"\n    }\n\n    fn parameters_schema(&self) -> serde_json::Value {\n        json!({ \"type\": \"object\", \"properties\": {} })\n    }\n\n    async fn execute(&self, _args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][learning] cache_stats invoked\");\n        let cache = get_cache().await?;\n        let all = cache\n            .list_all()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"learning_cache_stats: {e:#}\"))?;\n        let count_state = |s: FacetState| all.iter().filter(|f| f.state == s).count();\n        let mut by_class: std::collections::HashMap<String, usize> =\n            std::collections::HashMap::new();\n        for f in all.iter().filter(|f| f.state == FacetState::Active) {\n            let cls = f\n                .class\n                .clone()\n                .or_else(|| f.key.split('/').next().map(str::to_string))\n                .unwrap_or_else(|| \"unknown\".to_string());\n            *by_class.entry(cls).or_insert(0) += 1;\n        }\n        Ok(ToolResult::success(serde_json::to_string(&json!({\n            \"total\": all.len(),\n            \"active\": count_state(FacetState::Active),\n            \"provisional\": count_state(FacetState::Provisional),\n            \"candidate\": count_state(FacetState::Candidate),\n            \"dropped\": count_state(FacetState::Dropped),\n            \"by_class\": by_class,","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/learning/tools.rs#L170-L206","documentation":"Error-surfacing wrapper in the learning cache_stats tool's execute (argument-free): get_cache() or cache.list_all() failed while collecting facet-cache health stats (total facets, state counts, per-class breakdown). Means the learning facet cache backend is unavailable or errored — an environment/driver problem, not bad input. `{e:#}` carries the alternate-form underlying error chain.","triggerScenarios":"Thrown at src/openhuman/agent/learning/tools.rs:188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the memory driver/module health — the underlying error chain names the real failure","Retry once for transient errors","Use the platform health/doctor checks if the memory subsystem is persistently failing"],"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"}