Repository navigation
Conversation
…able (Agent-Field#1808) The window buckets days in the viewer's local zone on purpose (usageBucketStart, and the "THE DAY IS THE WRITER'S" law on SpendToday). The test built its fixture clock in a fixed -04:00 zone and asserted the chat manual quotes the rendered `since aug 11` verbatim, so once that clock was read as local on a host far enough east it crossed midnight and rendered `aug 12` instead — green on a UTC runner, red on a UTC+8 box. Build the fixture clock in time.Local so it agrees with the bucketing; verified identical under TZ from Pago_Pago to Kiritimati.
…Agent-Field#1808) The same fixed -04:00 fixture clock lived in five tasks-page test files, and the window buckets days in the viewer's local zone, so two tests already failed on a UTC+8 box — TestTheManualQuotesBothTasksOpeningHeadingsExactly on 'aug 11' vs 'aug 12', and TestTheTasksPageGroupsByWhatYouDoNext on the 'shift+← aug 2 – aug 25 →' window control. One shared cause (Agent-Field#176's lesson), so fix it everywhere: build each fixture clock in time.Local. Verified green across the full span of host zones from Pago_Pago to Kiritimati.
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.
Closes #1808.
The bug
The tasks-page tests are green on a UTC CI runner but red on any developer box east of UTC. Two fail on a UTC+8 machine today:
The tasks window buckets days in the viewer's local zone — deliberately: spend and subtask counts are attributed to the writer's own calendar day (
usageBucketStartdoesat.Local(), andSpendToday's "THE DAY IS THE WRITER'S" law depends on it). But every tasks-page test fixture built its clock in a fixedtime.FixedZone("fixture", -4h). On a host east enough, that-04:00clock is read as the next local day, the window shifts a day, and the asserted dates (aug 11,aug 2 – aug 25) no longer match.The fix
The product behavior is correct and stays. The fixtures were wrong to inject a foreign fixed zone and then assert dates that only match in the author's timezone band. This was one shared cause across five test files — exactly the "fix it, don't describe one of it" lesson from #176 — so build every tasks-page fixture clock in
time.Local:tallyrows_test.go,tasksplace_test.go(×4),tasksparked_test.go,tasksconversation_test.go,taskstable_test.goNo production code changes — test-only.
Verification
The 58 tests across those five files are identical green under the full span of host zones: