Files
magpie/internal
yetone 009076a2a4 gateway: group stand-in tests make Codex low by its 5 hours, a week at 92% is spent first (#5209)
d5d48f4f9 (v0.1.2920, ysicing_01858) stopped counting a week at 90%+
alone as "low": what the week has left is lost at its reset, so it is
spent before what keeps. TestGroupBackupStandingInWhileTheFirstIsBackAndBehind
and TestGroupMemberPutFirstOnItsMeritsKeepsItsCache used "Codex at 92% of
its week" only as a way to put Codex behind the pay-as-you-go key; their
guarantees (the stand-in keeps the conversation while the first is
behind, a member put first on its merits keeps its cache) are about the
stand-in and the cache, not about weeks. Under the new rule a Smart group
spending a subscription's week before a paid key is right, so the rule
gets no exemption: the tests now put Codex behind with its 5-hour window
at 92% (a rate cap, still low) and bring it back to 10%.

New: TestGroupWeekLowIsSpentBeforeTheKey states the new rule in a group:
Codex back at 92% of its week with 5 hours to spare takes a new
conversation ahead of the key listed after it.

Run (mote-run, at 9595a503a, origin/main):
- go test -count=1 -run 'Group|WeekLow|StandIn|Backup' ./internal/gateway: ok 63.8s
- gofmt -l: clean
Broken by hand: seatTier's WeekLow clause taken out (a week at 92% is
tier 1 again) -> TestGroupWeekLowIsSpentBeforeTheKey red ("went to mimo
(first), want codex"); restored.
Not tried: the full suite (runs after this ships); real accounts.
2026-11-04 17:39:36 +08:00
..
…
…
…
…
…
…
…
…