Skip to content

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

Open
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.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. 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.
  3. added
    kind/featureNew feature or capability request
    source/humanFiled directly by a human
    priority/highImportant and time-sensitive
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    meta/epicEpic / bundle of related work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  4. 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.
  5. 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.

  6. 48 remaining items

  7. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — task 18079 (triage, lane code-d) — state: triaged

    Bulk-intake re-triage of epic #1149 (quota-plane Stage 2): the prior verdicts (task 11906 and task 13614, 2026-11-08) stand in shape — acceptance is still incomplete and every remaining leg is already tracked — with real progress since then, fresh-verified this shift (2026-11-17T01:20Z, all via gh):

    No new packet enqueued: creating one would duplicate live child work (same routing as tasks 11906/13614). Classification unchanged: epic, priority/high, effort/l. Task 18079 completes as triaged.

  8. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

  9. removed their assignment
    on Nov 20, 2026
  10. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Agent note · stopped — no lane-workable slice remains in this epic (Lane AF, 2026-11-22)

    Picked up from the shortlist rung to land one bounded slice. Fresh verification against current main and the child issues' live states says every remaining leg is complete, blocked, or owned elsewhere — a PR from this lane would duplicate or contradict recorded direction:

    No comments on any of the three open legs since 2026-11-17 and no open PR mentions them (checked today). The epic stays open and closes on its children's evidence, as the prior triages concluded. This lane created no branch, no PR, and no duplicate packet.

  11. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up by felix — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while felix posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  12. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (reconciliation — Stage-2 acceptance mapped to current evidence)
    by: agent felix (kind muse, Muse sandbox seat), shortlist triage pass, 2026-11-22

    Fresh reconciliation of this epic against current main (origin/main @ 1dd4c90) and live child states, read this pass. This supersedes the 2026-11-17 reconciliation's state claims; three children closed since it was written.

    Landed — with evidence

    Children closed (11 of 14): #1151 gatherer service, #1153 token-adapter framework, #1155 exceptions audit (closed 2026-11-18), #1157 OpenCode consumption contract, #1161 OpenCode Go adapter, #1163 Claude adapter, #1165 Command Code adapter, #1167 Meta exception, #1169 Antigravity exception (closed 2026-11-22 as superseded — the gatherer maps antigravity via the custom provider), #1171 aggregator lazy refresh, #1175 quota-plane status view (closed 2026-11-19). Placement leg developing-today-forks/opencode#566 is CLOSED and its code-side PR #4703 is MERGED. Read-path unification #2490's code is merged (openchamber PR #2318, same-tick parity recorded).

    On current main, pm-stack/aggregator carries the whole plane: scripts/gather-quota.ts is the 15-minute tick (systemd user timer) writing quota-current.json plus a per-provider heartbeat; src/quota-current.ts overlays it with a freshness bound (stale/error surface as state, never as zeros); src/token-adapter.ts, src/claude-adapter.ts, src/clinepass-adapter.ts and their test suites are present; src/quota-refresh.ts is the page-load lazy refresh; quota-admission modules are the placement-side consumers.

    Key merged PRs: #1303 (Meta exporter), #1309 (gatherer), #2115 (adapter framework), #2530 (Meta exporter fix), #4659 (ClinePass adapter), #4817 (per-pool gatherer rows), #4994 (placement framework), #4703 (daily audit automation).

    Acceptance criteria — mapped

    Open — tracked, with owners/blockers (no new sub-issues needed; all exist)

    Verdict

    The epic stays OPEN and closes on its children's evidence, as every prior triage concluded — but the remainder is now exactly four named legs, none of them lane-buildable: one owner review (#1159), one blocked on a nonexistent live source (#1173), one deployed-binary rebuild owned elsewhere (#2490), one design child awaiting Drew's go (#1177). No PR was created by this pass and no duplicate packet filed; creating either would collide with recorded direction (#6125/#6127, #2490) or live claims.

    Next action: Drew's review closeout of #1159 is the only step that moves the epic's last acceptance checkbox; the rest is already routed.

  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Triaged: full reconciliation posted on #1149 (comment 7084718992). 11/14 children closed; acceptance mapped — placements + /quota freshness met, cadence met except #1159 formal closeout. Remainder: #1159 owner review, #1173 blocked on nonexistent live catalog source, #2490 binary rebuild owned by task 12835, #1177 Stage-3 design awaiting Drew. No lane-buildable slice; no PR, no new sub-issues (all exist).

  14. added and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  15. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress
    by: agent felix (kind muse, Muse sandbox seat)
    at: 2026-11-22

    #1177 (Stage-3 design) advanced — the epic's one actionable remainder from today's triage:

    Untouched, as triaged: #1159 (Drew's review close), #1173 (blocked on the catalog source), #2490 (task 12835's).

  16. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Agent note · progress — cadence criterion's last exception resolved; #1270 re-verified (Lane EB, 2026-11-22)

    Two updates since the 2026-11-22 19:50 reconciliation (comment 7084718992):

    1. feat(quota-plane): adapter — ClinePass via dashboard session token #1159 is CLOSED (2026-11-23T02:28Z, Drew's ruling with criterion 3 amended). That was the reconciliation's one outstanding cadence exception — the epic's acceptance criterion 1 (every held provider's quota via the gatherer at ~15-min cadence, or its exception issue closed with the fallback live) now has no open exception.
    2. feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270 (the epic's only open sub-issue) was re-verified first-hand — its 2026-11-16 "implemented" record only partially survives: the reconcile tool exists on the laptop and its fixture tests pass today (planted mismatch caught), but the seeded tracker plan-facts block and the recorded findings are absent from every surviving registry copy, the live plan store still holds 0 plan rows, and no daily cadence is wired. Full evidence + the three remaining slices, in order, are on feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270 in this lane's note there. feat(quota-plane): plan-store / tracker / measured reconciliation diff (daily) #1270 stays open; nothing in it waits on Drew.

    Epic remainders unchanged otherwise: #1173 (live PR #12666 in flight, another worker's), #2490 (task 12835's), #1177 → Stage-3 epic #12694 gated on Drew's design review.

  17. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane HC progress via #1270 (2026-11-23): slice 1 of #1270's remainder landed — the plan-facts tracker block is re-seeded in the canonical registry (hatch-personal d960a3919) and a fresh dated reconciliation findings run is recorded under it (9 presence findings; measured leg empty — surviving snapshot is dated 2026-11-03, a gatherer freshness gap now recorded as a finding). #1270 stays open on slice 2 (seed plan-store rows via its normal edit path, diff attached) and slice 3 (daily stewardship wiring — primary-seat cron change). Epic remainders otherwise unchanged: #1173 (PR #12666, another worker's), #2490 (task 12835's), #1177 → Stage-3 epic #12694 gated on Drew's design review.

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-stackpm-stack (Pad/Grist) in developing-today/codedesign/quota-planeDesign: quota-plane - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/pm-stackReprioritization program epic (2026-11-12)kind/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-sensitivequeue/queuedHas a queued queue tasksource/humanFiled directly by a humantask/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