Skip to content

Pool quota steward: consume the compiled hub numbers — probe only stale pools, follow-ups daily #2135

Closed

Description

@dezren39

The usage & billing hub already compiles provider numbers continuously, but pool-quota-steward re-probes every pool hourly (3.45M input/run, 51.8M per 15h at check-in #5) to feed the dispatch measurement gate, plus ledger and impact follow-up work every run.

Change: (1) read the hub's compiled snapshot and the quota registry first; (2) probe ONLY pools whose picture is stale — and keep hourly probing only for pools the dispatcher is actively drawing from, so the ≤60-min measurement gate stays honest; (3) impact follow-ups move hourly → daily. Target ≤1.7M input/run with no loss of gate freshness for active pools.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    TOP PRIORITY (Drew, 2026-10-29 01:23 CDT): Batch 3 fleet consolidation — pick this up in the next runs, ahead of routine work. Being enqueued to repo-health-code-pilot at top priority now.

  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Triage verdict — task 3165 (lane D)

    Premise: VERIFIED against live state (structure and behaviour; the token figures are the batch's own measurement, not re-measured here). Decision: implement snapshot-first exactly as scoped below. Implementation routed in this same pass: follow-on queue task 3177. Epic #2055 updated.

    Premise check

    • The steward re-probes everything, every run. Its own ledger (pool-change-ledger.md, runs 2026-10-29T05:24Z and 06:24Z) records, per run, two independent fresh laptop /api/quota/* reads (identical used% — the fleet's verify-twice habit) spanning meta, opencode-go, cline-pass, codex, openai.alternate, openrouter, google (20 models), github-copilot and deepseek, plus five failing read attempts (command-code, claude, antigravity, opendesign, openai endpoint), drift re-checks, a dispatcher-log note, and impact follow-ups measured for prior events — every hour. The job itself is live and hourly (cron pool-quota-steward, interval 1h, enabled).
    • The compiled snapshot exists and is fresher than the gate needs. The aggregator's gatherer (pm-stack/aggregator/scripts/gather-quota.ts) ticks every 15 minutes and writes quota-current.json — per-provider windows with measuredAt, state, source — ingesting the OpenChamber quota module plus file-export producers (Meta's ~/atlas/meta-quota-export/latest.json, verified present on the laptop today). provider-quota-registry.md is maintained alongside. So for any pool the hub reads successfully, a ≤15-minute-old compiled figure already exists when the steward runs.
    • The gate constraint is real and is the design's centre. The charter measurement gate forbids a placement without a quota read ≤60 min old for that pool. Snapshot-first is safe for that gate only because the hub tick (15 min) is fresher than the gate (60 min) — and only for pools whose hub entry is actually fresh and ok.
    • The token figures (3.45M input/run, 51.8M per 15h, target ≤1.7M) come from the fleet-efficiency batch's check-in, cited on this issue and epic epic: fleet expansion & placement program (2026-10-28 directive, LIST 1–5) #2055; this triage did not re-measure them. The follow-on packet therefore includes a before/after measurement (3 runs each side) recorded in the ledger, so the saving is proven, not assumed.

    Decision / design (the routing in task 3177)

    1. Snapshot-first: a steward run consumes any pool whose hub entry (quota-current.json) has measuredAt ≤60 min and state: ok. No live probe for those pools.
    2. Probe only what's stale, absent, or broken — plus pools the dispatcher is actively drawing from (seated in live sessions), which keep hourly live probing. Today the stale/broken set is typically command-code (read broken, feat(quota-plane): adapter — Command Code via CLI/app credential #1165), claude, antigravity, opendesign — naming them in the run report stays mandatory, so coverage does not silently shrink.
    3. Follow-ups daily: impact verdicts are evaluated in the first steward run of each day (America/Chicago); other runs append a one-line follow-ups due: N, next daily pass <date> ledger note, so nothing sits silently — the daily pass is a named owner, not a drop.
    4. Not changed, explicitly: the hourly cadence (a rate change would need Drew's discussion under the 2026-10-28 efficiency rule — this is a method change, pre-approved class), the gate, the broken provider reads themselves (feat(quota-plane): adapter — Command Code via CLI/app credential #1165, opencode#818 own those).

    Routing

    Follow-on packet enqueued: queue task 3177 (pool-quota-steward: snapshot-first quota picture… — fix #2135, packet hidden_files/packet-3165-fix.json), acceptance covering the instruction + job-body update, the first post-change ledger entry showing the consumed-vs-probed split per pool, and the before/after token measurement.

    🤖 Agent note · done

  6. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
  7. 37 remaining items

  8. added
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  9. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7298 (triage, queued, priority 50) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  10. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked-up

  12. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — closing with evidence (already implemented)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority/highImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobtask/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