test(e2e): bound date-only *_before filters at next-day start#55
Merged
Conversation
A date-only cutoff on /v1/search is inclusive of that whole day: a bare acquired_before=2026-05-01 still returns pages acquired at 2026-05-01T14:31Z, while a full timestamp (2026-05-01T00:00:00Z) cuts at the exact instant. The tests asserted the exact-instant reading, so they only passed while no same-day result happened to rank into the top 10 -- test_acquired_before broke in the 2026-07-25 nightly for exactly that reason. Bound both *_before tests at the start of the next day. test_published_before was equally exposed and would have failed on any result published during 2024-01-01. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoFix e2e date-only *_before filter assertions to bound at next-day start
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
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.
Problem
test_acquired_beforebroke in the 2026-07-25 nightly on all three OS jobs, having passed the day before against the same CLI binary (v0.1.24). It wasn't a regression — the assertion was wrong all along.A date-only cutoff on
/v1/searchis inclusive of that whole day, while a full timestamp cuts at the exact instant:The test asserted the exact-instant reading (
<= utc(2026, 5, 1)), so it only passed while no same-day result happened to rank into the top 10. On 2026-07-25https://ghacks.net/category/aidid, at2026-05-01T14:31:13Z, and the assertion tripped.Fix
Bound both
*_beforetests at the start of the next day, with a comment recording the whole-day semantics so the next reader doesn't tighten it back.test_published_beforehad the identical flaw and would have failed on any result published during 2024-01-01 — fixed here too rather than left as a landmine.Verification
Run 30158473043 on this branch:
2 failed, 88 passed, 3 skipped. Bothtest_acquired_beforeandtest_published_beforepass on ubuntu, macOS and Windows.The two remaining failures are live API bugs, untouched by this PR and tracked separately:
test_fetch_live—live=truereturns 422 for every URL tried, while the cached path returns 200 for the same URL. The--liveflag shipped in v0.1.24 is unusable.test_dead_page— the API returns 422 where 404 belongs. The same 422, with the message "The page was reached but content could not be extracted", also comes back for a domain that doesn't resolve, so callers can't distinguish a dead link from a transient extraction failure.Nightly e2e stays red until the live-fetch bug is fixed on the backend.
🤖 Generated with Claude Code