Skip to main content

chunk

Function chunk 

Source
pub fn chunk(record: &Record) -> Result<Option<Vec<String>>>
Expand description

Split a record into ordered chunk texts. Returns Ok(None) if the kind is definitionally not knowledge-bearing (Checkpoint/GraphManifest, ADR 0011), and Err if a knowledge-bearing body fails to parse — so a corrupt record is distinguishable from a genuinely non-indexable one (#139). Chunking is per-kind: a Session by turn, a long MemoryTier/Ticket by section/paragraph, a Topic by bullet. The kind’s title/name is folded into the first chunk so it stays searchable. A kind that yields a single piece is the one-document fallback — identical to phase-1 behavior. Extraction goes through the gonzalo-domain typed views.