Skip to content

fix: respect year minimum in literature cache fallback - #334

Open
laulauraluo wants to merge 1 commit into
aiming-lab:mainfrom
laulauraluo:codex/fix-cache-year-filter
Open

laulauraluo wants to merge 1 commit into
aiming-lab:mainfrom
laulauraluo:codex/fix-cache-year-filter

Conversation

@laulauraluo

Copy link
Copy Markdown

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.

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.

1 participant