Skip to content

Avoid hardcoding date in TestReviewSummaryTokenEnricher_LoadsCurrentSessionState#1221

Merged
computermode merged 1 commit into
mainfrom
fix-stale-date-manifest-test
May 15, 2026
Merged

Avoid hardcoding date in TestReviewSummaryTokenEnricher_LoadsCurrentSessionState#1221
computermode merged 1 commit into
mainfrom
fix-stale-date-manifest-test

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented May 15, 2026

https://entire.io/gh/entireio/cli/trails/387

This test started failing because we hit 7 days on the IsStale threshold 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 StartedAt timestamp in manifest_test.go and instead uses time.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.

Copilot AI review requested due to automatic review settings May 15, 2026 19:07
@computermode computermode requested a review from a team as a code owner May 15, 2026 19:07
@computermode computermode changed the title Avoid hardcoding date in test Avoid hardcoding date in TestReviewSummaryTokenEnricher_LoadsCurrentSessionState May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with time.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.

@computermode computermode enabled auto-merge May 15, 2026 19:14
@computermode computermode merged commit ef0104b into main May 15, 2026
14 checks passed
@computermode computermode deleted the fix-stale-date-manifest-test branch May 15, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants