Skip to content

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

chore: files changed crates/openhuman-core/src/profiles/background_tests.rs,crates/openhuman-core/sr

Steven Enamakel9fea4b614072
diff --git a/crates/openhuman-core/src/profiles/background_tests.rs b/crates/openhuman-core/src/profiles/background_tests.rs
index dc75414a6f..9810762236 100644
--- a/crates/openhuman-core/src/profiles/background_tests.rs
+++ b/crates/openhuman-core/src/profiles/background_tests.rs
@@ -38,7 +38,7 @@ async fn nothing_to_do_does_nothing() {
}
#[tokio::test]
-async fn only_agents_with_queued_memory_jobs_are_run() {
+async fn only_profiles_with_queued_memory_jobs_are_run() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 3600);
let busy = ProfileId::for_user(
@@ -69,7 +69,7 @@ async fn only_agents_with_queued_memory_jobs_are_run() {
}
#[tokio::test]
-async fn a_tick_sweeps_idle_agents() {
+async fn a_tick_sweeps_idle_profiles() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 0);
let id = ProfileId::for_user(
diff --git a/crates/openhuman-core/src/profiles/credentials_tests.rs b/crates/openhuman-core/src/profiles/credentials_tests.rs
index 179378416c..500cca5f47 100644
--- a/crates/openhuman-core/src/profiles/credentials_tests.rs
+++ b/crates/openhuman-core/src/profiles/credentials_tests.rs
@@ -7,7 +7,7 @@ use crate::security::credentials::session_support::{
/// Credential secrets live in the process keyring keyed by agent id, which
/// every test in this binary shares; each test therefore uses its own users.
-fn agent(tmp: &tempfile::TempDir, user: &str) -> Config {
+fn profile(tmp: &tempfile::TempDir, user: &str) -> Config {
let id = ProfileId::for_user(
&format!("{user}-{}", uuid::Uuid::new_v4()),
crate::profiles::ProfileIdMode::Raw,
@@ -19,7 +19,7 @@ fn agent(tmp: &tempfile::TempDir, user: &str) -> Config {
}
#[test]
-fn each_agent_resolves_only_its_own_credential() {
+fn each_profile_resolves_only_its_own_credential() {
let tmp = tempfile::tempdir().unwrap();
let alice = agent(&tmp, "alice");
let bob = agent(&tmp, "bob");
@@ -37,7 +37,7 @@ fn each_agent_resolves_only_its_own_credential() {
}
#[test]
-fn clearing_one_agent_leaves_the_other() {
+fn clearing_one_profile_leaves_the_other() {
let tmp = tempfile::tempdir().unwrap();
let alice = agent(&tmp, "alice");
let bob = agent(&tmp, "bob");
diff --git a/crates/openhuman-core/src/profiles/host_tests.rs b/crates/openhuman-core/src/profiles/host_tests.rs
index 20eb74bf35..72ad6b7956 100644
--- a/crates/openhuman-core/src/profiles/host_tests.rs
+++ b/crates/openhuman-core/src/profiles/host_tests.rs
@@ -7,7 +7,7 @@ fn host(tmp: &tempfile::TempDir, max_open: usize, idle_secs: u64) -> ProfileHost
ProfileHost::new(saas, CoreContext::for_test(DomainSet::full(), None))
}
-fn agent(name: &str) -> ProfileId {
+fn profile(name: &str) -> ProfileId {
ProfileId::for_user(name, crate::profiles::ProfileIdMode::Raw).unwrap()
}
@@ -26,7 +26,7 @@ fn provisioning_creates_the_layout_once() {
}
#[test]
-fn only_provisioned_agents_open() {
+fn only_provisioned_profiles_open() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
let err = host.open(&agent("nobody")).unwrap_err();
@@ -34,7 +34,7 @@ fn only_provisioned_agents_open() {
}
#[test]
-fn an_open_agent_runs_under_its_own_scope() {
+fn an_open_profile_runs_under_its_own_scope() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
let (a, b) = (agent("alice"), agent("bob"));
@@ -58,7 +58,7 @@ fn an_open_agent_runs_under_its_own_scope() {
}
#[test]
-fn a_full_host_evicts_the_least_recently_used_idle_agent() {
+fn a_full_host_evicts_the_least_recently_used_idle_profile() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 2, 3600);
let ids: Vec<_> = ["a", "b", "c"].iter().map(|n| agent(n)).collect();
@@ -74,7 +74,7 @@ fn a_full_host_evicts_the_least_recently_used_idle_agent() {
}
#[test]
-fn an_agent_in_use_is_never_evicted() {
+fn an_profile_in_use_is_never_evicted() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 1, 0);
let (a, b) = (agent("a"), agent("b"));
@@ -90,7 +90,7 @@ fn an_agent_in_use_is_never_evicted() {
}
#[test]
-fn idle_agents_are_swept() {
+fn idle_profiles_are_swept() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 0);
let id = agent("a");
@@ -119,7 +119,7 @@ fn deprovisioning_archives_and_closes() {
}
#[test]
-fn list_reports_provisioned_agents_only() {
+fn list_reports_provisioned_profiles_only() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
assert!(host.list().unwrap().is_empty());
@@ -139,7 +139,7 @@ fn list_reports_provisioned_agents_only() {
}
#[test]
-fn a_reprovisioned_agent_does_not_inherit_the_old_credential() {
+fn a_reprovisioned_profile_does_not_inherit_the_old_credential() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
let id = agent(&format!("returning-{}", uuid::Uuid::new_v4()));
@@ -186,7 +186,7 @@ fn recovery_of_an_empty_workspace_is_a_no_op() {
}
#[test]
-fn an_agent_in_use_is_not_archived_from_under_it() {
+fn an_profile_in_use_is_not_archived_from_under_it() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
let id = agent("alice");
@@ -216,7 +216,7 @@ fn deprovisioning_twice_in_a_second_archives_twice() {
}
#[test]
-fn opening_an_open_agent_sweeps_the_idle_ones() {
+fn opening_an_open_profile_sweeps_the_idle_ones() {
let tmp = tempfile::tempdir().unwrap();
// Everything is idle the moment it is released.
let host = host(&tmp, 4, 0);
@@ -233,7 +233,7 @@ fn opening_an_open_agent_sweeps_the_idle_ones() {
}
#[test]
-fn one_unreadable_agent_does_not_hide_the_rest() {
+fn one_unreadable_profile_does_not_hide_the_rest() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 4, 60);
let (a, b) = (agent("alice"), agent("bob"));
@@ -246,7 +246,7 @@ fn one_unreadable_agent_does_not_hide_the_rest() {
}
#[test]
-fn a_provisioned_config_needs_no_agent_slot() {
+fn a_provisioned_config_needs_no_profile_slot() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp, 1, 60);
let (a, b) = (agent("alice"), agent("bob"));
diff --git a/crates/openhuman-core/src/profiles/ops_tests.rs b/crates/openhuman-core/src/profiles/ops_tests.rs
index 58c8895f05..6874c8a871 100644
--- a/crates/openhuman-core/src/profiles/ops_tests.rs
+++ b/crates/openhuman-core/src/profiles/ops_tests.rs
@@ -9,7 +9,7 @@ fn host(tmp: &tempfile::TempDir) -> ProfileHost {
}
#[test]
-fn provision_derives_the_agent_and_never_echoes_the_user_id() {
+fn provision_derives_the_profile_and_never_echoes_the_user_id() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp);
let out = provision_on(&host, "[email protected]").unwrap();
@@ -25,7 +25,7 @@ fn provision_derives_the_agent_and_never_echoes_the_user_id() {
}
#[test]
-fn status_and_deprovision_take_agent_ids_only() {
+fn status_and_deprovision_take_profile_ids_only() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp);
assert!(status_on(&host, "[email protected]").is_err());
@@ -42,7 +42,7 @@ fn status_and_deprovision_take_agent_ids_only() {
}
#[test]
-fn credentials_are_set_and_cleared_per_agent_and_never_echoed() {
+fn credentials_are_set_and_cleared_per_profile_and_never_echoed() {
let tmp = tempfile::tempdir().unwrap();
let host = host(&tmp);
// The keyring holding credential secrets is shared by every test here.