fix(common): honor DeepSeek Beijing weekend boundaries - #1187
fix(common): honor DeepSeek Beijing weekend boundaries#1187c8dhjp4tyv-bit wants to merge 2 commits into
Conversation
|
The core fix is sound: previously The doc comments in One nit: the diff also silently deletes two unrelated explanatory comments in the test file (around 'The whole bug in one assertion' and the I can't verify the specific vendor announcement date against #1090 from this vantage point, so I'd want a maintainer to confirm the 2026-08-22T16:00:00Z timestamp against the actual DeepSeek notice before merging, but the code structure, tests, and reasoning are solid enough to be worth porting. |
|
Addressed both review points. I restored the two unrelated explanatory timezone-test comments that had been dropped during reconstruction. I also independently rechecked the effective instant: the published rule is effective at 00:00 Beijing Time on Sunday 2026-08-23, which is exactly 2026-08-22T16:00:00Z (UTC+8). This is independently corroborated by the Aug 22 contemporaneous report (https://www.odaily.com.cn/en/newsflash/511930) and an archived-doc comparison that explicitly gives the UTC conversion (https://aitoolsworth.com/deepseek-weekend-off-peak-pricing/). Targeted peak-hours suite: 31 passed, 0 failed. |
Fixes #1090
Summary
Why
The existing weekend tests used instants where UTC and Beijing were already on the same weekend day, so removing the
+8hour conversion left the suite green. The new boundary cases pin Friday 16:00Z and Sunday 16:00Z, where the calendars diverge.Verification
Prior validation before the history rewrite:
bun test common/src/__tests__/freebuff-peak-hours.test.ts— 26 passedbun run --cwd common typecheck— passedgit diff --check— passedThe full
commontest command cannot pass in this public checkout because several existing tests reference private/web files absent from the mirror; the changed test file passes independently.