Skip to content

fix: freeze datetime in test_recent_commit_scores_max_recency#69

Merged
hummbl-dev merged 3 commits into
mainfrom
fix/codex/fix-flaky-git-vitality-test
May 13, 2026
Merged

fix: freeze datetime in test_recent_commit_scores_max_recency#69
hummbl-dev merged 3 commits into
mainfrom
fix/codex/fix-flaky-git-vitality-test

Conversation

@hummbl-dev
Copy link
Copy Markdown
Owner

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).

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).
@hummbl-dev
Copy link
Copy Markdown
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.

@hummbl-dev
Copy link
Copy Markdown
Owner Author

Codex follow-up 2 pushed at 6bd0e68: self-grade narrowed to one remaining vulture finding (unused variable 'tz' in the mock lambda). Replaced the named lambda arg with *_args, **_kwargs; git diff --check was clean before commit. Waiting for refreshed CI.

@hummbl-dev hummbl-dev merged commit 4eb9bef into main May 13, 2026
3 checks passed
@hummbl-dev hummbl-dev deleted the fix/codex/fix-flaky-git-vitality-test branch May 13, 2026 16:55
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