Skip to content

fix: use future dates in checkpoint prune tests to prevent time-dependent failures#5543

Merged
joaomdmoura merged 1 commit intomainfrom
fix/checkpoint-prune-test-dates
Apr 20, 2026
Merged

fix: use future dates in checkpoint prune tests to prevent time-dependent failures#5543
joaomdmoura merged 1 commit intomainfrom
fix/checkpoint-prune-test-dates

Conversation

@alex-clawd
Copy link
Copy Markdown
Contributor

@alex-clawd alex-clawd commented Apr 20, 2026

Problem

TestPruneSqlite::test_older_than and TestPruneJson::test_older_than use hardcoded 20260417T000000 timestamps for the 'new' checkpoint. Once April 17 passes, that checkpoint is older than 1 day and gets pruned along with the 'old' one, causing assert count >= 1 to fail (count=0).

This is currently breaking CI on every PR branch.

Fix

Use 20990101T000000 for 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 prune tests by changing the “new” checkpoint timestamps in test_checkpoint_cli.py to a far-future date so older_than=1 day pruning 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.

…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.
@joaomdmoura joaomdmoura merged commit 0b120fa into main Apr 20, 2026
55 checks passed
@joaomdmoura joaomdmoura deleted the fix/checkpoint-prune-test-dates branch April 20, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants