Repository navigation
Restore Claude routing after an early quota reset - #31
Conversation
A Claude usage read that proves both shared windows available (each an
explicit null or a finite utilization below 100 with a reset after the read
started, at least one active) now ends a stale credential-wide quota
cooldown. The release refuses when the credential changed since the read
started (Generation or RegistrationEpoch), and keeps disabled accounts,
auth and grant failures, and each model's own cooldowns. It publishes to the
registry and scheduler and saves the cooldown state.
QuotaUsageReader now returns QuotaUsage{Headers, CredentialQuotaAvailable}.
ObserveQuotaHeaders stays observational. The release body is shared with the
Devin quota restoration, and the publish tail with ResetQuota.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Accepted riskAccepted by ericlitman: HOUSE-129 (authority 48fa77b) 🟡 Medium · Quota release erases independent auth-level cooldowns 🟡 Medium · Exhausted model-specific windows still authorize release 🟡 Medium · Quota release is not saved to the backing auth Store DetailsRun: @unfret review · @unfret status · @unfret help |
|
Operator waiver for head 1ad939b, under the installed babysit-pr consequence and reachability rules.
None of these allegations concerns security, secret exposure, data loss or gate/waiver integrity. No repair dispatch is warranted by actual deployed reachability. A three-round repair estimate is about 120 minutes and $39 at the skill's planning rate; it establishes no new waiver authority. No code changed after the verdict, so this remains reviewed head 1. One allegation about losing the reporting model's own cooldown was dismissed by the panel on exact-head code evidence. |
✅ Merged into
|
Summary
A Claude subscription reset left the account blocked until its previous reset time. Fresh usage reads now release the stale account-wide quota block and update routing and saved cooldown state.
Linear: HOUSE-129
Evidence
After: both regressions pass on this branch through scheduler and reserve-enabled selection, with sibling errors and the exhausted second account preserved.
Merge Danger
Door: two-way
Revert the change or restore the previous binary. No credential or configuration migration.
Blast Radius: routing
Only confirmed Claude account-wide quota cooldowns are released. Existing observation-only behavior, model-specific cooldowns, Codex behavior and reserve rules remain. The exported QuotaUsageReader return type changes to include an explicit availability result; all repository implementations and callers are migrated. External SDK implementations must migrate.
Acceptance criteria
Gate results
Parent-run on head 1ad939b:
go test ./...exit 0;go build -o <scratch>/test-output ./cmd/serverexit 0 (binary removed);git diff --checkexit 0; gofmt check of changed Go files exit 0. Focused race tests also passed in the implementation lane. Validation record.Not verified
Production deployment and inference passed; no synthetic stale block was added to production. Automatic recovery was proved on an isolated real proxy. An intermediate full run failed
TestServiceHeartbeatFailoverDoesNotDrainBlockingScopeandTestServiceShutdown_ViolentShutdownImmediatelyClosesServer; final rerun passed. The heartbeat failure reproduces on unchanged main in a 15-run comparison. Shutdown passed all 15 main runs and is not traced to this diff. Neither lifecycle test or implementation is changed. No claim is made that the shutdown failure is resolved.Design observations
The existing Devin restoration guard and observation timestamps have unrelated limitations recorded in the design ledger. This change preserves Devin's decision rule. No additional work is proposed here.
Review disposition on head 1
Operator waiver for head 1ad939b, under the installed babysit-pr consequence and reachability rules.
None of these allegations concerns security, secret exposure, data loss or gate/waiver integrity. No repair dispatch is warranted by actual deployed reachability. A three-round repair estimate is about 120 minutes and $39 at the skill's planning rate; it establishes no new waiver authority. No code changed after the verdict, so this remains reviewed head 1. One allegation about losing the reporting model's own cooldown was dismissed by the panel on exact-head code evidence.
Deployment evidence
Deployment, production request, and release. Merge tree equals the tested PR head. The first post-merge Go CI run hit TestResponsesInterruptStopsHTTPUpstream; its fake Codex executor has no usage poller and does not call the new release path. Failed job rerun is pending.