fix(stats/integration.test): use rolling TODAY date — prevent CI failure ~2026-06-24#224
Open
erudenko wants to merge 1 commit into
Open
fix(stats/integration.test): use rolling TODAY date — prevent CI failure ~2026-06-24#224erudenko wants to merge 1 commit into
erudenko wants to merge 1 commit into
Conversation
…ons tests Two deleteOldSessions tests used "2026-03-26" as the "recent" session date. That date is 58 days old today; the 90-day retention window means both tests currently pass, but they will fail around 2026-06-24 when the date ages out. Replaced both occurrences with the TODAY constant already defined in the file, matching the fix pattern applied to db.test.ts in the companion PR. https://claude.ai/code/session_018a2oNcRBTHviPcedKmyroE
This was referenced May 23, 2026
Open
Open
Open
Open
This was referenced May 30, 2026
CI/CD audit (2026-05-23): latest runs green, but 10+ fix PRs are unmerged and blocking progress
#223
Open
This was referenced Jun 6, 2026
Open
Open
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.
What this fixes
plugins/stats/tests/integration.test.tshad twodeleteOldSessionsretention tests using"2026-03-26"as the date for a "recent" session:"deleteOldSessions removes sessions beyond retention window" — inserts an old session (
2024-01-01) and a recent session ("2026-03-26"), expectsdeletedCount = 1. Once2026-03-26crosses 90 days old (~2026-06-24), both sessions will be deleted anddeletedCountwill be 2 → test fails."deleteOldSessions returns 0 when no sessions are old enough" — inserts only the
"2026-03-26"session, expectsdeletedCount = 0. After ~2026-06-24, that session will be deleted → test fails.As of today (2026-05-23)
"2026-03-26"is 58 days old — within the 90-day window, so tests currently pass. They will fail in approximately 32 days.Fix
Replaced both hardcoded
"2026-03-26"occurrences with theTODAYconstant already defined at the top of the file — the same pattern applied todb.test.tsby the companion PR #214.Relationship to other PRs
This PR is stacked directly on PR #180 (
fix/ci-24307096245), the comprehensive CI fix with all 13 checks green.fix/ci-db-test-rolling-dates) — fixes the same class of issue indb.test.ts, but does not touchintegration.test.ts. This PR fills that gap.fix/ci-type-errors-and-stale-test-date.https://claude.ai/code/session_018a2oNcRBTHviPcedKmyroE
Generated by Claude Code