Repository navigation
Description
Problem
The quota window-contract parser inventory (packages/ai/src/quota/types.ts, the contract's own record of which parsers are conforming vs known-lossy) still marks two parsers as KNOWN-LOSSY for issues that are closed-completed and fixed on main, and the shared probe matrix header in packages/ai/test/quota.test.ts repeats the stale claim. The inventory's own rule (types.ts, and the matrix header at quota.test.ts:1079-1085) is that a parser's issue "flips" its row when it lands — for these two, the flip never happened, so the contract's oracle now misdirects anyone extending or auditing the parsers.
Evidence (verified this run, main 529cf7f)
- antigravity row (types.ts:64-67): says the transforms
parseBucket/transformSummary/transformModels"are module-private" and marks the parser "KNOWN-LOSSY: fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768". In fact all three are exported (packages/ai/src/quota/providers/antigravity.ts:272,310,343),quota.test.tsimports them (line 9), issue fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768 is CLOSED (COMPLETED, 2026-11-06T11:34:28Z), and the dedicated describe "antigravity quota bucket labelling (fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768)" (quota.test.ts:1420) pins the fixed behaviours: unrecognized window strings skipped, same-label collisions keep-first, missing remainingFraction propagates as null. - mistral row (types.ts:97-99): "KNOWN-LOSSY: fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785 (usedPercent clamped while usedAmount is derived from the raw percentage...)". In fact
parseBudgetderivesusedAmountfrom the clamped percent (packages/ai/src/quota/providers/mistral.ts:75-78), issue fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785 is CLOSED (COMPLETED, 2026-11-06T11:29:46Z; fix 8b601e1 via PR fix(ai): keep Mistral budget fields consistent #1836), and quota.test.ts:81-91 pins "clamps over-100 usage consistently for percent and amount" plus the negative case. - matrix header (quota.test.ts:~1079-1085): lists antigravity (fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768) and "mistral field consistency (fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785)" among the parsers that "are NOT asserted as conforming" and "live in the types.ts inventory as known-lossy until their own issues land and flip their rows".
- Control rows verified still accurate this run: claude fix(ai): claude quota transform silently overwrites duplicate limits entries (last wins) — diverges from the #1750 keep-first convention #1781 OPEN, meta fix(ai): meta quota rolling window keyed only by derived label — a weekly-length rolling window is silently overwritten by the weekly window #1777 OPEN, opencode-go/openrouter test(ai): PR #1722's quota suite pins 4 of its pure parsers — opencode-go's three parsers and openrouter's reset math have none, and opencode-go silently drops windows its siblings would keep #1725 OPEN — those rows stay lossy.
Why it matters
The inventory is the contract's index (window contract rule 7): producers and reviewers deciding where quota-parser risk remains read these rows first. Two stale lossy marks hide two now-conforming parsers from the shared-matrix conformance set, overstate the remaining #1794 work, and understate regression risk — a future change that re-breaks mistral field consistency or antigravity bucket labelling would look "already known-lossy" instead of like a regression.
Acceptance criteria
- types.ts inventory: antigravity row corrected (transforms exported, fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768 disposition recorded as landed/conforming) and mistral row flipped to conforming (fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785 landed), with wording matching the current code.
- quota.test.ts shared-matrix header no longer lists fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768 / fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785 as known-lossy-not-asserted.
- Triage decides the rule-7 pinning shape and records it in the header: either mistral + antigravity cases join the shared probe matrix, or the header names their dedicated describes (fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768 / mistral-budget describes) as their pins.
- No production behaviour changes; quota suite green.
Activity
dezren39 commentedon Nov 7, 2026
🤖 Agent note · filed
developing-today commentedon Nov 7, 2026
Picked up by
repo-worker-opencode-a— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-opencode-aposts progress markers; after 30 minutes of silence any other worker may pick this up.)developing-today commentedon Nov 7, 2026
Progress from
repo-worker-opencode-a: triaged-confirmed at main 10f3058: types.ts rows for antigravity #1768 and mistral #1785 still KNOWN-LOSSY though both issues are CLOSED-COMPLETED and the code/tests show the fixes; matrix header :1137 still lists them; triage decision on the rule-7 pinning shape recorded in the note; routing task/small-fixdeveloping-today commentedon Nov 7, 2026
Triage — CONFIRMED, with the criterion-3 decision recorded (lane opencode-a, fallback mode)
Verified fresh against
origin/main@10f305865fe8(laptop primary~/git/opencode, clean, on main):packages/ai/src/quota/types.ts:66— the antigravity row still says the transforms are module-private and marks the parserKNOWN-LOSSY: #1768. In factparseBucket/transformSummary/transformModelsare exported (packages/ai/src/quota/providers/antigravity.ts:271,309,342), and the dedicated describe "antigravity quota bucket labelling (fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768)" sits atpackages/ai/test/quota.test.ts:1476.packages/ai/src/quota/types.ts:98— the mistral row still readsKNOWN-LOSSY: #1785. In factparseBudgetderivesusedAmountfrom the clamped percent (packages/ai/src/quota/providers/mistral.ts:usedAmount: (clampedUsedPercent / 100) * budgetAmount).ghreads this shift): fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768 and fix(ai): mistral quota budget window disagrees with itself — usedPercent clamped, usedAmount derived from the raw percentage #1785.packages/ai/test/quota.test.ts:1137–1140) still lists antigravity (fix(ai): antigravity quota buckets keyed only by derived label — an unrecognized bucket overwrites the real 5h window, same-label buckets silently drop, missing remainingFraction counts as fully remaining #1768) among the parsers "NOT asserted as conforming … known-lossy until their own issues land" — both flips are owed, as filed.Criterion-3 decision (triage-owned): the header names the dedicated describes as the pins — option B. Rationale: both parsers' fixed behaviors are already pinned in detail by their dedicated describes (antigravity bucket labelling at :1476; the mistral budget clamp/negative cases), which exercise parser-specific shapes the shared probe matrix does not express; duplicating them into the matrix would add maintenance without new coverage. The corrected header should therefore remove #1768/#1785 from the not-asserted list and point at those describes as their rule-7 pins, and the types.ts rows should record both as landed/conforming.
Routing:
task/triage→task/small-fix, back toqueue/queuedwithstatus/needs-triage. Docs/comments only, no production behavior change; quota suite green is the check. No Drew decision needed — the decision the criteria reserved was triage's, and it is recorded above.agent-note:v1 · agent: repo-queue-opencode-worker-a · lane: opencode-a · mode: fallback (queue backend down, code#6619)
5 remaining items
dezren39 commentedon Nov 7, 2026
Picked up by
repo-worker-opencode— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-opencodeposts progress markers; after 30 minutes of silence any other worker may pick this up.)dezren39 commentedon Nov 7, 2026
Progress from
repo-worker-opencode: verified: revalidating types.ts inventory rows + quota.test.ts header against fresh main; next: worktree + docs fixdezren39 commentedon Nov 7, 2026
Progress from
repo-worker-opencode: implementation_complete: inventory rows flipped, quota suite 126 pass; next: PR + mergeMerge pull request #1936 from developing-today-forks/queue/1909-1909-…
dezren39 commentedon Nov 7, 2026
Released by
repo-worker-opencode(outcome: done). fixed_merged: PR #1936 MERGED 2f7f264 (branch queue/1909-1909-quota-inventory); types.ts antigravity+mistral rows flipped conforming, quota.test.ts header names dedicated describes as rule-7 pins; bun test test/quota.test.ts 126 pass laptop; backlog + sweep.log updated