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 — feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion · Issue #1157 · developing-today/code

feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157

New issue
Copy link
New issue
Copy link
Closed
Closed
feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion#1157
Copy link
Assignees
dezren39
Labels
effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workmode/onlineFully doable remotely: design, config, code, cloudpriority/highImportant and time-sensitivesource/humanFiled directly by a humanstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

Priority P1 — order 4. Horizon: Week. Design: quota-plane-design-2026-10-26.md (usage-billing-hub goal files), Stage 2. Parent context: epic #1047. (§1, consumption)

Wire the OpenCode pools to consume quota-current for automated decisions: placement reads the fresh state (<=15-minute-old for adapter-covered pools once the gatherer is live; the measurement gate tightens accordingly); ordering = burn-by-expiry (soonest reset first, OpenAI final reserve); >=85% caution and wall exclusion applied from MEASURED values, complementing the fork's existing error-based demotion (>=3 quota errors/4h -> weight x0.01) so pools demote before errors happen. Never-funds rule unchanged: a walled plan pool rotates or stops, never PAYG.
Acceptance: a placement decision demonstrably changes when quota-current changes (test or staged demo); guidance output cites the measuredAt it used.

Acceptance criteria

  • OpenCode pool placement reads quota-current (<=15-minute-old for adapter-covered pools once the gatherer is live) and a placement decision demonstrably changes when quota-current changes (test or staged demo) — restating the body's Acceptance section as the criteria section.
  • Guidance output cites the measuredAt it used.
  • Ordering is burn-by-expiry (soonest reset first, OpenAI final reserve); measured demotion complements the fork's error-based demotion, and the never-funds rule is unchanged (a walled plan pool rotates or stops, never PAYG).

Activity

Next
  1. dezren39
    added
    meta/follow-upFollow-up spun out of earlier work
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-293

  3. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    REVIEW FINDING (2026-10-26, fork side): the fork's plan store (packages/core/src/model-plan.ts) is a plain-JSON file in OpenCode's data dir that "the tools here and OpenChamber read and write the same file" — plan_info is the in-session tool over it. Two facts for this issue: (1) QuotaWindow models ENTITLEMENTS (limit, windowHours, resetRule/resetAt) — it has no live "used" field; live usage is route telemetry (route_usage / model-usage), so the consumption contract must join measured usage (from the gatherer) with plan windows, not expect the plan store to hold readings. (2) Known fork bug developing-today-forks/opencode#550: route_usage silently omits plan quota windows that have no windowHours (monthly/reset-rule windows never appear) — consumption work must not build on route_usage output for monthly windows until that is fixed.

  5. dezren39
    added
    kind/featureNew feature or capability request
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    source/humanFiled directly by a human
    status/needs-triageNot yet triaged; needs a first look
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Intake review

    • Related: epic epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 (quota plane, Stage 2, order 4 — the consumption side the adapters feat(quota-plane): adapter — ClinePass via dashboard session token #1159/feat(quota-plane): adapter — OpenCode Go console, per-workspace windows #1161/feat(quota-plane): adapter — Claude via claude.ai session (usage API) #1163/feat(quota-plane): adapter — Command Code via CLI/app credential #1165 feed); design quota-plane-design-2026-10-26.md (usage-billing-hub goal files, §1).
    • Still live: a merged-PR search found no resolving PR; the issue carried only meta/follow-up before this pass.
    • Notes: the body states "Priority P1" in prose — normalized here to priority/high. Its Acceptance line has been expanded into the appended ## Acceptance criteria section (original body preserved verbatim above it). One body detail is stale and a worker should reconcile it before implementing: the ">=85% caution" zone was retired by Drew on 2026-10-27 — pools are now used to 100%, and at a KNOWN 100% the pool is closed until reset or a fresh read shows it dropped (see the POOL MAP in the provider-quota registry). The measured-demotion intent stands; the 85% threshold does not.
    • Risks: this is the consumer that makes bad adapter data dangerous — zero-on-expiry or stale reads would demote healthy pools; the measuredAt citation in guidance output is the audit trail that catches it.
    • Suggested approach: wire consumption behind the gatherer's freshness stamp, prove the decision-flip with a staged quota-current change, and update the caution threshold to the current 100%-wall rule in the same pass.
    • Labels normalized by fleet monitor: kind/feature, priority/high (P1 in body), effort/m, source/human, status/needs-triage, meta/enriched.
  7. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    DREW (2026-10-29, main chat): the demotion half of this issue is now a very-high-priority requirement, stated plainly — providers whose quota is KNOWN 100% used (reset not imminent) move OUT of the routes until reset or a fresh good read pulls them back in; failing targets also come out, with a warning and a retry policy. OpenCode-side mechanism: developing-today-forks/opencode#6 (raised to priority/critical tonight — credential.activate failover + route removal/promotion), reading the shared QuotaSnapshot contract (opencode#587, adopted 2026-10-29). This issue remains the quota-plane half: quota-current must carry the known-100% / good-again signals those moves consume.

  8. dezren39
    added
    mode/onlineFully doable remotely: design, config, code, cloud
    work/assignedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    on Nov 1, 2026
  9. 13 remaining items

  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 3, 2026
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-f
    • Session / ID: task 7207
    • Found via: queue claim (direct execution lane)
    • Task: task 7207 triage of issue feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 at current main — verdict below; issue stays open, implementation ordered to the opencode side
    • Expectation: done = this verified verdict + stale-acceptance corrections recorded on issue feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157
    • Links: issue epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047, developing-today/opencode issue Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 4371899 #6

    Triage verdict — task 7207, verified at origin/main e425b6a (2026-11-03)

    CONFIRMED STILL LIVE, with two acceptance points superseded by Drew's later quota doctrine. Re-verified fresh this run (the task 2437 verdict of 2026-11-02 stands in substance, with one correction):

    • Producer side is live: the gatherer writes quota-current.json; adapters exist in pm-stack/aggregator/src/ (quota-current.ts, quota-gather-map.ts, clinepass-adapter.ts, token-adapter.ts).
    • Correction to the task 2437 note: the aggregator does read quota-current now — for display. overlayQuotaCurrent (quota-current.ts:342) overlays it onto the /quota view (README quota table, line 473). The README's "Remaining hop: the aggregator does not read quota-current.json yet" text (line ~607) is stale — it predates the overlay; the still-missing hop is decision consumption, not display.
    • No placement consumer exists: nothing in this repo reads quota-current to make a placement/rotation/demotion decision. Placement lives in the opencode fork's routing/plan store, i.e. the implementation surface is developing-today/opencode, not this repo. The fork's 429-failover piece (opencode issue Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 4371899 #6) is CLOSED; measured placement/demotion is the part that remains.
    • Stale acceptance — doctrine superseded: the body's ">=85% caution" rule was retired by Drew 2026-10-27/29: pools are used to ~100% at reset; a pool at a KNOWN 100% is closed until reset or a fresh good read, and a failed/stale quota read never idles a pool or stops dispatch (2026-10-30). Any implementation must follow the current doctrine, not the 85% text. The never-funds rule is unchanged.
    • Ordering/blockers: this is a cross-repo set whose origin is this issue — implementation belongs on the opencode side (routing weights from measured quota-current, guidance citing measuredAt), with the code side owing only the stale README correction above. No code-repo fix task is enqueued from this triage: the work is not in this repo, and a per-repo duplicate is exactly what the set rule forbids. Issue feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 stays open as the set's tracking home under epic issue epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047.
  12. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  13. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [7207, 2437] were marked done, and some work did land:

    • PR docs: task-placement framework v1 — decision table + shared-pool model + exceptions (#2024) #4994 — docs: task-placement framework v1 — decision table + shared-pool model + exceptions (design: task-placement framework v1 — decision rules and a shared-pool efficiency model #2024) (merged 2026-11-03T15:14:37Z): docs: task-placement framework v1 — decision table + shared-pool model + exceptions (#2024) #4994

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11547.

  14. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (triaged — verdict unchanged from task 7207; one docs remainder routed)

    • Agent: repo-worker-code (lane P)
    • Session / ID: queue task 11907
    • Found via: queue claim (triage packet from the 2026-11-07 done-task-only audit, tracking issue queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016)

    Verdict: still live, and the task 7207 triage (2026-11-03) stands in full — re-verified fresh at origin/main 801ceb9 this shift.

    • Producer + display are live in this repo: the gatherer writes quota-current.json, and the aggregator does read it for display — overlayQuotaCurrent at pm-stack/aggregator/src/quota-current.ts:352, consumed in src/sources/live.ts (line 1330, Stage 2 / issue feat(quota-plane): quota-gatherer service in the PM stack — 15-minute tick, quota-current contract #1151). No placement/rotation/demotion decision consumer exists in this repo — that part is unchanged.
    • The implementation remainder lives on the opencode side and is already tracked there: developing-today-forks/opencode issue docs(repo): use one worker branch name across the workflow #566 ("Quota-aware session placement: filter by quota % and session type (root vs subsession)") is OPEN, status/in-progress, queue/queued, effort/l. Per the cross-repo set rule, no per-repo duplicate is filed from here; issue feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 stays open as the set's tracking home under epic epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 until the opencode-side work lands.
    • Doctrine corrections from task 7207 still bind: the body's ">=85% caution" text is superseded by Drew's 2026-10-27/29/30 doctrine (pools used to ~100% at reset; a KNOWN 100% pool is closed until reset or a fresh good read; a failed/stale read never idles a pool or stops dispatch; never-funds unchanged). Any implementation follows the current doctrine, not the 85% text.
    • One code-repo remainder, routed as a fix packet: pm-stack/aggregator/README.md:668 still says "Remaining hop: the aggregator does not read quota-current.json yet" — stale since the overlay landed, and flagged as owed by task 7207. That one-paragraph docs correction is the only remainder in this repo; it is enqueued as a small_fix follow-up from this triage (see the completion note / queue), scoped to the README paragraph only.

    No other code-repo work remains on #1157. Re-triage only when opencode#566 lands (then verify the set closes) or the quota doctrine changes again.

    • Links: feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 · epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 · Quota-aware session placement: filter by quota % and session type (root vs subsession) developing-today-forks/opencode#566 · queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016
  15. developing-today
    added
    status:in-review
    on Nov 8, 2026
  16. developing-today
    added a commit that references this issue on Nov 8, 2026

    Merge pull request #7296 from developing-today/queue/12436-1157-readm…

    688f44d
  17. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 8, 2026
  18. developing-today
    closed this as completedon Nov 8, 2026
  19. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · done (queue task 12436, lane code-v, 2026-11-07)

    The code-repo remainder from triage task 11907 is landed: PR #7296 (docs(aggregator): correct stale quota-current README claim) MERGED as 688f44dbe0b9a5716a948438020dd2831af38a19.

    • pm-stack/aggregator/README.md no longer claims the aggregator does not read quota-current.json. The paragraph now states the actual state: overlayQuotaCurrent (src/quota-current.ts) overlays the latest tick onto the /quota display via the live source (src/sources/live.ts) — display-only consumption.
    • Verified fresh on origin/main after the merge: corrected text present at README line ~669, stale claim gone. Diff was README-only (+7/−4), no code changes, per the packet scope.
    • Issue feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 stays OPEN: the measured-placement implementation itself is the OpenCode-side remainder, Quota-aware session placement: filter by quota % and session type (root vs subsession) developing-today-forks/opencode#566, and is not covered by this task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

effort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmeta/follow-upFollow-up spun out of earlier workmode/onlineFully doable remotely: design, config, code, cloudpriority/highImportant and time-sensitivesource/humanFiled directly by a humanstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

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.