fleet-memory/hindsight-api-slim/hindsight_api/engine/search
Nicolò Boschi 0bcbf8491b
fix: return metadata in recall responses (#680)
* fix: return metadata in recall responses (#674)

Metadata stored during retain was never retrieved during recall.
Add metadata to all SQL SELECT queries, the RetrievalResult dataclass,
ScoredResult.to_dict(), and MemoryFact construction in the recall pipeline.

* test: add metadata round-trip test for retain→recall

Replace placeholder metadata test with one that actually passes
metadata via retain_batch_async and asserts it is returned on recall.

* fix: parse metadata JSON string from database in MemoryFact

asyncpg may return JSONB columns as strings. Add a field_validator
to MemoryFact.metadata to handle JSON string deserialization.
2026-03-25 11:24:18 +01:00
..
__init__.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
fusion.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
graph_retrieval.py fix: return metadata in recall responses (#680) 2026-03-25 11:24:18 +01:00
link_expansion_retrieval.py feat: compound tag filtering via tag_groups (#562) 2026-03-13 14:30:11 +01:00
mpfp_retrieval.py fix: return metadata in recall responses (#680) 2026-03-25 11:24:18 +01:00
reranking.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
retrieval.py fix: return metadata in recall responses (#680) 2026-03-25 11:24:18 +01:00
tags.py feat: compound tag filtering via tag_groups (#562) 2026-03-13 14:30:11 +01:00
temporal_extraction.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
think_utils.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
trace.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
tracer.py feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
types.py fix: return metadata in recall responses (#680) 2026-03-25 11:24:18 +01:00