Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: cover quota markers and http-date retry-after

Steven Enamakele542824126c5
diff --git a/crates/openhuman-core/src/inference/provider/http_error_tests.rs b/crates/openhuman-core/src/inference/provider/http_error_tests.rs
index bb49489366..a5f691d65a 100644
--- a/crates/openhuman-core/src/inference/provider/http_error_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/http_error_tests.rs
@@ -103,7 +103,7 @@ async fn backend_401_publishes_session_expired_through_reporter() {
install_fixture_backend_classifier();
crate::core::bus::init().await.expect("bus init");
let mut rx = crate::core::bus::BUS.get().expect("bus").receiver();
- let marker = "REPORTER_MARKER_SESSION";
+ let marker = "REPORTER_MARKER_SESSION MONTHLY_REQUEST_COUNT quota exceeded";
let _ = api_error(FIXTURE_BACKEND, response(StatusCode::UNAUTHORIZED, marker)).await;
let seen = drain_until(&mut rx, |e| match e {
DomainEvent::SessionExpired { reason, .. } if reason.contains(marker) => Some(()),
diff --git a/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs b/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs
index 8fd64eb817..f47fe2710e 100644
--- a/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs
+++ b/crates/openhuman-core/src/triage/evaluator_fallback_chain_tests.rs
@@ -77,6 +77,10 @@ fn classify_string_preserves_long_fractional_and_inline_retry_hints() {
2_500,
),
("HTTP 429 Too Many Requests; retry_after 1.5", 1_500),
+ (
+ "HTTP 429 Too Many Requests\nRetry-After: Sat, 01 Jan 2000 00:00:00 GMT",
+ 0,
+ ),
] {
match classify_error(message.to_string()) {
ArmError::Retryable {