fix: use future dates in checkpoint prune tests to prevent time-dependent failures#5543
Merged
joaomdmoura merged 1 commit intomainfrom Apr 20, 2026
Merged
Conversation
…dent failures The test_older_than tests in both JSON and SQLite prune suites used hardcoded 2026-04-17 timestamps for the 'new' checkpoint. Once that date passes, the checkpoint is older than 1 day and gets pruned along with the 'old' one, causing assert count >= 1 to fail (count=0). Use 2099-01-01 for the 'new' checkpoint so tests remain stable.
greysonlalonde
approved these changes
Apr 20, 2026
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
TestPruneSqlite::test_older_thanandTestPruneJson::test_older_thanuse hardcoded20260417T000000timestamps for the 'new' checkpoint. Once April 17 passes, that checkpoint is older than 1 day and gets pruned along with the 'old' one, causingassert count >= 1to fail (count=0).This is currently breaking CI on every PR branch.
Fix
Use
20990101T000000for the 'new' checkpoint so the tests remain stable regardless of when they run.Testing
The fix is a 2-line change in test fixtures. No production code changed.
Note
Low Risk
Low risk: updates only test fixtures to avoid date-dependent failures; no production logic changes.
Overview
Fixes flaky
checkpoint prunetests by changing the “new” checkpoint timestamps intest_checkpoint_cli.pyto a far-future date soolder_than=1 daypruning always leaves at least one checkpoint remaining regardless of when CI runs.Reviewed by Cursor Bugbot for commit f614d17. Bugbot is set up for automated code reviews on this repo. Configure here.