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 terminal classification for context and quota errors
Steven Enamakelccab39432d02
diff --git a/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs b/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rsindex f7bdc0f817..e701539d76 100644--- a/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs+++ b/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs@@ -86,6 +86,31 @@ fn classify_string_recognises_timeout_as_transient() {);}+#[test]+fn classify_string_keeps_context_and_quota_failures_terminal_even_with_500_status() {+ for message in [+ "provider returned 500: maximum context length exceeded",+ "provider returned 500: MONTHLY_REQUEST_COUNT quota exhausted",+ ] {+ let err = classify_error(message.to_string());+ assert!(+ matches!(err, ArmError::Fatal(_)),+ "terminal provider state must not retry: {message}"+ );+ }+}++#[test]+fn classify_string_keeps_non_retryable_rate_limit_distinct() {+ let err = classify_error(+ "HTTP 429: monthly quota exhausted; Retry-After: 2".to_string(),+ );+ assert!(+ matches!(err, ArmError::Fatal(_)),+ "billing rate limit remains terminal despite Retry-After"+ );+}+#[test]fn classify_string_treats_auth_failure_as_fatal() {let err = classify_error("HTTP 401 unauthorized: invalid api key".to_string());