tinyhumansai/openhuman · error

learning_get_facet

Error message

learning_get_facet: {e:#}

What it means

Wrapped failure inside learning_get_facet: after class/key validation, reading the facet by its full key from the cache errored (driver read failure). Distinct from 'facet not found' — the read itself failed rather than returning None.

Solutions

  1. Inspect the underlying driver error chain for the memory subsystem's real failure
  2. Retry the read once for transient module errors
  3. Verify the class/key combination exists via learning_list_facets if failures persist
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/learning/tools.rs:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/46e880c15f985993. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/learning/tools.rs:151

            "type": "object",
            "properties": {
                "class": { "type": "string" },
                "key": { "type": "string", "description": "Key suffix within the class." }
            },
            "required": ["class", "key"]
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][learning] get_facet invoked");
        let class_str = read_required_str(&args, "class")?;
        let key_suffix = read_required_str(&args, "key")?;
        let fk = full_key(&class_str, &key_suffix);
        let cache = get_cache().await?;
        let facet = cache
            .get(&fk)
            .await
            .map_err(|e| anyhow::anyhow!("learning_get_facet: {e:#}"))?;
        Ok(ToolResult::success(serde_json::to_string(&json!({
            "found": facet.is_some(),
            "facet": facet.as_ref().map(facet_to_json),
        }))?))
    }

    fn is_concurrency_safe(&self, _args: &serde_json::Value) -> bool {
        true
    }
}

/// Aggregate facet-cache statistics.
pub struct LearningCacheStatsTool;

#[async_trait]
impl Tool for LearningCacheStatsTool {
    fn name(&self) -> &str {
        "learning_cache_stats"

View on GitHub (pinned to 7491200858)