Repository navigation
fix: cap V1_IDEMPOTENCY_TTL at 30 days (gap #11) - #33
Merged
Merged
Conversation
V1Store's idempotency-replay cache holds the real answer text and citations returned by /v1/literature/answers, not just metadata -- one of only two places in this system that text survives at all (the other is omnibioai-rag's own query cache). The design doc's 30-day question/answer deletion policy is enforced here as a hard ceiling on this already-short-lived cache's own TTL (default 24h), not a separate deletion job -- there is no durable store for one to run against. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
V1Store.idempotency_finish) stores the full response body for/v1/literature/answers//search-- real answer text and citations, not just metadata. It's one of only two places in this system where that text survives at all (the other is omnibioai-rag's own query cache, see the companion PR there).V1_IDEMPOTENCY_TTLalready defaults well under 30 days (24h), but nothing stopped a misconfigured env var from raising it past that.Config.V1_IDEMPOTENCY_TTLis now hard-capped at 30 days regardless of what's configured.Test plan
pytest tests/test_config.py -q-- 9 passed (2 new)pytest -q-- 425 passedruff check .-- clean🤖 Generated with Claude Code