Skip to content

epic(quota-plane): Stage 2 — 15-minute quota gathering in the PM stack, token adapters, automated pool decisions #1149

In progress
5 of 6 issues completed

Description

@dezren39

Stage-2 epic under #1047, per Drew's direction 2026-10-26 22:41 CDT. Design: quota-plane-design-2026-10-26.md (usage-billing-hub goal files), Stage 2. Parent context: epic #1047.

Direction, in Drew's terms: quotas and plan details gathered routinely at every regular interval (~15 minutes) by a process inside the PM stack; that data informs automated decisions the OpenCode pools make; Muse may change the plumbing so the stack reaches quota data directly — for browser-only dashboards, pull from a file or use the browser token directly against the undocumented API the dashboard page calls; all but two providers are reachable that way, and the two exceptions carry their own integration-plan issues (login -> capture token -> undocumented dashboard API); visibility stays fully current, with a pull on page load when data is older than ~1-5 minutes.

Priority order (children filed in this order; horizons on org Project #4):

  1. P0 Gatherer service (15-min tick, quota-current)
  2. P0 Token-adapter framework
  3. P0 Exceptions audit — name the two
  4. P1 OpenCode consumption contract
  5. P1 Adapters: ClinePass / OpenCode Go / Claude / Command Code
  6. P1 Exception integration: Meta
  7. P1 Exception integration: Google/Antigravity
  8. P1 Aggregator lazy refresh on page load
  9. P1 Daily model + route audit (stewardship block LIVE 2026-10-26)
  10. P2 Quota-plane visibility (gatherer health on /quota)
  11. P2 Stage-3 design (predictive quota ops)

Acceptance for the epic: every held provider's quota arrives via the gatherer at 15-minute cadence (or its exception issue closes with the file-export fallback live); OpenCode placements consume the fresh data; /quota freshness is self-evident per provider.

Acceptance criteria

  • Every held provider's quota arrives via the gatherer at ~15-minute cadence, or its exception issue closes with the file-export fallback live.
  • OpenCode placements consume the fresh quota data.
  • /quota freshness is self-evident per provider.

Sub-issues

Sub-issues

5 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. added
    meta/follow-up
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Children filed 2026-10-26 (priority order; horizons on org Project #4):

    1. feat(quota-plane): quota-gatherer service in the PM stack — 15-minute tick, quota-current contract #1151 P0 — Gatherer service (15-min tick, quota-current) · Week
    2. feat(quota-plane): browser-token adapter framework — managed credentials, fail-closed dashboard-API clients #1153 P0 — Browser-token adapter framework · Week
    3. audit(quota-plane): name the two token-exception providers definitively #1155 P0 — Exceptions audit: name the two · Week
    4. feat(quota-plane): OpenCode pools consume quota-current — measured placement, rotation, demotion #1157 P1 — OpenCode consumption contract · Week
    5. feat(quota-plane): adapter — ClinePass via dashboard session token #1159 P1 — ClinePass adapter · Week | feat(quota-plane): adapter — OpenCode Go console, per-workspace windows #1161 P1 — OpenCode Go adapter · Week | feat(quota-plane): adapter — Claude via claude.ai session (usage API) #1163 P1 — Claude adapter · Month | feat(quota-plane): adapter — Command Code via CLI/app credential #1165 P1 — Command Code adapter · Month
    6. plan(quota-plane): exception integration — Meta (login, token capture, console API) #1167 P1 — Exception integration: Meta · Month
    7. plan(quota-plane): exception integration — Google/Antigravity (login, token capture, panel API) #1169 P1 — Exception integration: Google/Antigravity · Month
    8. feat(quota-plane): aggregator lazy refresh — pull on page load when data >5 min old #1171 P1 — Aggregator lazy refresh (>5 min) · Week
    9. feat(quota-plane): daily model + route audit — latest models incorporated, route rules cover all needs #1173 P1 — Daily model + route audit · Week
    10. feat(quota-plane): quota-plane status view on /quota — gatherer health + per-provider freshness #1175 P2 — Quota-plane status view · Month
    11. design(quota-plane): Stage 3 — predictive, self-tuning quota operations #1177 P2 — Stage-3 design (predictive quota ops) · Month
      Design: files/quota-plane-design-2026-10-26.md in the usage-billing-hub goal workspace.
  4. added
    kind/feature
    source/human
    status/needs-triage
    priority/high
    effort/l
    app/pm-stack
    meta/epic
    meta/enriched
    on Oct 28, 2026
  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (protocol §5), 2026-10-28.

    • Related: Stage-2 epic under epic(usage-hub): SaaS/cloud services completion — v2 live collectors, daily console reads, v3 reconciliation #1047 (quota plane); design: quota-plane-design-2026-10-26.md (usage-billing-hub goal). Stage 1 context lives on the parent epic.
    • Still live: the 15-minute gatherer + placement consumption is not live; the body's own acceptance line (gatherer cadence, placements consuming fresh data, /quota freshness self-evident) is unmet.
    • Body edit: the acceptance existed only as prose — appended a structured ## Acceptance criteria section distilled verbatim from it; original body preserved above.
    • Risks: the two browser-only provider exceptions can silently stall the epic — their exception issues need to exist and be named here before the cadence work starts, or Stage 2 reads done while two providers are dark.
    • Suggested approach: gatherer cadence first with per-provider freshness surfacing, then wire OpenCode placement consumption, then close out the two exception paths (integration or file-export fallback).
    • Labels normalized: kind/feature, source/human, status/needs-triage, priority/high, effort/l, app/pm-stack, meta/epic, meta/enriched.
  6. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Epic leg filed: #2490 — unify(quota-plane): one quota read path — server endpoint, CLI, and aggregator gatherer must share the direct credential-store read.

    This is the read-path unification leg of this epic, filed at Drew's direction 2026-10-29 ("there was supposed to be a unification in the 3 quota read methods"). It names the three divergent readers (OpenChamber server credential projection / CLI server-first+store-fallback / gatherer direct store read), tonight's divergence evidence (developing-today-forks/openchamber#858 Antigravity, #1301 Meta exporter), and the acceptance test that all three surfaces return identical windows in the same tick. It absorbs #1169's read-path half by reference (token capture stays with #1169) and depends on the #1167/#1301 Meta leg, expedited tonight.

  7. removed
    meta/epic
    on Nov 1, 2026
  8. 75 remaining items

  9. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Lane xaltha — #1149 pickup via priority rung, slice landed (2026-11-23 ~23:00 CST). PR #14082 open.

    What this slice does: wires --plans into bin/check-pool-ordering.mjs (#1173 item 1, burn-by-expiry): the checker reads the #1270 plan store and reports each pool's quota window end, the expiry order per tier pass, and a note when the config order burns a later-expiring ordered pool before an earlier-expiring one. Window-end derivation decided and recorded in the checker header: a calendar window is the calendar period containing now (24h → next UTC midnight, 168h → next Monday 00:00 UTC, 720h → 1st of next month); anything else is unknown, never guessed. Provider ids are normalised for matching (open-design/opendesign, _claude/claude, _openai.alt/openai).

    Verification: remote dispatch only. fleet queue dispatch is blocked from this seat by TLS #13185 (plus a relay-proxy timeout), so the fleet-command.yml fallback was used; run 45324807575 (via nix shell nixpkgs#nodejs_24, the image has no node) is success: 21/21 tests, guard passes on the canonical config with and without --plans. The first fallback run failed on node: command not found, not on the code.

    What the canonical config reports: exit 0, reserve passes everywhere. One tension surfaced as a note (not a finding): sol-plan (OpenAI-backed, expires 2026-11-30) is tried after spark-plan (expires 2026-12-01) in specialist — burn-by-expiry and the reserve rule point opposite ways there. Follow-up on #1173: validate the derivation against the live store's actual reset instants, then promote expiry mismatches from notes to findings. Cheapest-sufficient remains unwired.

    Not taken: the finding-5 fix still sits uncommitted in worktree code-12235, still awaiting Drew's pick (reorder traffic / scope the rule / record an exception) — a genuine owner decision, untouched. #1270 slice 3 stays primary-seat scheduling; #2490's remainders stay primary-seat. No other PR from this pass.

  10. added a commit that references this issue on Nov 24, 2026
  11. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    Fresh monitor triage (2026-11-26, task 24333): #1149 remains OPEN; Stage-2 acceptance is not newly complete, and the remainder is already tracked, so no duplicate fix packet is warranted. Current evidence: #1173 remains OPEN; its burn-by-expiry checker PR #14082 is MERGED, but follow-up validation still lacks quota resetAt/observed instants in the available plan store (latest #1173 note, 2026-11-26). #1270 remains OPEN on its daily stewardship-cycle wiring and the measured-leg freshness gap; its existing owner work is unchanged. #2490 remains OPEN after PR #13116 merged; its remaining deployed-CLI/live parity check is blocked by the recorded mcpx check failures (#13131), with deploy/live-check work already separately tracked. #1177 and #1159 are CLOSED. Verdict: keep #1149 open until these tracked child remainders and the acceptance evidence close; no new packet or code change from this triage.

  12. developing-today commented on Nov 27, 2026

    @developing-today
    Contributor

    Triage refresh (2026-11-26, queue task 25091): the same-day verdict in task 24333 remains correct; fresh child comments since that note confirm the remaining Stage-2 work is still tracked and not a new epic-level slice.\n\n- #1173: remains OPEN; task 22745 is blocked because the plan store still has no actual resetAt values. The checker tests are green (21/21); this is an upstream data prerequisite, not a checker-code gap.\n- #1270: remains OPEN; its 2026-11-26 task 24955 note confirms tracker/store no-drift, while the measured leg is still empty and the daily stewardship schedule is still unwired. No worker packet was routed because neither remainder has an available lane executor.\n- #2490: remains OPEN; task 24901 confirms the final NixOS switch and live CLI-vs-gatherer parity are still gated by mcpx check timing (#13131) and the fork FOD mismatch (opencode#2700). No new packet from that triage.\n- #1159 and #1177: CLOSED.\n\nVerdict: #1149 remains OPEN until its remaining acceptance evidence lands. All remaining work is already tracked under these children/blocks; no duplicate child or fix packet is warranted from this triage.

  13. developing-today commented on Nov 27, 2026

    @developing-today
    Contributor

    🤖 Agent note (lane code-j, 2026-11-27, triage task 25554): concur with the 00:01Z refresh — epic remains open; child work/blocks already tracked.

  14. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-11-28 13:14 CST
    • Found via: monitor reconciliation
    • Task: Label/queue reconciliation: this issue carried queue/queued, but its triage task in repo-health-code-pilot is complete (done) and no live task exists in any status (broker-verified this run). The triage verdict already recorded on this issue routed the remainder. Removing queue/queued so the labels match the queue truth; no new task was enqueued (the broker dedupe returns the completed triage).
    • Expectation: label state now mirrors queue state; re-add queue/queued only with a fresh packet if the remainder needs a new work order.
    • Links: digest + broker verification in the monitor run record (hidden_files/monitor-digest.json, sweep.log 2026-11-28)
  15. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Census 2026-11-29 (lane CEN-C01) — body + all 43 comments re-read; child states re-checked (concurs with the 2026-11-27 refresh, task 25554):

  16. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full re-read (body, labels, all comments, edges) in the CODE-6 recovery pass, concurring with the parallel census note (lane CEN-C01) already on this thread, whose claims I verified against live state in this pass. STRENGTHS: Stage-2 epic with accurate child accounting — closed children #1159/#1177; open remainder each with a named blocker (#1173 upstream data; siblings routed). PRIORITY VALIDATION: priority/high, single, correct. FIXES I APPLIED: none needed. REMAINS: its open children; no Drewry decision needed.

  17. added
    meta/epic
    on Nov 29, 2026
  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: The epic lacked the meta/epic marker the house sub-issue standard expects on a parent (it carried the plain epic label). Everything else was complete: kind, priority, status, app, effort, source, and an ## Acceptance criteria section.

    Strengths: Stage-2 quota-plane epic with a measurable cadence target in the title (15-minute quota gathering), token adapters and automated pool decisions scoped, priority/high consistent with the measurement-gate doctrine it implements.

    Actions taken by this census: Labels added: meta/epic.

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

    app/pm-stackdesign/quota-planeeffort/lepicepic/pm-stackkind/featuremeta/enrichedmeta/epicmeta/follow-upmode/onlinepriority/highsource/humanstatus/in-reviewtask/triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions