The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(triage): cover in-flight breaker deferral before dispatch
Steven Enamakel99f32fe2653c
diff --git a/crates/openhuman-core/src/triage/evaluator_deferral_tests.rs b/crates/openhuman-core/src/triage/evaluator_deferral_tests.rsindex ede56cbd08..47bcea5b1e 100644--- a/crates/openhuman-core/src/triage/evaluator_deferral_tests.rs+++ b/crates/openhuman-core/src/triage/evaluator_deferral_tests.rs@@ -245,3 +245,31 @@ async fn double_cloud_parse_failure_without_local_returns_terminal_not_err() {"1 cloud + 1 cloud retry, no local");}++#[tokio::test]+async fn in_flight_breaker_defers_before_dispatch_for_one_second() {+ let state = new_retry_state();+ let attempt = state+ .try_acquire("stub-cloud:stub-cloud-model".to_string(), monotonic_ms())+ .expect("held attempt");+ let before = now_ms();++ let outcome = run_triage_with_arms_for_test_with_state(+ cloud_arm(),+ None,+ &envelope(),+ &state,+ )+ .await+ .expect("deferred outcome");++ match outcome {+ TriageOutcome::Deferred { defer_until_ms, .. } => {+ assert!((before + 900..=before + 1_500).contains(&defer_until_ms));+ }+ TriageOutcome::Decision(_) | TriageOutcome::Terminal { .. } => {+ panic!("expected an in-flight deferral")+ }+ }+ drop(attempt);+}