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(inference): pin the inspection catalog's failure-status mapping
M3gA-Mind8b13001ac3bf
diff --git a/crates/openhuman-tinyhumans/src/inference/managed_catalog_inspection_tests.rs b/crates/openhuman-tinyhumans/src/inference/managed_catalog_inspection_tests.rsindex 0d79bde425..61f199a37e 100644--- a/crates/openhuman-tinyhumans/src/inference/managed_catalog_inspection_tests.rs+++ b/crates/openhuman-tinyhumans/src/inference/managed_catalog_inspection_tests.rs@@ -412,3 +412,46 @@ fn an_expired_session_is_skipped_without_broadcast_or_store_mutation() {);});}++#[test]+fn managed_inspection_catalog_maps_each_failure_status_to_its_variant() {+ with_backend_env_test_lock(async {+ let _registry = crate::registry_test_lock_async().await;+ for (status, expected) in [+ (StatusCode::FORBIDDEN, "AuthOrAccess"),+ (StatusCode::NOT_FOUND, "NoCatalog"),+ (StatusCode::INTERNAL_SERVER_ERROR, "Failure"),+ (StatusCode::BAD_GATEWAY, "Failure"),+ ] {+ let (base, server) = spawn_managed_backend(status).await;+ let _env = BackendEnvSnapshot::set(&base);+ let (_temp, config) = temporary_config(&base);+ store_session(+ &config,+ "fixture-managed-session",+ &base,+ chrono::Utc::now() + chrono::Duration::hours(1),+ );+ let auth_file_before =+ std::fs::read(auth_profiles_path(&config)).expect("session fixture");++ let error = inspect_managed_catalog(config.clone())+ .await+ .expect_err("a non-2xx catalog answer is an error");++ let variant = match error {+ InspectionCatalogError::AuthOrAccess => "AuthOrAccess",+ InspectionCatalogError::NoCatalog => "NoCatalog",+ InspectionCatalogError::Failure => "Failure",+ _ => "other",+ };+ assert_eq!(variant, expected, "status {status}");+ assert_eq!(server.requests.load(Ordering::SeqCst), 1, "status {status}");+ assert_eq!(+ std::fs::read(auth_profiles_path(&config)).unwrap(),+ auth_file_before,+ "status {status}"+ );+ }+ });+}