Skip to content

aggregator: finish quota throughput data + record the design contract (#851) #3933

Closed

Description

@dezren39

Context

Follow-up from #851 and tracker hygiene task #1183. Slice 1 shipped the quota panel in PR #892, but its implementation issue #890 explicitly deferred throughput burn segments and token-rate history to slice 2. On current main, QuotaView has historical BurnSegment and QuotaPool has active-session/model/token and burnTokensPerMin fields, but scripts/collect-fleet-feed.ts emits burn: [] and does not populate live burnTokensPerMin; those fields are only present in fixtures. The root project-management design record also does not yet record the quota data contract, per-source refresh cadence, and wall-detection rule required by #851.

Existing related work remains distinct: #1172 tracks uninstrumented-provider coverage, #1174 tracks quota actions on /today and /attention, and #1184 is the coherence epic. This issue carries the remaining #851 throughput/design-record gap; it does not replace those follow-ups.

Acceptance criteria

  • Update the project-management stack design record with the joined quota/throughput model, refresh cadence by source, and per-pool wall/near-limit rules; link this issue from the record.
  • Live quota data attributes active sessions and cumulative tokens by provider/pool/model, and reports measured recent token rate where its source supports it (no fabricated estimates).
  • Historical burn segments are populated from observed usage across reset windows when the source data supports them; empty/missing history is represented honestly.
  • /api/quota.json and /quota expose the same live data, including model-choice/headroom guidance; the OpenChamber quota picker remains the source for values it already exposes.
  • Targeted tests cover live mapping, reset-boundary history, and honest missing-data behavior.

Activity

  1. added
    kind/featureNew feature or capability request
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    meta/follow-upFollow-up spun out of earlier work
    effort/mMedium: expected under 1 day of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 1, 2026
  2. added
    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. 60 remaining items

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

    @developing-today
    Contributor

    🤖 Agent note · parked

  7. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · parked

  8. added 3 commits that reference this issue on Nov 8, 2026
  9. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · claim lost after work completed; resume state recorded

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 12657
    • What happened: this lane claimed task 12657 (lease_until 2026-11-08T10:26:15Z), checkpointed the pickup, resumed the task from its awaiting_ci park, and did the work below. At the targeted_tests_passed checkpoint (~09:47Z) the queue returned the verdict "task 12657 is not claimed by repo-worker-code" — the broker claim was lost mid-task despite the unexpired lease (same pattern as lane code-k task 12785 and lane code-n task 8500 earlier today). Per runbook §0b/§4 this is a verdict, so this lane stops queue-side work on the task and records the full outcome here instead.
    • Work done (durable on GitHub): PR aggregator: historical burn segments + measured burn rate in the collector (#3933) #7354 was CONFLICTING with main; it has been rebased onto origin/main (0a27a7f) — one import conflict in collect-fleet-feed.ts resolved keeping both sides — pushed (force-with-lease, feature branch only) at head eb15749d64, and verified MERGEABLE. Full detail: aggregator: historical burn segments + measured burn rate in the collector (#3933) #7354 (comment)
    • Tests (laptop, post-rebase): burn-history-3933 19/19, feed 76/76, contract-corpus 11/11, contract-collector 10/10 pass. quota-contract.test.ts fails with a 5s hook timeout — proven pre-existing on clean origin/main.
    • Resume condition: when the basic checks on PR aggregator: historical burn segments + measured burn rate in the collector (#3933) #7354 head eb15749d64 settle green (all pending at last check, fleet runner backlog), merge PR aggregator: historical burn segments + measured burn rate in the collector (#3933) #7354 (Codex round 3 was verified clear on the pre-rebase head; the rebase changed no PR-authored content beyond the import resolution) and complete task 12657 as fixed_merged. Whoever next claims task 12657 owns that merge.
  10. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  11. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    agent-note:v1 — task 12657 terminal: done (fixed_merged)

    Resumed from the prior park (implementation_complete on PR #7354). Fresh verification this shift (lane code-v):

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

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/mMedium: expected under 1 day of workkind/featureNew feature or capability requestmeta/follow-upFollow-up spun out of earlier workpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilottask/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