{"record":{"id":"6db1b8b2280ede2e","repo":"tinyhumansai/openhuman","slug":"memory-chunk-context-e","errorCode":null,"errorMessage":"memory_chunk_context: {e}","messagePattern":"memory_chunk_context: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/chunk_context.rs","lineNumber":83,"sourceCode":"        if parsed.chunk_id.trim().is_empty() {\n            return Err(anyhow::anyhow!(\n                \"memory_chunk_context: chunk_id cannot be empty\"\n            ));\n        }\n\n        let window = parsed.window.clamp(1, 5);\n\n        log::debug!(\n            \"[tool][memory_chunk_context] chunk_id={} window={}\",\n            parsed.chunk_id,\n            window,\n        );\n\n        // Chunks are read through the bound driver rather than by opening the\n        // store in this process — see the note in `vector_search.rs`.\n        let guard = active_memory_guard()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_chunk_context: {e}\"))?;\n        let chunk_reader = guard.as_chunks().ok_or_else(|| {\n            anyhow::anyhow!(\"memory_chunk_context: memory driver does not support the chunk family\")\n        })?;\n\n        // Look up the target chunk directly by ID\n        let target = chunk_reader\n            .get_chunk(&parsed.chunk_id)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_chunk_context: get_chunk failed: {e}\"))?\n            .ok_or_else(|| anyhow::anyhow!(\"memory_chunk_context: chunk_id not found\"))?;\n\n        let source_id = target.metadata.source_id.clone();\n        let source_kind = target.metadata.source_kind;\n\n        // Per-profile memory-source gate: if the target chunk belongs to a\n        // source the active profile didn't allow, surface nothing (its window\n        // shares the same source). Non-source chunks always pass.\n        if !tinymemory_core::source_scope::chunk_source_allowed(&target.metadata.tags, &source_id) {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/chunk_context.rs#L65-L101","documentation":"Error-surfacing wrapper in the memory_chunk_context tool's execute: active_memory_guard() failed (no memory driver bound) after arguments were validated and window clamped to 1–5. Fires before the chunk lookup; an environment/driver problem rather than bad input.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/chunk_context.rs:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after driver binding","Inspect the chained binding error","Confirm a chunk-capable memory backend is active"],"exampleFix":null,"handlingStrategy":"retry","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-14T00:17:10.932Z"}