Repository navigation
Commit 6a3e5df
committed
fix(codex): stop reporting a 5-hour window as the weekly quota
A K12-style plan sends a 5-hour primary window plus a 7-day secondary. The
parser folded the primary into `weeklyPercent` whenever it was not explicitly
monthly, so the 5-hour bar was reported AS the weekly quota and the real weekly
reading -- the one that actually gates the account -- was discarded.
The primary window is now skipped for the weekly slot when it DECLARES a
duration shorter than a day, letting the 7-day secondary land there instead.
A window with no declared duration is deliberately unchanged: older WHAM
payloads omit `limit_window_seconds`, and inferring a duration there would
reclassify every legacy account. That is why the discriminator is "declares a
sub-day duration" rather than "is not seven days".
This is the narrow correctness half of #1791. The broader generic-window
storage (keeping every upstream window with its own reset, rather than two
named slots) touches ~158 call sites across quota, routing, capacity, CLI and
API surfaces, and is planned separately in
devlog/_plan/260816_wave34_closeout/050_1791_quota_windows.md.
Refs #1791.1 parent 50ad068 commit 6a3e5df
2 files changed
Lines changed: 64 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
| |||
160 | 173 | | |
161 | 174 | | |
162 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
163 | 185 | | |
164 | 186 | | |
165 | 187 | | |
| |||
465 | 487 | | |
466 | 488 | | |
467 | 489 | | |
468 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
469 | 498 | | |
470 | 499 | | |
471 | | - | |
| 500 | + | |
472 | 501 | | |
473 | 502 | | |
474 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1240 | 1273 | | |
1241 | 1274 | | |
1242 | 1275 | | |
| |||
0 commit comments