Repository navigation
fix: respect year minimum in literature cache fallback - #334
Open
laulauraluo wants to merge 1 commit into
Open
laulauraluo wants to merge 1 commit into
laulauraluo wants to merge 1 commit into
Conversation
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.
When a literature backend fails, cached results from an earlier broader query can include papers older than the requested
year_min. Filter reconstructed cached papers before accumulating them, keeping the inclusive boundary and existing behavior when the minimum is disabled.Regression uses a real disk cache and mocks only the failed backend. Before the fix, the two positive-cutoff cases fail; after it, all four cases pass. Full suite: 2,955 passed, 56 skipped (baseline: 2,951 passed, 56 skipped). Tests used a local offline harness that blocks TCP connections while permitting actual DNS and Unix socketpairs; no models or live API integration were tested.
Related prior work: closed #87 proposed year-aware cache keys within a broader feature change. This fix only enforces the requested cutoff on fallback results; it does not change cache keys or claim to solve cache completeness.
AI assistance was used for investigation, implementation and independent review.