Skip to content

fix(core): abolish pool-level quota verdicts - #1979

Merged
dezren39 merged 1 commit into
mainfrom
abolish-pool-verdict
Nov 8, 2026
Merged

dezren39 merged 1 commit into
mainfrom
abolish-pool-verdict

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026

Copy link
Copy Markdown

Refs #1974, Refs #1976

Drew's ruling (2026-11-07 23:02 CST): "there should be no such thing as a pool level verdict. a pool can't run out only models and providers run out."

What changes

  • ModelRoute.poolQuotaExhausted and its evidence machinery (quotaEvidence, poolOf, poolIDOf, independentQuotaGate, POOL_QUOTA_LEAVES, quotaBench) are deleted. No stored or synthesized pool-level quota fact remains, and the pool-quota-exhausted exclusion reason is gone.
  • Eligibility is per leg, derived at decision time: a leaf is excluded by its own model's bench/cooldown, its credential's gate (credentialQuotaBlocked), its provider's skip record (skipped), or — new — its provider's own quota gate via ModelRoute.providerQuotaBlocked, the provider-scope mirror of credentialQuotaBlocked (known-full snapshot; threshold balance hold judged under the requesting Location; retained reactive timed gate). Selection previously reached the provider gate only through the pool verdict; the resolver never consulted it directly.
  • The resolver's ready filter replaces the pool branch with the provider-gate branch (reason provider-quota-known-full-until:<reset>), preserving per-leg reasons verbatim in decision detail. Gates beat probes exactly as before, now judged per leg: one leaf's state never excludes another leaf, and a leaf's own independent provider gate still outranks its own due probe (fix(core): pool quota exclusion defeats due bench probes — probe-eligible leaves stay excluded until the escalated cooldown expires (PR #1384 Codex P2 unaddressed) #1390/fix(core): let due bench probes recover quota-exhausted pools #1473 doctrine, per-leg).
  • The last-resort set loses the pool carve-out: it is the usable set, preferring targets whose credential is not known-full. Provider skip records keep their existing last-resort-soft semantics (a route with no other door still tries its provider's leaf rather than idling).
  • The mock route driver mirrors the resolver change.

Tests

Supersedes #1975, which kept the pool verdict and only stopped bench evidence counting toward it once gates re-judged clear — the wrong direction under the ruling. #1975 is closed with the ruling quoted.

Drew's ruling (2026-11-07): a pool cannot run out - only models and providers run out. Eligibility is now derived at decision time from per-leg state only: the leaf's own bench, its credential's gate, its provider's skip record, and - via the new ModelRoute.providerQuotaBlocked - its provider's own quota gate, which selection previously reached only through the pool verdict. poolQuotaExhausted, its evidence machinery, the pool-quota-exhausted reason, and the last-resort pool carve-out are deleted; per-leg reasons are preserved verbatim in decision detail. Supersedes #1975.
@dezren39
dezren39 merged commit f7152ad into main Nov 8, 2026
@dezren39
dezren39 deleted the abolish-pool-verdict branch November 8, 2026 05:21
dezren39 added a commit that referenced this pull request Nov 8, 2026
…skip scoping (#1974, #1976)

Rebased onto main after the pool-verdict abolition (#1979): the two
commits of this PR replayed as one, with the abolition kept whole.

#1974: re-admission is a judgement over the gathered quota snapshot
(quota-current.json, refreshed ~15min from the providers own endpoints),
never a probe attempt. releaseQuotaSkipsForCurrent/ForSnapshot lift a
learned attempt-reported skip only when the freshest reading for the
answering model shows its window below full; the sources reset governs
over the error-quoted date; no reading, no judgement. refreshQuotaSkips
runs beside refreshQuotaGate at every resolution.

#1976: a credential-less quota answer plants a model-scoped skip naming
only the answering target; provider scope requires a second distinct
target of the provider answering quota while the first hold stands
(QUOTA_SKIP_CORROBORATION_SOURCES). Learned skips report quota-skip in
decision detail; user-skip is the operators own override only.

Rebase reconciliation: poolQuotaExhausted and its evidence machinery
(quotaEvidence/staleGateEvidence/independentQuotaGate) stay deleted per
the abolition — per-leg and per-provider state only, no pool facts. The
one #1978 test that asserted the deleted verdict was rewritten to assert
the surviving behavior (one family out stays model-scoped; two families
promote to provider scope), and the abolitions per-leg test was updated
for the #1976 scoping it now composes with.
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