Skip to content

fix(retain): preserve normalized experience fact types#839

Closed
Rutimka wants to merge 1 commit intovectorize-io:mainfrom
Rutimka:fix/experience-fact-type-remap
Closed

fix(retain): preserve normalized experience fact types#839
Rutimka wants to merge 1 commit intovectorize-io:mainfrom
Rutimka:fix/experience-fact-type-remap

Conversation

@Rutimka
Copy link
Copy Markdown
Contributor

@Rutimka Rutimka commented Apr 1, 2026

Summary

  • preserve normalized experience fact types in both retain conversion paths
  • add focused regression coverage for sync and batch fact extraction

Problem

PR #775 taught the extractor to normalize first-person agent facts from raw assistant output to experience, but the later ExtractedFactType conversion still re-checked for the raw assistant label. By that point the fact type was already normalized, so experience facts were being remapped back to world.

Testing

  • env UV_CACHE_DIR=/tmp/uv-cache uv run ruff check hindsight_api/engine/retain/fact_extraction.py tests/test_fact_extraction_experience_regression.py
  • env UV_CACHE_DIR=/tmp/uv-cache RUFF_CACHE_DIR=/tmp/ruff-cache uv run ruff format --check hindsight_api/engine/retain/fact_extraction.py tests/test_fact_extraction_experience_regression.py
  • env UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/test_fact_extraction_experience_regression.py -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants