GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Quota-aware walling: bench providers whose binding window is <1% and failing with quota errors · Issue #2256 · developing-today-forks/opencode

Quota-aware walling: bench providers whose binding window is <1% and failing with quota errors #2256

New issue
Copy link
New issue
Copy link
Closed
#2598
Closed
Quota-aware walling: bench providers whose binding window is <1% and failing with quota errors#2256
#2598
Copy link
Labels
effort/mMedium: expected under 1 day of workepic/opencode-platformEpic: opencode-platform - all issues of this effort carry itkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 10, 2026
Issue body actions

Doctrine (Drew, 2026-11-10)

Providers are never put in disabled_providers for quota reasons. The fork owns walling: it has the measured quota (the same read the gatherer publishes) and it sees every failure. A provider whose binding window is nearly gone and is failing must be treated as walled by the router itself.

Drew's words: "you don't put models to disabled — the opencode fork should know the quota and see the failures and figure out that it's below 1pct and failing every time or has a quota related error". And on the concrete case: "$0.05 left is walled, nothing will run."

Today's evidence (2026-11-10, live reads)

  • Command Code monthly measures 99.513% used ($9.95 / $10 — $0.05 left); its 5h reads 0/3, weekly 64.6%.
  • The quota read still reports the provider state as "ok"; it is not in disabled_providers (removed 2026-11-06 on Drew's order, in reliance on the availability system).
  • Its seats remain live in the plan pools (deepseek-flash-plan weight 1, deepseek-pro-plan weight 0.5), so sessions can still be routed onto a pool that cannot pay for a real call.
  • Provider availability: one state machine for quota / rate-limit / unknown / infra stops #1828's availability state machine benches on a classified quota/balance failure and releases on measured increase — but the bench decision does not use the measured quota level itself: at <1% remaining the router keeps offering the seats until failures accumulate, one dribbling session at a time.

Expected behavior

  1. The route layer consumes the measured quota per provider (binding window = the window that actually gates calls, e.g. monthly for Command Code).
  2. When the binding window measures <1% remaining AND the provider is returning quota-class errors (or failing every attempt), the provider is walled immediately: benched, seats not offered, no further attempts dribbled into it.
  3. Rejoin is the existing measured-increase path (window reset or balance increase re-admits automatically) — never a config edit, never disabled_providers.
  4. The wall state is visible in the route/quota surfaces as walled-below-1%, distinct from a generic error bench, so reports stop describing a dead pool as "ok / not walled".

Acceptance

  • With a provider at <1% on its binding window and quota-class failures present, route decisions show it walled with zero new attempts routed to it.
  • A measured increase on the binding window re-admits it with no config change.
  • Command Code today would read as walled under this rule ($0.05 of $10 left).

Activity

  1. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    Author
    More actions

    Refinement (Drew, 2026-11-10 14:36 CST)

    Two corrections to the trigger design:

    1. One failed call could be anything and must not bench a provider forever. A lone failure — any class — is not a wall. Transient benches recover on their own; nothing in this issue asks for permanent benching from a single error.
    2. The wall signal is the combination, not either half alone:
      • the measured quota on the binding window is nearly gone (the concrete case: $0.05 of $10 left, <1% remaining), and
      • the failures are errors that imply plan limits (quota-class: insufficient credits / quota exceeded / balance exhausted) — not generic errors.
    3. Action on that combined signal: wall the provider — or at minimum fully deprioritize it (effective weight ~0, never picked while any alternative exists). Either satisfies the requirement; a full wall is the cleaner form.
    4. Release stays as specified: measured increase on the binding window (reset/refill) re-admits automatically.

    In short: low-quota alone is a warning state; low-quota + plan-limit errors is a wall.

  2. dezren39
    added
    epic/opencode-platformEpic: opencode-platform - all issues of this effort carry it
    on Nov 12, 2026
  3. dezren39
    added a parent issue on Nov 12, 2026
    • epic: opencode fork — platform work #2319
  4. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    kind/featureNew feature or capability request
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/claimedA queue worker has claimed the task for this item
    status/in-progressActively being worked
    on Nov 17, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    Author
    More actions

    state: triaged
    task: 17590
    lane: any-c
    work_kind: task/small-fix
    priority: priority/normal — quota routing correctness for the opencode fork; useful and doctrine-backed (Drew, 2026-11-10), but not fleet-stalling breakage, so default band.
    effort: effort/m — route layer must consume the measured quota per provider, add the combined wall trigger, and surface a distinct walled-below-1% state, with tests.
    kind: kind/feature

    Fresh verification this shift (2026-11-17T01:20Z):

    • Issue Quota-aware walling: bench providers whose binding window is <1% and failing with quota errors #2256 is OPEN, labels only epic/opencode-platform; no held / user/owned / do-not-merge / do-not-auto-edit labels, no status/needs-triage.
    • Parent availability state machine Provider availability: one state machine for quota / rate-limit / unknown / infra stops #1828 is CLOSED — the bench machinery this builds on exists.
    • Open PR fix(core): bench permanent plan/tier refusals as plan walls (#10128) #2570 (plan/tier refusals as plan walls) is related but distinct: it classifies error signatures, it does not consume the measured quota level. Quota-aware walling: bench providers whose binding window is <1% and failing with quota errors #2256 is not already done.

    Triage verdict: the combined signal in the issue (and Drew's 2026-11-10 refinement comment) is the spec — measured binding-window quota <1% remaining AND quota-class (plan-limit) errors present => wall (or fully deprioritize to effective weight ~0); a lone failure of any class never walls; low quota alone is a warning state only. Release is the existing measured-increase path; never disabled_providers, never a config edit.

    First concrete step for the follow-on fix: in packages/core/src/model-route.ts (and the quota read it already consumes), feed the per-provider binding-window remaining fraction into the bench decision alongside the classified failure hint, and add the walled-below-1% availability state.

    Acceptance check for the fix: with a provider at <1% on its binding window and quota-class failures present, route decisions show it walled with zero new attempts routed to it; a measured increase on the binding window re-admits it with no config change; Command Code at $0.05 of $10 left reads as walled under this rule. Tests must name their oracle (the combined-signal rule above).

  6. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    Author
    More actions

    state: done (triaged)
    task: 17590
    lane: any-c

    Triage complete for task 17590. Verdict and evidence are in the triage note above (comment 6934849107): task/small-fix, priority/normal, effort/m, kind/feature. The fix is genuinely separate follow-on work, so it is routed as its own packet: task 19434 (small_fix, repo-health-opencode-pilot, dedupe repo-health:v1:fix:developing-today-forks/opencode:issue:2256). Issue #2256 stays OPEN pending that fix.

  7. dezren39
    added
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressActively being worked
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 17, 2026
  8. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    Author
    More actions

    🤖 Agent note · parked — resume brief

    • Agent: repo-worker-openchamber (OpenChamber scheduled lane, not-code-d)
    • Queue task: 19434 (repo-health-opencode-pilot), origin openchamber-scheduled-lane
    • State: parked for 20 min. No code changed. Worktree ~/git/fleet/19434-2256-quota-wall, branch queue/19434-2256-quota-wall, base origin/main.
    • Finding: the existing gatheredQuotaWall in packages/core/src/model-route.ts walls on the full-window threshold only. The combined rule (binding window <1% remaining AND quota-class errors) and the walled-below-1% state are not implemented yet.
  9. dezren39
    closed this as completedin #2598on Nov 17, 2026
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    Author
    More actions

    Agent note — done (task 19434, lane not-code-b): fixed and merged

    Adopted the parked not-code-d worktree/branch (no code had been changed) and implemented the combined-signal wall. PR #2598 MERGED; issue #2256 closed via the PR's Fixes reference.

    • packages/core/src/model-route.ts: gatheredNearEmptyWall (binding window strictly above 99% used + quotaFailureSignal, fresh reading, reset not yet passed), plantGatheredNearEmptyWall (skip record with the distinct walled-below-1% note, lifted only by a fresh complete reading at/below 99% — the measured-increase path), availability() entry (class quota, reason walled-below-1%: …, resume reset), new health-log kind quota-walled-below-1pct.
    • packages/core/src/model-resolver.ts: the plant rides the gathered feed (refreshQuotaSkips) next to the full-wall plant.
    • Tests (+3 in model-route.test.ts, oracle = the combined rule): low quota alone walls nothing; 99.5% + quota failure walls until the monthly reset and re-admits at 90%; exactly 99% and generic failures state no wall. Suites: model-route + availability 172 pass, resolver/quota-current/route-log 164 pass, core typecheck clean, oxlint clean. Review disposition: no Codex review ran and no review comments were posted before merge (checked after a wait) — nothing undispositioned.

    agent-note:v1 lane=repo-queue-worker-shift-not-code-b task=19434 stage=done outcome=fixed_merged pr=2598

  11. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mMedium: expected under 1 day of workepic/opencode-platformEpic: opencode-platform - all issues of this effort carry itkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.