The China build (copilot.tencent.com) now reports the free model's daily
token window too, the open half of #288 (kunghim).
kunghim measured it on 2026-11-02: two Free-plan accounts were refused
at 200,389,043 and 200,485,923 tokens (in + cache_read + out), resetting
24h after the window opened, the same per-account window as WorkBuddy
AI's at about twice its 1e8. Each build has its own window
(FREE_WINDOW_CN on workbuddy rows, FREE_WINDOW_AI on workbuddy-ai rows),
so one phone number signed in to both never sums the builds; the parse
cache is keyed by build. windowReset reads the China refusal's
"将在 … UTC+8 重置". The China card stops at a soft cap of 1.9e8, 5%
short of the measured one; a refusal in force still reads it full.
Reviewed at c7e4a19ef9aeb192e909fff9fcdb71d06b79e116, run on mote
(bun 1.4.2, HOME=$(mktemp -d)):
- packages/workbuddy bun test: 311 pass, 0 fail.
- whole repo bun test: 4747 pass, 12 skip, 0 fail.
- bun scripts/check.mjs workbuddy: ok.
- Broken by hand: the PR's tests against main's index.mjs, 7 red (the
China counting, the builds kept apart, the Chinese reset, the cache
key, the usage card).
Not tried: a real China-build account through magpie (the measurement
is kunghim's).