GeezerVison is showing github.com — feat(quota): add quota-plane status view (#1175) by dezren39 · Pull Request #4006 · developing-today/code
Conversation
dezren39
commented
Nov 1, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
/quota now exposes gatherer tick state and provider freshness without treating missing evidence as healthy. The standalone heartbeat can supersede stale embedded status after a failed tick; provider cause/source/cadence/fallback are shown only when recorded.
liveSource.quota
read quota-current.json + standalone heartbeat
select newest valid heartbeat
overlay provider freshness
renderQuota
tick summary + provider health table
unknown stays unknown; errors are escaped
Evidence
- Before:
/quota showed pool-level freshness only; a newer standalone failed heartbeat was ignored.
- After: quota status renders last/expected tick, adapter health, measuredAt, source class, cadence, fallback and last error; no current-data file still shows the heartbeat.
bun test test/quota-current.test.ts test/live-quota-status.test.ts test/token-adapter.test.ts test/render.test.ts test/usage.test.ts — 116 passed.
- Full aggregator test run: 934 passed, 1 failed in unrelated
test/slice3.test.ts (missing claude-code registry record). bun run typecheck remains blocked by existing missing @types/web-push and test typing diagnostics.
Merge Danger
Door: Two-way.
Blast Radius: Medium — quota status UI/model and aggregator runtime file configuration; existing quota windows remain unchanged.
Draft pending full acceptance/review and CI. Generic upstream provider errors without structured adapter status intentionally render as unknown rather than guessing from error text.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Important
Draft PR not reviewed
Draft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · handed off
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · handed off
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
agent-note:v1
lane: code-u
task: 13368
stage: handed_off
Handed off to opencode claimant (lane assignment row 4959) for PR #4006 shepherding under batch issue #7297. Parked 1200s for claimant binding.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · handed off
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · handed off
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Queue task 13368 — blocked pending safe disposition
Fresh revalidation at 2026-11-09T01:46:59Z: PR #4006 is OPEN/DRAFT at c3a9b12893cb40c72179a2519c0cbc84ddd7f9e8; labels are status/parked and queue/parked (none of held, user/owned, do-not-merge, do-not-auto-edit). The PR reports one successful check, but GitHub reports the branch non-mergeable/dirty.
No superseding canonical implementation was found: current main fda54ffdb96b227e3c31219ea940bc4a17f6a677 has neither the quota status renderer nor the independent quota heartbeat overlay, and linked issue #1175 remains open. Therefore closing as superseded is unsupported. Finishing requires a substantial rebase/port: the PR is 3,786 commits behind main (1 commit ahead), and a separate existing worktree already has conflicts in the quota implementation files. I left that worktree and all PR state untouched.
Issue #1175 still records an explicit Drew decision request (#1175 (comment)). This task is blocked pending direction to authorize a fresh, isolated rebase/port and finish; no merge, close, branch deletion, or label change was made.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Agent note · shepherd blocked — the merge-or-close decision is escalated to Drew (task 13368)
- Agent: repo-worker lane any-d
- Fresh state (2026-11-11): PR feat(quota): add quota-plane status view (#1175) #4006 still OPEN, still DRAFT, head unchanged c3a9b12, labels status/parked + queue/parked only. No work was done on the PR.
- Why blocked: the underlying issue feat(quota-plane): quota-plane status view on /quota — gatherer health + per-provider freshness #1175 carries
user/escalated + status/blocked + queue/blocked. Its block note (task 11913, 2026-11-08, decision recorded at comment 6726355807) frames the exact question this shepherd would have to answer: (a) finish and land feat(quota): add quota-plane status view (#1175) #4006, or (b) close/abandon feat(quota): add quota-plane status view (#1175) #4006 so the remainder becomes a clean fix packet. That decision is Drew's and still pending — a hard stop for this lane under the runbook.
- New evidence for that decision: the PR is now PARTIALLY superseded on main —
pm-stack/aggregator/src/quota-current.ts, src/quota-gather-map.ts, and test/quota-current.test.ts from its file list already exist on current main (landed via other work). Whichever way the decision goes, it needs a diff of the PR's remaining files (render.ts, model.ts, config.ts, sources/live.ts, gather-quota.ts, the nixos module) against main first — not a file-list comparison.
- Queue: task 13368 blocked on the feat(quota-plane): quota-plane status view on /quota — gatherer health + per-provider freshness #1175 escalation; it revives when Drew rules (a) or (b).
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
state: closed as superseded — salvage diff vs current main recorded (lane code-c, task 13368, #7297 batch shepherd)
Salvage comparison against current origin/main (not a file-list comparison — per-file content and the live deployment):
- The quota-plane status view this PR proposed is live on main and far beyond this branch: /quota serves 200 on the running aggregator, and main's versions of every shared file are substantially larger than the branch's (quota-current.ts 611 vs 464 lines; quota-gather-map.ts 1101 vs 612; gather-quota.ts 914 vs 516; quota-current.test.ts 1290 vs 753), with active development since (feat(quota-plane): adapter — Claude via claude.ai session (usage API) #1163 Claude adapter, fix(quota-plane): Meta portal-session lapse surfaces as 'no-data' error instead of a distinct lapsed state #8294 lapsed-session classification, aggregator(quota): opendesign stale rendering drops the dated fallback windows — page shows no windows + 'No dated read' while the read carries 0/0 @18:15Z #6942 retained-entry heartbeat preservation).
- ONE unique remainder was found, and it is recorded on feat(quota-plane): quota-plane status view on /quota — gatherer health + per-provider freshness #1175 as a scoped follow-on rather than silently dropped: the standalone gatherer-heartbeat file read. This branch adds
PM_AGG_QUOTA_HEARTBEAT_FILE (quota-gatherer-heartbeat.json) so a gatherer tick that fails before writing quota-current.json is still visible — newest standalone heartbeat wins over the embedded one, and the heartbeat stays visible when quota-current.json is missing entirely (branch-only test: test/live-quota-status.test.ts). Main has no quotaHeartbeatFile config and no standalone read. Porting it is a real change, not a rebase: main's GathererSummary lacks the branch's durationMs/error fields and the per-provider health mapping from heartbeat.perProvider (e.g. adapterStatus session-expired → health "expired", measuredAt null), so it needs a model + summarize extension on current main.
- Everything else in this PR is superseded by main's evolved implementation; merging or rebasing this 1-commit, 5882-behind branch would regress it.
Closing as superseded. The heartbeat remainder is scoped on #1175 with a queued follow-on task.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
queue/parked
Queue task is parked (waiting on CI, time, or an event)
status/parked
Deliberately paused with a recorded resume condition
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|