feat: gate in-call demotion on credible alternative health

Round 3 showed unconditional yield-after-two-failures pushes the third
attempt onto known-bad sources in heterogeneous pools (83% vs 10%
expected success). OutcomeAwareSelector now exposes health(); a failed
source only yields when some untried candidate scores at least half its
health. Health-blind selectors keep the unconditional rule.
This commit is contained in:
2026-07-21 11:24:52 -04:00
parent 58061c7536
commit 0e17f71482
6 changed files with 95 additions and 4 deletions
+2
View File
@@ -194,6 +194,8 @@ class OutcomeAwareSelector(Protocol):
def record_outcome(self, source_name: str, ok: bool) -> None: ...
def health(self, source_name: str) -> float: ...
@runtime_checkable
class StructuredOutputStrategy(Protocol):