Files
OmniRoute/tests
oyi77 ef2e5487c0 fix(quota-share): release the winner's reserved in-flight slot (#11371)
selectQuotaShareTarget reserves an in-flight slot for its winner but no
production caller ever invoked the returned release callback, so counters
grew monotonically for the process lifetime: P2C degenerated into
'fewest lifetime dispatches' and the max_concurrent gate fail-opened
past its cap permanently.

Thread the idempotent release out of the ordering path:
- applyStrategyOrdering now returns { orderedTargets, quotaShareRelease }
  (non-null only for the quota-share strategy)
- resolveComboTargetPipeline releases it when a post-selection hard filter
  produces an earlyResponse and otherwise hands it to the host
- handleComboChatInner invokes it in the dispatch finally and on the two
  early returns between resolution and the try block

Regression tests pin the missing case from the issue: ordering through
the real path leaves the counter back at zero, plus null-release for
non-quota-share strategies.
2026-08-24 21:45:42 +07:00
..