Skip to content

Fix quota debits so pools use sooner-expiring account allowance - #151

Merged
Git-on-my-level merged 2 commits into
mainfrom
fix/capacity-account-routing
Nov 14, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
fix/capacity-account-routing

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

New pool delegations on m5 were skipping the sooner-resetting codex-2 account because historical launch estimates were added again after provider observations had already measured the completed work. The shared selection engine could similarly strand Claude and Cursor allowance.

Use each usage window’s observation to retire completed-work debits, retain reservations for running and newly completed work, and retain long-running jobs by completion time. Calculate limiting pressure per window, choose the earlier reset on equal pressure, and include the exact documented 5% headroom boundary at both default and custom thresholds. Preserve idempotent replay, explicit model selection, account launcher ownership, and Multica authority semantics.

Ship schemas, help, the portable skill, embedded distribution and all nested bundle hashes together. Dated investigation and sanitized m5 evidence: docs/evidence/2026-11-15-capacity-routing.md.

Validation: focused routing tests, focused command/capacity race tests, independent replay/authority/headroom probes, and distribution/install/public-default/supervisor/schema checks passed on m5. The candidate selected codex-2 for implement and review, and all six configured pools planned successfully without capacity warnings. Broad m5 runs exposed environment-dependent fixture failures; the PR’s GitHub checks are the final full CI gate. Release publication and installed-runtime verification remain before acceptance.

@cursor

cursor Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes how every configured capacity pool picks accounts at delegate launch; incorrect logic could misroute quota-sensitive work, though behavior is heavily regression-tested and does not touch auth or journal writes on plans.

Overview
Capacity pool selection no longer double-counts finished delegations after a provider has already reflected them in published usage facts.

The journal scan now feeds Launches with completion times (not creation-time per-account counts) into capacity.Select. Launch pressure is debited only for running work or completions newer than each window's observed_at (falling back to generated_at), with per-window limiting pressure, reset turnover clearing old-window debits, and a stable inclusive 5% headroom check via math.Nextafter.

Help text, schemas, the portable skill, embedded distribution hashes, and delegation docs are aligned with the new policy. Regression tests cover observation republishing, long-running jobs, and end-to-end pool planning; release notes and m5 routing evidence are added under docs/evidence/.

Reviewed by Cursor Bugbot for commit 9cba0a9. Configure here.

@cursor

cursor Bot commented Nov 14, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: a30ff0e1-49fa-4061-ad69-d4eb08aa0736)

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cursor

cursor Bot commented Nov 14, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: ca1b264e-8c73-42da-865b-d23238b1cfb1)

@Git-on-my-level
Git-on-my-level merged commit 1d5f530 into main Nov 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant