tinyhumansai/openhuman · error

read_chunk_row: driver has no chunk family

Error message

read_chunk_row: driver has no chunk family

What it means

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.

Source

Thrown at src/openhuman/memory/read_rpc/chunks.rs:420

// ── small helpers ───────────────────────────────────────────────────────

/// One chunk rendered for inspection.
///
/// Reads through the bound driver's [`MemoryChunks::chunk_detail`], which
/// returns the row, its vault body, content path, lifecycle state and embedding
/// presence in **one** call. It used to make four separate engine calls in
/// process; four bus round trips per rendered row would have been the direct
/// translation, and this is used to render lists.
pub async fn read_chunk_row(chunk_id: &str) -> Result<Option<ChunkRow>> {
    use crate::openhuman::memory::api::provider::MemoryProvider;

    let guard = crate::openhuman::memory::ops::guard::active_memory_guard()
        .await
        .map_err(|e| anyhow::anyhow!("read_chunk_row: {e}"))?;
    let Some(detail) = guard
        .as_chunks()
        .ok_or_else(|| anyhow::anyhow!("read_chunk_row: driver has no chunk family"))?
        .chunk_detail(chunk_id)
        .await?
    else {
        return Ok(None);
    };

    let chunk = detail.chunk;
    // A failed vault read falls back to the row's own content, as before —
    // `body: None` means "could not read", not "empty".
    let body = detail.body.unwrap_or_else(|| chunk.content.clone());
    let preview: String = body.chars().take(PREVIEW_MAX_CHARS).collect();
    Ok(Some(ChunkRow {
        id: chunk.id,
        source_kind: chunk.metadata.source_kind.as_str().to_string(),
        source_id: chunk.metadata.source_id,
        source_ref: chunk.metadata.source_ref.map(|r| r.value),
        owner: chunk.metadata.owner,
        timestamp_ms: chunk.metadata.timestamp.timestamp_millis(),

View on GitHub (pinned to 7491200858)

Solutions

  1. Bind a chunk-capable driver (tinymemory module)
  2. Check why the current driver lacks MemoryChunks
  3. Skip chunk-detail rendering for chunk-less drivers
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/openhuman/memory/read_rpc/chunks.rs:420 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/745ed2a67f17450e. Report an issue: GitHub.