test(snapshot): pin test calendar to UTC#29
Merged
Conversation
The snapshot day-boundary logic (startOfDay, upcomingToday vs upcomingLater) is timezone-sensitive. The test calendar previously used the machine's local zone, so a CI runner in a different timezone could compute a different day boundary than the author's machine. Pinning to UTC makes the suite deterministic. Verified green under UTC, Asia/Tokyo, and America/Los_Angeles.
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.
Why
SnapshotComputationTestsusedCalendar(identifier: .gregorian)with no explicit time zone, so it defaulted to the runner's local zone. The snapshot day-boundary logic (startOfDay,upcomingTodayvsupcomingLater) is timezone-sensitive — a CI runner in a different zone than the author's machine could land on a different calendar day and flip a boundary assertion. Pre-existing exposure flagged in the stack's final review.What
One-line fix: pin the test calendar to UTC. Verified green under default,
TZ=Asia/Tokyo(UTC+9), andTZ=America/Los_Angeles(UTC-8). 56/56 tests pass.