Skip to content

fix(common): honor DeepSeek Beijing weekend boundaries - #1096

Closed
c8dhjp4tyv-bit wants to merge 9036 commits into
CodebuffAI:mainfrom
c8dhjp4tyv-bit:fix/deepseek-beijing-weekend-boundary
Closed

fix(common): honor DeepSeek Beijing weekend boundaries#1096
c8dhjp4tyv-bit wants to merge 9036 commits into
CodebuffAI:mainfrom
c8dhjp4tyv-bit:fix/deepseek-beijing-weekend-boundary

Conversation

@c8dhjp4tyv-bit

Copy link
Copy Markdown

Fixes #1090

Summary

  • Export and directly test the Beijing weekend predicate at the Friday/Sunday UTC boundary.
  • Apply DeepSeek's weekend off-peak rule only from its effective instant, 2026-08-22T16:00:00Z.
  • Keep historical pricing and expensive-window checks from retroactively treating pre-change weekends as off-peak.

Why

The existing weekend tests used instants where UTC and Beijing were already on the same weekend day, so removing the +8 hour conversion left the suite green. The new boundary cases pin Friday 16:00Z and Sunday 16:00Z, where the calendars diverge.

Verification

  • bun test common/src/__tests__/freebuff-peak-hours.test.ts — 26 passed
  • bun run --cwd common typecheck — passed
  • Prettier check and git diff --check — passed

The full common test 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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:triaged Classified by the community triage bot pr:needs-work Right idea, not mergeable as written

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Both weekend tests stay green if the Beijing shift is removed

4 participants