Skip to content

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

test(saas_mode_e2e): assert agent id matches deterministic user hash

Steven Enamakel2c4004594f0b
diff --git a/tests/saas_mode_e2e.rs b/tests/saas_mode_e2e.rs
index 56ec266ac7..d73cb5b96d 100644
--- a/tests/saas_mode_e2e.rs
+++ b/tests/saas_mode_e2e.rs
@@ -220,7 +220,13 @@ fn a_safe_deployment_serves_core_and_the_operator_plane_behind_the_gateway_beare
.and_then(Value::as_str)
.unwrap_or_else(|| panic!("agent_id in {result}"))
.to_string();
- assert!(agent_id.starts_with("u-"), "{agent_id}");
+ assert_eq!(
+ agent_id,
+ openhuman_core::user_agents::UserAgentId::for_user("[email protected]")
+ .unwrap()
+ .to_string(),
+ "the agent id is the deterministic hash of the user id"
+ );
assert!(!body.to_string().contains("alice"), "{body}");
assert!(d
.root