Avoid hardcoding date in TestReviewSummaryTokenEnricher_LoadsCurrentSessionState#1221
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates a flaky review manifest test to avoid using a hard-coded timestamp that becomes stale once the session IsStale threshold is exceeded, aligning the test with how session state staleness is enforced in session.StateStore.
Changes:
- Replace hard-coded
time.Date(...)timestamps withtime.Now().UTC().Truncate(time.Second)in review manifest token-related tests. - Prevent session state fixtures from being treated as stale (and therefore deleted/ignored) during test execution.
peyton-alt
approved these changes
May 15, 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.
https://entire.io/gh/entireio/cli/trails/387
This test started failing because we hit 7 days on the
IsStalethreshold today and the date was hard coded to May 8th.Note
Low Risk
Test-only change that removes a brittle, time-dependent fixture; low risk aside from potential flakiness if any logic assumes specific wall-clock dates.
Overview
Stops hardcoding a fixed
StartedAttimestamp inmanifest_test.goand instead usestime.Now().UTC().Truncate(time.Second)in the token hydration/enricher tests.This prevents the suite from failing as the run becomes stale relative to the current date.
Reviewed by Cursor Bugbot for commit dd1ea22. Configure here.