Status: Accepted
Date: 2026-07-14
Related: 0018,
0019,
stabilization gap C4
Consumers need citations, not only chunk blobs. Snippet offsets must stay stable when unchanged chunk bytes are re-indexed.
- Add
retrieval.SnippetonCandidatewith absolute half-open byte spans into chunk text (UTF-8), pluschunk_checksumand highlight spans. - Builders live in
internal/retrieval/snippet: phrase find matches exact retrieval (case-sensitive substring); window defaults 40/40 bytes. - CLI/HTTP search attaches snippets after merge via
snippet.Attach. - Snippets are presentation derived from chunk text — not a separate indexed artifact.
- Re-index of identical bytes yields identical
chunk_span/ highlights. - Provenance stays tied to chunk checksum.
- Phrase match is first-hit only; multi-hit highlighting is deferred.
- Lemma/stem highlight adapters when language plugins need them.