Checks
Area
Tests
Goal
Add deterministic contract tests for Ingestor.ingest() in src/anchor/ingestor.py.
This method is the write path into memory. It is responsible for:
- optionally generating retrieval questions
- constructing the embedding input
- generating a chunk id
- writing the record into the configured memory store with metadata
Suggested starting points
src/anchor/ingestor.py
src/anchor/memory.py
docs/roadmap.md
tests/unit/test_anchor_config.py
Suggested file locations
tests/unit/test_ingestor.py
Out of scope
- Do not add tests against a real Chroma backend.
- Do not expand ingest functionality in this issue.
- Do not add end-to-end retrieval assertions here.
Definition of done
- Add tests for ingest with and without
question_fn.
- Verify missing
embed_fn raises RuntimeError.
- Verify embedding input is just the raw text when no questions are generated.
- Verify embedding input includes generated questions when
question_fn is present.
- Verify
memory_store.add() receives:
id
text
embedding
- metadata
- Verify metadata includes:
source
questions
- a UTC timestamp
- Keep the tests deterministic and offline.
Checks
Area
Tests
Goal
Add deterministic contract tests for
Ingestor.ingest()insrc/anchor/ingestor.py.This method is the write path into memory. It is responsible for:
Suggested starting points
src/anchor/ingestor.pysrc/anchor/memory.pydocs/roadmap.mdtests/unit/test_anchor_config.pySuggested file locations
tests/unit/test_ingestor.pyOut of scope
Definition of done
question_fn.embed_fnraisesRuntimeError.question_fnis present.memory_store.add()receives:idtextembeddingsourcequestions