Checks
Area
Source
Goal
Add a scalar metadata version field to document-derived chunks so future retrieval and migration logic can distinguish old metadata shapes from newer ones.
The chunk metadata schema already calls out schema versioning as an open question. As Anchor adds extractor metadata, file ingestion, offsets, and chunk position fields, stored chunks may start to have different metadata shapes depending on when they were ingested.
A simple version field gives downstream callers a stable way to interpret stored metadata without guessing.
Suggested file locations
Scope
Add a document metadata schema version for chunks produced from file/document ingestion.
The implementation should:
- Add a scalar metadata field such as
schema_version: 1.
- Apply it to document-derived chunks during file ingestion.
- Keep the value Chroma-compatible.
- Document what the version means in the chunk metadata schema.
- Preserve all existing metadata fields.
Out of scope
- Do not migrate existing stored chunks.
- Do not add a general migration framework.
- Do not add schema validation infrastructure.
- Do not change
MemoryStore.
- Do not add new dependencies.
- Do not apply this to agent write-back memory unless the implementation already has a clear document-only boundary.
Definition of done
- Document-derived chunks include
schema_version.
- The schema doc describes the field and its initial value.
- Tests verify the field is present on file-ingested chunks.
- Existing metadata such as
source, source_format, questions, timestamp, offsets, and chunk position fields are preserved where applicable.
- Existing text-ingestion behavior remains compatible.
Checks
Area
Source
Goal
Add a scalar metadata version field to document-derived chunks so future retrieval and migration logic can distinguish old metadata shapes from newer ones.
The chunk metadata schema already calls out schema versioning as an open question. As Anchor adds extractor metadata, file ingestion, offsets, and chunk position fields, stored chunks may start to have different metadata shapes depending on when they were ingested.
A simple version field gives downstream callers a stable way to interpret stored metadata without guessing.
Suggested file locations
docs/architecture/chunk-metadata-schema.mdsrc/anchor/anchor.pyor the document ingestion path added in [task] Add public Anchor.ingest_file(path) API #76src/anchor/ingestor.pyonly if this is handled with [task] Add metadata passthrough to Ingestor.ingest #75 metadata passthroughScope
Add a document metadata schema version for chunks produced from file/document ingestion.
The implementation should:
schema_version: 1.Out of scope
MemoryStore.Definition of done
schema_version.source,source_format,questions,timestamp, offsets, and chunk position fields are preserved where applicable.