Skip to content

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

chore(services_tests): remove unused import of `ServiceError`

Steven Enamakel6e3aa8f45fe9
diff --git a/crates/openhuman-core/src/core/runtime/services_tests.rs b/crates/openhuman-core/src/core/runtime/services_tests.rs
index 242d6b1af5..b963f463a2 100644
--- a/crates/openhuman-core/src/core/runtime/services_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/services_tests.rs
@@ -1,16 +1,14 @@
use super::*;
-/// desktop() must enable every bootstrap job — proves the un-bundling kept
-/// the desktop job set byte-identical.
+/// desktop() must enable every bootstrap job.
#[test]
fn desktop_plan_enables_every_job() {
let plan = bootstrap_job_plan(&ServiceSet::desktop());
assert_eq!(
plan,
BootstrapJobPlan {
- memory_queue: true,
composio_integration_sync: true,
- workspace_memory_sync: true,
+ memory_jobs: true,
task_source_pollers: true,
module_preload: true,
}
@@ -21,9 +19,8 @@ fn desktop_plan_enables_every_job() {
#[test]
fn job_free_presets_enable_nothing() {
let empty = BootstrapJobPlan {
- memory_queue: false,
composio_integration_sync: false,
- workspace_memory_sync: false,
+ memory_jobs: false,
task_source_pollers: false,
module_preload: false,
};
@@ -31,33 +28,20 @@ fn job_free_presets_enable_nothing() {
assert_eq!(bootstrap_job_plan(&ServiceSet::headless_api()), empty);
}
-/// From none(), flipping exactly one concern flag enables exactly its job
-/// and nothing else.
+/// From none(), flipping exactly one concern flag enables exactly its job.
#[test]
fn each_concern_flag_enables_exactly_its_job() {
let mut integrations = ServiceSet::none();
integrations.integrations = true;
let plan = bootstrap_job_plan(&integrations);
assert!(plan.composio_integration_sync);
- assert!(!plan.workspace_memory_sync);
- assert!(!plan.memory_queue);
+ assert!(!plan.memory_jobs);
assert!(!plan.task_source_pollers);
let mut memory_sync = ServiceSet::none();
memory_sync.memory_sync = true;
let plan = bootstrap_job_plan(&memory_sync);
- assert!(plan.workspace_memory_sync);
- assert!(!plan.composio_integration_sync);
- assert!(!plan.module_preload);
-
- // The module preload is memory background work: it follows the queue
- // flag and no other.
- let mut memory_queue = ServiceSet::none();
- memory_queue.memory_queue = true;
- let plan = bootstrap_job_plan(&memory_queue);
- assert!(plan.module_preload);
- assert!(plan.memory_queue);
- assert!(!plan.workspace_memory_sync);
+ assert!(plan.memory_jobs);
assert!(!plan.composio_integration_sync);
assert!(!plan.task_source_pollers);
}
@@ -69,33 +53,27 @@ fn disabling_one_concern_disables_only_its_job() {
services.integrations = false;
let plan = bootstrap_job_plan(&services);
assert!(!plan.composio_integration_sync);
- assert!(plan.workspace_memory_sync);
- assert!(plan.memory_queue);
+ assert!(plan.memory_jobs);
assert!(plan.task_source_pollers);
let mut services = ServiceSet::desktop();
services.memory_sync = false;
let plan = bootstrap_job_plan(&services);
- assert!(!plan.workspace_memory_sync);
+ assert!(!plan.memory_jobs);
assert!(plan.composio_integration_sync);
}
-/// The #5028 regression: `channels` gates NO bootstrap job. Turning channels
-/// on by itself must enable zero sync jobs, and turning channels off while
-/// the new flags stay on must lose nothing.
+/// `channels` gates NO bootstrap job.
#[test]
fn channels_flag_gates_no_bootstrap_job() {
- // channels=true alone → zero sync jobs.
let mut channels_only = ServiceSet::none();
channels_only.channels = true;
- let plan = bootstrap_job_plan(&channels_only);
assert_eq!(
- plan,
+ bootstrap_job_plan(&channels_only),
bootstrap_job_plan(&ServiceSet::none()),
"channels alone must enable no bootstrap job"
);
- // channels=false with every new flag on → identical to desktop's plan.
let mut channels_off = ServiceSet::desktop();
channels_off.channels = false;
assert_eq!(