fix: freeze datetime in test_recent_commit_scores_max_recency#69
Merged
Conversation
The test used datetime.now() without a mock, causing days_since_commit to grow past 30 as real time passed. Now freezes 'now' at 2026-04-19 (the date the test was authored for) using a patch on arbiter.git_vitality.datetime. Also tightened assertion to exact day count (9 days = Apr 10 -> Apr 19).
Owner
Author
|
Codex follow-up pushed at 54ea3b5: removed the unused imports that caused the self-grade diff score failure and aligned est_recent_commit_scores_max_recency with the implementation's floored imedelta.days behavior (Apr 10 10:00 -> Apr 19 00:00 is 8 full days). git diff --check was clean before commit. Waiting for refreshed CI. |
Owner
Author
|
Codex follow-up 2 pushed at 6bd0e68: self-grade narrowed to one remaining vulture finding ( |
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.
Fixes the pre-existing flaky test test_recent_commit_scores_max_recency. The test used datetime.now() without a mock, causing days_since_commit to grow past 30 as real time passed. Patches arbiter.git_vitality.datetime to freeze now() at 2026-04-19 (the authoring date). Tightens assertion to exact day count (9 days).