Files
OmniRoute/tests
Xiangzhe a13869364e fix(sse): guard connection-scope cooldown against permanent agentrouter states
Adversarial review of the #10334 Task 2 connection-scope branch found the
"never terminal" invariant relied only on ruleScope === "connection",
which is not structurally guaranteed against a future agentrouter rule
pairing that scope with a permanent/credits-exhausted reason. Extract the
guard into an exported, independently-testable predicate
(isAgentrouterConnectionQuotaScope) that also requires
reason === QUOTA_EXHAUSTED and !permanent/!creditsExhausted.

Also: document the disableCooling(#2997) interaction and the
providerErrorRules.ts 6h-vs-30min-cap discrepancy the review flagged, and
add position-guard + exclusivity-positive tests so a future refactor that
reorders the branch or stops locking non-agentrouter providers cannot pass
silently.
2026-08-14 14:01:48 -03:00
..