Skip to content

aggregator: forecast per-pool quota exhaustion intervals #3983

Open

Description

@dezren39

Parent chain: #1184 → #1256 → this issue. GitHub currently caps #1184 at 100 direct sub-issues and rejects additional links (REST 422), so implementation slices are nested under #1256, already a native child of #1184; no existing parent links were changed.

Design context: #1256; doc/2026-11-01T21-07-00Z_design_pm-stack_forecasting/2026-11-01T21-07-00Z_design_pm-stack_forecasting.md (§2). Depends on the measured live-rate contract in #3933; do not duplicate its quota extraction or near-limit/wall threshold rules.

Goal

Add a time-to-exhaustion interval that composes live per-pool usage, observed rate, and reset time, complementing (not replacing) the existing point-pace and quota-wall derivations.

Acceptance criteria

  • Consume the live quota contract from aggregator: finish quota throughput data + record the design contract (#851) #3933: pool identity, remaining/limit, reset time, measured timestamped burn, source age/coverage, and explicit missing/estimated markers.
  • Where enough fresh rate observations exist, return an exhaustion interval and whether its P50/P80 falls before or after reset; expose the rate window and source.
  • If rate, remaining amount, or reset is missing/stale, or there is no measured burn history, return an explicit unknown state rather than “safe” or a fabricated date.
  • Reuse aggregator: finish quota throughput data + record the design contract (#851) #3933 existing near-limit/wall rules; do not add another threshold/attention path. Queued issues are not converted into token demand; any scheduled-work scenario must be separately labelled and use attributable measured inputs.
  • Tests cover reset boundaries, stale/missing rates, zero rate, limit already reached, and a measured exhaustion-before-reset case.

Activity

  1. added
    kind/featureNew feature or capability request
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  3. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 3, 2026
  5. 34 remaining items

  6. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 4, 2026
  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: parked
    queue: repo-health-code-pilot
    task: 8750 (small_fix, worker repo-worker-code, lane 262eb403-3347-4a7c-ba6b-e7bc263ca853), attempt 6
    by: openchamber-scheduled-lane
    at: 2026-11-04T01:45:14Z

    Parked for 30 minutes on dependency #3933. GitHub main confirms the required contract is not finished: collect-fleet-feed.ts still emits quota.burn: [] and src/model.ts has only the optional burn-related types; no matching open PR exists for #3933 or #3983. Resume after #3933's finished contract lands, then verify pool identity, remaining/limit, reset, timestamped measured burn, source age/coverage, and missing/estimated markers. No branch or worktree was created because the gate failed. Labels synced: queue/parked + status/parked; work/assigned retained; claimed/in-progress labels removed.

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

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

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 8750
    • Found via: monitor reconciliation
    • Task: claim-evaporated repair — the queue claim on task 8750 ended without complete/park/block, its lease expired, and the task returned to queued unclaimed while this issue still carried claimed labels. Labels reset to the truth: queue/queued + status/needs-triage. Checkpoint stage at evaporation: handed_off.
    • Expectation: the next lane to claim task 8750 posts a fresh pickup note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestpriority/normalOrdinary priority (the default)queue/queuedHas a queued task in the Supabase agent queuesource/queue-workerFiled or worked by the queue/worker pilotstatus/needs-triageNot yet triaged; needs a first looktask/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