You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Quota reads: Command Code reports plan windows, not the top-up balance (extractor renders stale read) #3410
All Command Code quota reads report the plan windows only: monthly limit (% used, or $ used of the $10 included credits), weekly %, 5-hour %. The extra/top-up credit balance (the studio billing/credits figure) is not a quota figure — never report it as the pool's state, never wall the pool on it.
Defect 1 — aggregator renders a stale Command Code read as current
pm-stack/aggregator/src/quota-extract.tsextractCommandCode takes the first$X of $Y used match in the quota view's Command Code section. The section's freshest dated read (console, 2026-10-27: monthly limit 69% used, weekly 14%, 5h 0%, top-up balance $0.00 recorded separately) is percentage-only, so it never matches. The extractor falls back to the 2026-10-25 line ($6.57 of $10 used; 5h 1.2%, weekly 8.8%) and /api/quota.json presents week-old figures as the current pool state (verified live 2026-11-01 01:45 CDT).
Fix: select the latest dated read in the section; support the percentage-only console format ("monthly limit N% used", "weekly limit N%", "5-hour limit N%"); if the freshest read cannot be parsed, render no windows rather than a stale one. Add a regression test pinning latest-read selection (the section carries several dated reads by design).
Defect 2 — balance read as quota in hub/steward reporting
Hub reads on 2026-10-30/31 reported Command Code as "credits 0.1" (the top-up balance) for 20+ consecutive intervals and the pool was treated as walled-in-effect on that basis, while the plan windows showed room. Any reader/collector path that maps a balance field into the commandcode:go pool's quota state must be removed or remapped to the plan windows per the ruling above.
Acceptance
/api/quota.jsoncommandcode:go reflects the freshest dated plan read in the quota view.
A test pins latest-dated-read selection in extractCommandCode.
No code path emits the top-up balance as Command Code quota.
Drew prioritized this in main chat 2026-11-01 (~01:57 CST), right after ruling that all Command Code quota reads use the plan, not the balance. Queue task reprioritized to the breakage tier (priority 10) in repo-health-code-pilot — the dashboard is currently stating week-old Command Code quota as if it were current.
agent-note:v1 — queue task 5251 (lane A) — picked up
Implementing Drew's 2026-11-01 ruling in pm-stack/aggregator/src/quota-extract.ts: extractCommandCode will select the latest dated read in the Command Code section, support the percentage-only console format (monthly limit N% used / weekly limit N% / 5-hour limit N%), render no windows when the freshest dated read cannot be parsed, and never emit the top-up balance as quota. Regression test pins latest-dated-read selection.
extractCommandCode now segments the Command Code section at ISO date stamps and renders the latest dated read in any recorded format (dollar, percentage-only console, compact restatement); a newer unparseable monthly read (including a later same-day one) renders no windows instead of a stale read, and the top-up balance is never emitted as quota.
Evidence: quota tests 51/51 (4 new regression tests), full aggregator suite 795/795 on the implementation head; live check against the current quota view gives monthly 69% / weekly 14% / 5-hour 0% (the 2026-10-27 console read). Codex reviewed both heads — the one P2 (same-day ordering in the stale guard) was fixed in 08e6438 and the re-review is clean. Merged as f1eac95.
Activity
developing-today commentedon Nov 1, 2026
CODE-1303
dezren39 commentedon Nov 1, 2026
Drew prioritized this in main chat 2026-11-01 (~01:57 CST), right after ruling that all Command Code quota reads use the plan, not the balance. Queue task reprioritized to the breakage tier (priority 10) in repo-health-code-pilot — the dashboard is currently stating week-old Command Code quota as if it were current.
dezren39 commentedon Nov 1, 2026
agent-note:v1 — queue task 5251 (lane A) — picked up
Implementing Drew's 2026-11-01 ruling in
pm-stack/aggregator/src/quota-extract.ts:extractCommandCodewill select the latest dated read in the Command Code section, support the percentage-only console format (monthly limit N% used / weekly limit N% / 5-hour limit N%), render no windows when the freshest dated read cannot be parsed, and never emit the top-up balance as quota. Regression test pins latest-dated-read selection.fix(aggregator): same-day ordering for the Command Code stale-read gu…
Merge pull request #3413 from developing-today/queue/5251-3410-comman…
dezren39 commentedon Nov 1, 2026
agent-note:v1 — queue task 5251 (lane A) — done: PR #3413 merged, #3410 closed
extractCommandCodenow segments the Command Code section at ISO date stamps and renders the latest dated read in any recorded format (dollar, percentage-only console, compact restatement); a newer unparseable monthly read (including a later same-day one) renders no windows instead of a stale read, and the top-up balance is never emitted as quota.Evidence: quota tests 51/51 (4 new regression tests), full aggregator suite 795/795 on the implementation head; live check against the current quota view gives monthly 69% / weekly 14% / 5-hour 0% (the 2026-10-27 console read). Codex reviewed both heads — the one P2 (same-day ordering in the stale guard) was fixed in 08e6438 and the re-review is clean. Merged as f1eac95.