Skip to content

Accept top-level fact arrays in retain parsing - #2556

Merged
benfrank241 merged 1 commit into
vectorize-io:mainfrom
koriyoshi2041:rios/accept-top-level-facts-array
Jul 13, 2026
Merged

Accept top-level fact arrays in retain parsing#2556
benfrank241 merged 1 commit into
vectorize-io:mainfrom
koriyoshi2041:rios/accept-top-level-facts-array

Conversation

@koriyoshi2041

Copy link
Copy Markdown
Contributor

Fixes #2543.\n\nSummary:\n- Accept recoverable top-level fact arrays by coercing list[dict] responses into the existing {"facts": [...]} shape.\n- Apply the same coercion in Batch API result parsing so empty or populated fact arrays do not crash retention.\n- Keep malformed non-dict responses on the existing fail/record-error path.\n\nTests:\n- uv run --directory hindsight-api-slim ruff check hindsight_api/engine/retain/fact_extraction.py tests/test_fact_extraction_retry.py tests/test_batch_api.py\n- env -u ALL_PROXY -u all_proxy -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy uv run --directory hindsight-api-slim pytest tests/test_fact_extraction_retry.py tests/test_batch_api.py -q\n- git diff --check

@benfrank241
benfrank241 merged commit 2ccde7a into vectorize-io:main Jul 13, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants