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 — fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth · Issue #1380 · developing-today-forks/opencode

fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380

New issue
Copy link
New issue
Copy link
Closed
#1393
Closed
fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth#1380
#1393
Copy link
Labels
priority/normalOrdinary priority (the default)

Description

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

Follow-up implementation issue for #1014 (routed by triage task 6187, 2026-11-02; the umbrella #1014 stays open — this issue owns only the two deferred CodeRabbit findings below, ported from #1014 comment 6561987451, not a re-file of the umbrella).

Items (deferred from PR #1190 review, recorded on #1014 comment 6561987451)

  1. Stale balance holds when a balance plan is deleted or reclassified (PR fix(core): gate balance-shaped quota pools by balance, not percent (#1014) #1190 thread, packages/core/src/model-route.ts ~779 in that diff): refreshQuotaGate returns early when no relevant plan/eligible window remains, so quota:<provider> / quota-credential:<id> adjustments from a deleted or reclassified balance plan can persist indefinitely; a windowHours reclassification also makes releasesHold reject the snapshot. Fix: clear the stale balance hold when no balance grant remains, replacing it with the remaining window's normal timed gate when one exists, while preserving the hold for a still-applicable depleted balance plan.
  2. Balance-exhaustion classification breadth (PR fix(core): gate balance-shaped quota pools by balance, not percent (#1014) #1190 thread, packages/core/src/session/runner/step.ts ~455 in that diff): generic exhaustion text (e.g. a plain HTTP 429 "You have reached your rate limit") can enter the balance-exhaustion branch when the prior snapshot has balance === true, installing an increase-only hold with no expiry. Fix: keep the broad match for entering the quota-failure path, but require an explicitly credit/balance-specific match (or QuotaExceeded) for the balance-exhaustion classification unless the provider contract establishes the text reports credits. (Note: issue fix(core): quota gate derivation includes expired/cancelled plans — a retained historical plan's smaller window can gate a provider whose current plan has capacity (PR #1028 Codex P2 unaddressed) #1340 covers a different quota-gate defect from PR fix(core): feed current quota reads into route candidacy gate (#984) #1028 — not this classification item.)

Acceptance

  • Both items fixed with dedicated tests (they change hold-release/classification semantics, which is why they were deferred from fix(core): gate balance-shaped quota pools by balance, not percent (#1014) #1190 rather than fixed in its merge).
  • A hold for a still-applicable depleted balance plan is preserved (no regression to PR1 balance gating, fix(core): gate balance-shaped quota pools by balance, not percent (#1014) #1190 merged 3739116).
  • Generic 429 rate-limit text alone no longer installs an increase-only, no-expiry balance hold.
  • Do not close ensure(core+openchamber): repeated errors of ANY class remove a model from rotation for escalating time, or until its expected resolution #1014 from this issue's PR; link it.

Activity

Next
  1. dezren39
    added
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    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
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    Author
    More actions

    🤖 Agent note · parked — sequencing gate on PR #1353

    • Agent: queue worker (repo-worker-opencode), event-hook launch
    • Session / ID: queue task 6192
    • Found via: queue claim · repo-health-opencode-pilot
    • Task: Implement fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 items 1–2 (stale balance holds; balance-exhaustion classification breadth).
    • Revalidation (fresh, 2026-11-02): fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels. BUT open PR fix(core): exclude expired and cancelled plans from quota gate derivation #1353 (issue fix(core): quota gate derivation includes expired/cancelled plans — a retained historical plan's smaller window can gate a provider whose current plan has capacity (PR #1028 Codex P2 unaddressed) #1340, branch queue/6006-1340-quota-plan-status, updated 2026-11-02T05:40Z) touches the same gate code: it adds reconcileQuotaGate to packages/core/src/model-route.ts (adjacent to observeProviderQuota, ~994) and edits packages/core/test/model-route.test.ts. Its reconcile step already clears plan-derived quota state and removes a durable balance baseline when its grant's plan has ended — directly adjacent to, and partially overlapping, item 1's stale-hold clearing in refreshQuotaGate/releasesHold.
    • Outcome: Parked 60 minutes, sequenced after PR fix(core): exclude expired and cancelled plans from quota gate derivation #1353 (fleet precedent: tasks 6121/6078 parked on PR fix(ci): scan packages/ai in the check:proto-reads gate #919 for the same-file gate). Stacking a second hold-clearing implementation now risks competing gate semantics and test-file conflicts; item 1's correct final shape depends on whether reconcileQuotaGate lands as-is.
    • Resume: Re-check PR fix(core): exclude expired and cancelled plans from quota gate derivation #1353 fresh. If merged: implement item 1 on top of reconcileQuotaGate (cover the deleted/reclassified-plan and windowHours-reclassification cases the reconcile does not), plus item 2 (step.ts classification breadth, independent of fix(core): exclude expired and cancelled plans from quota gate derivation #1353) with dedicated tests. If fix(core): exclude expired and cancelled plans from quota gate derivation #1353 is still open: either park again naming it, or split item 2 into its own PR and leave item 1 gated. No code changes this claim; no worktree created.
  3. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedA queue worker has claimed the task for this item
    status/in-progressActively being worked
    and removed
    status/in-progressActively being worked
    queue/claimedA queue worker has claimed the task for this item
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  4. 6 remaining items

  5. dezren39
    added
    queue/claimedA queue worker has claimed the task for this item
    status/in-progressActively being worked
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  6. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    Author
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-opencode), event-hook launch
    • Session / ID: queue task 6192
    • Found via: queue claim · repo-health-opencode-pilot
    • Task: Implement fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 items 1–2 (stale balance holds; balance-exhaustion classification breadth).
    • Revalidation (fresh, 2026-11-02): fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 OPEN; no held / user/owned / do-not-merge / do-not-auto-edit labels. PR fix(core): exclude expired and cancelled plans from quota gate derivation #1353 still OPEN and still overlaps item 1 in packages/core/src/model-route.ts.
    • Next: Per the prior resume note option, split item 2 (step.ts classification breadth — independent of fix(core): exclude expired and cancelled plans from quota gate derivation #1353) into its own PR this claim; item 1 stays gated on fix(core): exclude expired and cancelled plans from quota gate derivation #1353.
  7. dezren39
    added a commit that references this issue on Nov 2, 2026

    fix(core): clear stale balance holds on reclassified or deleted grants (

    0f80dbd
  8. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Nov 2, 2026
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    Author
    More actions

    🤖 Agent note · parked — PR #1393 open, awaiting Codex review + CI

    • Agent: queue worker (repo-worker-opencode), lane A scheduled shift
    • Session / ID: queue task 6192
    • Found via: queue claim · repo-health-opencode-pilot
    • Task: Implement fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 items 1–2 (stale balance holds; balance-exhaustion classification breadth).
    • Revalidation (fresh, 2026-11-02): fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels. Sequencing gate PR fix(core): exclude expired and cancelled plans from quota gate derivation #1353 MERGED 2026-11-02T13:02Z (5d3780e), so item 1 proceeded on top of its reconcileQuotaGate.
    • Outcome: PR fix(core): stale balance holds + balance-exhaustion classification (#1380) #1393 — item 2 (prior holder commit a17e682: credit/balance-specific match or QuotaExceeded required for balance-exhaustion classification in step.ts, with tests) plus item 1 (commit 0f80dbd: same-grant reclassified window replaces the stale balance hold with its normal timed gate; reconcile clears restored-only durable baselines whose grant plan ended, preserves them while the grant plan is live; dedicated tests for both).
    • Tests: model-route 102 pass; model-route + session-step-failure + model-route-credential 149 pass; quota-snapshot + quota-burn-rate + session-runner + session-runner-model + model-resolver 377 pass; tsgo -b clean; pre-push passed.
    • Resume: Check Codex marker + CodeRabbit on PR fix(core): stale balance holds + balance-exhaustion classification (#1380) #1393 head 0f80dbd, disposition every finding; if clean and MERGEABLE/CLEAN, merge (merge commit), confirm fix(core): #1014 follow-ups — stale balance holds on deleted/reclassified plans + balance-exhaustion classification breadth #1380 closed, clean queue labels, complete task 6192 as fixed_merged.
  10. dezren39
    added a commit that references this issue on Nov 2, 2026

    Merge pull request #1393 from developing-today/queue/6192-1380-balanc…

    78c48b5
  11. dezren39
    closed this as completedin #1393on Nov 2, 2026
  12. dezren39
    removed
    status/in-progressActively being worked
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 2, 2026
  13. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    Author
    More actions

    Fixed and merged via PR #1393 (merge commit 78c48b5, 2026-11-02). Codex review clean on head 0f80dbd (codex-review-state:v1, has_unresolved_findings=false); PR was MERGEABLE/CLEAN, 0 behind main. Queue labels cleaned.

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

    priority/normalOrdinary priority (the default)

    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.