Conversation
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.
{
"title": "test(common): pin the Beijing weekend shift with edge instants",
"head": "rekty:fix/pin-beijing-weekend-shift-tests",
"base": "main",
"body": "Closes #1090\n\n## Problem\n\nBoth weekend tests sit at
02:00Z, inside the band where the+8hBeijing shift and a plaingetUTCDay()agree. Deleting the shift leavesdeepseekPricingWindowreturning identical answers for all 168 hours of a week — the suite stays green, and the file only starts lying the day DeepSeek moves a window past 16:00Z.\n\n## Fix\n\n1. ExportisBeijingWeekendfromfreebuff-peak-hours.ts(doc-comment explains why: the weekend band Fri 16:00Z → Sun 16:00Z never overlaps the peak windows, so only the predicate can pin the shift directly).\n2. Add four edge-pinning tests at the exact instants where the two calendars disagree:\n\n| instant | Beijing | weekend |\n|---|---|---|\n|2026-08-28T15:00:00Z| Fri 23:00 | no |\n|2026-08-28T16:00:00Z| Sat 00:00 | yes |\n|2026-08-30T15:00:00Z| Sun 23:00 | yes |\n|2026-08-30T16:00:00Z| Mon 00:00 | no |\n\n## Verification\n\n- All 24 tests in the file pass with the fix in place.\n- Mutation check: removing the+ 8 * 60 * 60 * 1000shift makes exactly the two boundary tests fail (16:00ZFriday and16:00ZSunday), confirming the suite now catches the regression.\n"}