Skip to content

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

test(inference): assert unscoped saas auth errors stay out of registry

Steven Enamakel73bbddbfcaaf
diff --git a/crates/openhuman-core/src/inference/auth_error_registry_tests.rs b/crates/openhuman-core/src/inference/auth_error_registry_tests.rs
index 4fa42a6c60..d3d87860b6 100644
--- a/crates/openhuman-core/src/inference/auth_error_registry_tests.rs
+++ b/crates/openhuman-core/src/inference/auth_error_registry_tests.rs
@@ -36,7 +36,11 @@ fn an_unscoped_saas_auth_error_is_not_attributed_to_every_profile() {
reset_for_tests();
let scope = current_scope_in(true, None);
assert!(matches!(scope, CurrentScope::Unresolved(_)));
- record_in_scope("saas-unscoped-provider", 401, scope);
+ assert!(!record_in_scope("saas-unscoped-provider", 401, scope));
+ assert!(
+ snapshot().is_empty(),
+ "an unresolved SaaS failure must not enter the process-wide registry"
+ );
let workspace = tempfile::tempdir().expect("profile workspace");
let (errors, has_unscoped) = snapshot_for_scope(