{"record":{"id":"745ed2a67f17450e","repo":"tinyhumansai/openhuman","slug":"read-chunk-row-driver-has-no-chunk-family","errorCode":null,"errorMessage":"read_chunk_row: driver has no chunk family","messagePattern":"read_chunk_row: driver has no chunk family","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/read_rpc/chunks.rs","lineNumber":420,"sourceCode":"\n// ── small helpers ───────────────────────────────────────────────────────\n\n/// One chunk rendered for inspection.\n///\n/// Reads through the bound driver's [`MemoryChunks::chunk_detail`], which\n/// returns the row, its vault body, content path, lifecycle state and embedding\n/// presence in **one** call. It used to make four separate engine calls in\n/// process; four bus round trips per rendered row would have been the direct\n/// translation, and this is used to render lists.\npub async fn read_chunk_row(chunk_id: &str) -> Result<Option<ChunkRow>> {\n    use crate::openhuman::memory::api::provider::MemoryProvider;\n\n    let guard = crate::openhuman::memory::ops::guard::active_memory_guard()\n        .await\n        .map_err(|e| anyhow::anyhow!(\"read_chunk_row: {e}\"))?;\n    let Some(detail) = guard\n        .as_chunks()\n        .ok_or_else(|| anyhow::anyhow!(\"read_chunk_row: driver has no chunk family\"))?\n        .chunk_detail(chunk_id)\n        .await?\n    else {\n        return Ok(None);\n    };\n\n    let chunk = detail.chunk;\n    // A failed vault read falls back to the row's own content, as before —\n    // `body: None` means \"could not read\", not \"empty\".\n    let body = detail.body.unwrap_or_else(|| chunk.content.clone());\n    let preview: String = body.chars().take(PREVIEW_MAX_CHARS).collect();\n    Ok(Some(ChunkRow {\n        id: chunk.id,\n        source_kind: chunk.metadata.source_kind.as_str().to_string(),\n        source_id: chunk.metadata.source_id,\n        source_ref: chunk.metadata.source_ref.map(|r| r.value),\n        owner: chunk.metadata.owner,\n        timestamp_ms: chunk.metadata.timestamp.timestamp_millis(),","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/read_rpc/chunks.rs#L402-L438","documentation":"The bound memory driver's as_chunks() is None — it lacks the chunk family, so chunk_detail cannot be called to render the row. Capability mismatch on the driver; the read path degrades rather than silently rendering empty.","triggerScenarios":"Thrown at src/openhuman/memory/read_rpc/chunks.rs:420 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Bind a chunk-capable driver (tinymemory module)","Check why the current driver lacks MemoryChunks","Skip chunk-detail rendering for chunk-less drivers"],"exampleFix":null,"handlingStrategy":"type-guard","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-14T05:17:10.506Z"}