Repository navigation
Description
Defect: quota gates are credential-scoped and family-blind — one family's wall silences its sibling family on the same credential
Live evidence (2026-11-07): _antigravity (provider id in telemetry: antigravity-direct) — the Gemini family sat at 4% weekly used, OPEN (reset 2026-11-13T23:43Z) with live seats (gemini-flash-plan is a pool of ONE in the speed route; argon-plan; sonnet/opus fallback), yet recorded zero attempts for ~26h (last 2026-11-07 01:52:52Z).
Mechanism, all three layers verified in opencode.db + fork source:
- Provider skip is family-blind by construction. When the Claude/GPT family exhausted (weekly 100%),
observeQuotaFailure(credential-less path,packages/core/src/model-route.ts) planted ONE durable adjustmentquota:antigravity-directwithmatch: "antigravity-direct/",until= the Claude family's stated reset 2026-11-09T09:00:22Z. The match is a provider-prefix substring (model-resolver.ts:ModelRoute.skipped→ reasonuser-skip): it matches Gemini targets identically. There is no per-model-family dimension on provider-scope skips. - Credential gate state is credential-scoped, not family-scoped. The Antigravity credential's gate/cooldown state (route_health rows: thousands of
cooldown-startfor the credential, incl.gemini-3.8-flashtargets benched withquota retry-after+quota-gated … quota-known-fullagainst the Claude window's reset) is restored at every server start byrestoreCooldownsFrom(model-route-log.ts, 24h replay window). The 2026-11-07 21:04 CST restart re-armed the Gemini targets' benches from the Nov 6 Claude-family exhaustion. - The last Gemini decision on record (2026-11-07 01:52:52Z,
gemini-flash-plan) already shows the shape: the pool-of-one's only candidate present in weights yetexcluded: cooldown-until:…— after which the route stopped producing served attempts entirely.
So: the Gemini family is healthy, its quota is open, and it is unroutable until the Claude/GPT reset (Nov 9 09:00Z) — because every gate dimension the router has (provider skip, credential gate, credential cooldown restore) is scoped at provider-or-credential granularity, never at the model-family/quota-window granularity the provider's own quota actually has (the quota gatherer already reports the two families as separate windows: Gemini 4% vs Claude+GPT 100%).
Ask
- Scope quota gates to the quota window/family they were derived from: a gate derived from family A's exhaustion must not exclude family B targets on the same credential/provider. Concretely: provider skips from
observeQuotaFailureshould carry the model(s) that reported exhaustion (matchprovider/modelprefix), falling back to provider scope only when the report is genuinely provider-wide; credential restore should not re-arm benches on targets of a different family than the one whose window the bench's reset belongs to. - Until then, the finest config-level remedy is none: the skip is one durable record with a provider-prefix match; there is no supported way to exempt one family from it.
Related: #1974 (same staleness class, different mechanism — bench evidence vs lapsed gates in the pool verdict).
Acceptance criteria
- Quota adjustments are scoped per model family: a wall in one family (e.g. Claude) cannot skip routes of a sibling family (e.g. Gemini) sharing the credential/provider prefix.
- A regression test proves a provider-prefix quota adjustment for one family leaves sibling-family targets attemptable.
- After the fix, live telemetry shows the under-quota family recording attempts again (the Antigravity Gemini case in the issue: 4% used, zero attempts for ~26h).
- Single-family skip behaviour is otherwise unchanged (same-family exhaustion still skips, with the family's own reset).
Activity
dezren39 commentedon Nov 8, 2026
Design rule recorded (Drew, 2026-11-07 23:02 CST):
And its companion ruling (23:03 CST): removing records manually doesn't fix anything — fix the code.
Consequence for this issue: the family-scoping fix must scope quota state per model/provider leg — a provider-wide skip written by one model family's failures must not exclude sibling families, and no route-group (pool) aggregation may reintroduce the exclusion at group level. The pool-verdict synthesis (
ModelRoute.poolQuotaExhausted, thepool-quota-exhaustedexclusion reason) is removed by the abolition PR linked below: a route group is excludable only leg-by-leg, each leg by its own gate state, with per-leg reasons preserved in decision detail.Re-admission form (Drew, 2026-11-07 23:17 CST): re-admission and eligibility derive from per-model/provider quota state and per-leg gate state — quota-driven, judged from the provider's actual quota state (the fleet quota snapshot), never by spending probe attempts. No pool verdicts, no probes.
Abolition PR: #1979
fix(core): quota-driven quota-skip re-admission + per-model reactive …
Merge pull request #1978 from developing-today-forks/fix/quota-gate-r…
dezren39 commentedon Nov 8, 2026
Triage evidence — issue-sweep-rotating feeder, 2026-11-08
Verdict: PARTIALLY FIXED — one remainder still present on current main; feeding a triage packet for the remainder only.
Checked (fresh
ghcalls, verified twice):07b0352b45d8f32f2557ffae4001b0139c1ccd1e; this issue OPEN, no labels, 1 comment before this one (Drew's 2026-11-07 design rule), noqueue/*/work/*/ safety labels.repo-health-opencode-pilot(queued/claimed/parked/blocked, untruncated) contain no task naming issue 1976 — the remainder is not already in-system. (Separate and NOT this remainder: fix(core): quota re-admission (#1974) judges a model by whichever window iterates last — a still-full window fails to hold the skip when another window sorts after it #2036, queued as task 13042, covers the modelWindowReading last-iterated-window bug in the merged re-admission fix.)observeQuotaFailurenow plants model-scoped skips, with provider scope only on corroboration. Its body states plainly what it did NOT do: "fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976's credential-restore layer — per-target benches restored fromroute_healthcan still carry a sibling family's reset on a shared credential, because per-family quota windows on one credential aren't modelled anywhere in the gate state. That needs its own design and is the remaining open part of fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976."packages/core/src/model-route-log.tsrestoreCooldownsFrom(:355) replays 24h ofroute_healthrows and keys restored benches byprovider/model#credential— there is no model-family / quota-window dimension in the restored gate state, so a bench whoseuntilcame from one family's window still restores onto sibling-family targets of the same credential.What "done" looks like for the triage task:
agent-note:v1comment; route any implementation as a follow-up packet — design/triage only inside this task.Feeder:
issue-sweep-rotating(enqueue-only triage feeder; it does not fix, open PRs, or self-assign).dezren39 commentedon Nov 8, 2026
agent-note:v1
feeder: issue-sweep-rotating
action: enqueued triage packet (remainder only)
queue: repo-health-opencode-pilot
task_id: 13150
dedupe_key: repo-health:v1:triage:developing-today-forks/opencode:issue:1976
evidence: triage evidence comment posted this run (PR #1978 merged the provider-skip layer; its stated credential-restore remainder still present on main 07b0352, model-route-log.ts restoreCooldownsFrom :355 has no family/window dimension)
next: queue lane owns the remainder design/triage; feeder does not fix or self-assign. #2036 (task 13042) is separate and not this remainder.
dezren39 commentedon Nov 8, 2026
Intake review
Related: parent façade design #1146; sibling open defect #1806 (failover traps sessions on a quota-walled member — same subsystem, different mechanism); provider-naming design #1823.
Live check: search found no merged PR or closed issue addressing family-scoped quota gates; the defect was verified live 2026-11-07 against opencode.db + fork source per the issue.
Notes / risks: this silently wastes a paid pool — a family at 4% usage sat idle for ~26h. The adjustment record needs a family dimension, not a narrower prefix hack, or the next provider layout recreates it.
Suggested approach: add the family dimension to the quota adjustment +
ModelRoute.skippedmatching, backfill existing adjustments conservatively (treat legacy prefix adjustments as family-unknown and expire them at their stated reset), and add the sibling-family regression test.— fleet monitor (repo-fleet-monitor), 2026-11-08 08:12 CST run: acceptance criteria appended to the body, labels normalized,
meta/enrichedapplied.11 remaining items
dezren39 commentedon Nov 8, 2026
🤖 Agent note · picked up
Merge pull request #2160 from developing-today-forks/queue/13840-1976…
developing-today commentedon Nov 8, 2026
Agent note (task 13840, lane opencode-a): this tasks implementation already landed as PR #2160, merged 2026-11-08T20:03:55Z (merge commit 1fcc4b5, in current main history). Verified on fresh origin/main: seedCooldowns re-judge logic present in packages/core/src/model-route.ts and the 5 restore tests present in model-route-log.test.ts. PR #2160 verification: model-route-log 47 pass, model-route + quota-current 146 pass, tsc clean. Completed queue task 13840 as already_done; issue #1976 itself remains open (PR #2160 did not close it). agent-note:v1 repo-queue-worker-shift-opencode lane-a task 13840
dezren39 commentedon Nov 17, 2026
🤖 Agent note · done — already triaged, implementation already landed
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged — already resolved in code, live confirmation pending
dezren39 commentedon Nov 23, 2026
Claim — Lane WJ (archer), 2026-11-23. Taking opencode#1976 for a verification pass: both code layers are recorded landed (PR #1978 provider-skip family scoping; PR #2160 credential-restore re-judge + tests, both 2026-11-08). The one acceptance criterion never discharged is the live-telemetry one (under-quota sibling family recording attempts again). I will re-verify the code state on current main, run the focused suites, and check live route telemetry on the laptop; close only if every criterion verifies first-hand, otherwise post the verification record with the precise remainder.
dezren39 commentedon Nov 23, 2026
Done — Lane WJ (archer), 2026-11-23. Closing as completed: all four acceptance criteria verified first-hand this pass.
Code criteria (re-verified on current main
8b778a8024, worktree run on the laptop):observeQuotaFailureinpackages/core/src/model-route.tsplants a skip naming the answering target alone (explicit#1976comment in source); provider scope is reached only on two-source corroboration — a second distinct target of the provider answering quota while the first hold stands — which is the issue's own "genuinely provider-wide" fallback. Credential restore (seedCooldowns) re-judges each restored quota bench against the current gathered reading for that row's own provider/model window and drops the bench when that window is not known-full.model-route.test.ts("a credential-less quota answer skips only the answering target (fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976)", "a second family's quota answer corroborates the skip to provider scope (fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976)", "two families out promotes the hold to provider scope; one family stays model-scoped (fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976)"),model-route-credential.test.ts(credential-less exhaustion scoping, fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976),model-route-log.test.ts("quota cooldown restore re-judged against current quota (fix(core): quota gates are credential/provider-scoped and family-blind — Antigravity Gemini (4% used) silenced by its Claude family's wall #1976)").model-route.test.ts160 pass / 0 fail;model-route-credential.test.ts+model-route-log.test.ts84 pass / 0 fail. (Laptop route; dispatched verification is unavailable — the fleet-build container has no bun, the code#13159 family gap.)Live-telemetry criterion (the one prior passes left pending) — verified from the laptop's live
opencode.db:In the week after the fix landed (PR #1978 2026-11-08T06:26Z, PR #2160 2026-11-08T20:03Z), while the Antigravity door was live, Gemini-family targets on antigravity providers recorded attempts every day: Nov 8: 6,869 attempts / 6,661 success · Nov 9: 723 / 112 · Nov 10: 764 · Nov 11: 10 · Nov 12: 24 · Nov 13: 413 / 193 · Nov 14: 2,358 / 1,090.
The defect's exact shape is discharged on 2026-11-10:
claude-sonnet-5-5recorded 410 cooldown-starts that day (the Claude family being benched hard) whilegemini-3.8-flashstill recorded 764 attempts the same day, answered and failing on their own merits (RateLimit/Authentication) — pre-fix, that Claude benching is what silenced Gemini for ~26h (Nov 6–7 evidence in the issue).After 2026-11-14 the whole Antigravity door went silent for both families together and Gemini traffic moved to the
google.*providers (live through today) — a provider-level change with the opposite signature of this defect, not family-blind gating.