Player reached a Remote magpie with a GLM Coding Plan key: "Z.ai:
[1308][Usage limit reached for 5 hour. Your limit will reset at 2026-10-15
20:12 (out of its allowance: not asked again before 17:12)". Z.ai's 1308
and 1310 ("Usage limit reached for N hour. Your limit will reset at
YYYY-MM-DD HH:MM:SS", bigmodel.cn "您的限额将在 … 重置") write the time
with no zone. It is UTC+8: code-yeongyu/senpi#3348 has a 1308 received at
2026-09-21T17:17:32Z saying 01:18:11, 39s later as UTC+8 and 8h later as
UTC; kodustech/kodus-ai#2104 and openclaw/openclaw#97764 show the same
zone-less form for 1310. resetsWhen reads only a time with its offset, so
nothing read it: the key rested quotaRest (15 min), the held refusal said
"not asked again before" a quarter-hour on (17:12, this magpie's local
time with no zone), and after it Z.ai was asked and refused again until
20:12 Beijing time.
- routing.go: zhipuResets/resetsZhipu read Zhipu's own words ("Your limit
will reset at", "您的限额将在") then a whole date and a time to the
minute at least, in UTC+8; not when a digit, colon or zone follows
(cut in its seconds, or a zone of its own, which resetsWritten reads).
resetsAt tries it after resetsWritten, so restAfter and keepRetry both
see it, for the built-in key, a relay passing it on, and a Remote
magpie's held refusal.
- heldClock: a held time is given as "20:12 UTC+8" (today) or
"Oct 16 09:00 UTC+8", since its reader may be a Remote magpie's user on
another clock. Siblings: the quota-held 429 (gateway.go), the capped
window error (fallback.go), the spent searcher (search.go) and describer
(vision.go), all of which wrote Local() with no zone.
- docs/subsystems/gateway-routing.md says both.
The "manual weekly reset" was Z.ai's weekly reset card, spent on Z.ai's
site (magpie only counts them, b69b0e810). It clears the weekly window;
the 5-hour window stays full, which is the 1308 Player got. Not a magpie
bug.
The held message's parenthesis is balanced in the code; Player's quote
was cut before the ")".
Run:
- TestResetsZhipu: Player's literal words (no seconds), Z.ai's OpenAI and
Anthropic envelopes, senpi#3348's case (39s), kodus#2104's 1310,
bigmodel.cn's Chinese raw and \u-escaped, a Remote magpie's held line;
not read: cut in seconds/after the colon/in the minute/in the date, its
own UTC/+00:00/Z, month 13, hour 25, past, over a week, WorkBuddy's
words without offset, a date in passing.
- TestHeldClock in UTC+8, UTC and UTC-3:30, today and tomorrow.
- TestZhipuRestsUntilItsReset: a 1308 three hours off rests the key three
hours (Retry-After), Z.ai asked once, and the held refusal names the
time with its offset.
- Broken by hand: resetsZhipu taken out of resetsAt, TestResetsZhipu and
TestZhipuRestsUntilItsReset go red (Retry-After "900"; held refusal
"Z.ai reset at 20:12:53 … not asked again before 17:27 UTC+8", the
reporter's bug); heldClock put back to Local().Format("15:04"), the
end-to-end test goes red ("not asked again before 20:13").
- go test -tags nogui -p 1 -run 'Zhipu|Reset|Rest|Held|Quota|Cap|Spent|
Searcher|Vision|Written' ./internal/gateway: ok.
- gofmt -l clean; go vet -tags nogui ./... on darwin, linux, windows: ok.
- The full suite ran out of disk on this machine (df / down to ~1 GB,
45 "no space left on device" in agent, cli, davsync, gateway, gui,
library, provider, sessions); it is not a record.
Full suite: SUITE_LINE