Skip to content

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

test: align CI fixtures with removed runtime APIs

Steven Enamakel8835e989adbf
diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rs
index 570f22a356..c82911cf09 100644
--- a/crates/openhuman-core/src/tools/ops_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests.rs
@@ -343,6 +343,8 @@ const TOOL_LESS: &[crate::core::all::DomainGroup] = {
G::Channels,
G::Hosted,
G::Operator,
+ // Reserved domain after managed runtime tools were removed.
+ G::Runtimes,
]
};
diff --git a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
index 0d99caa436..9eafb79089 100644
--- a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
@@ -165,7 +165,7 @@ fn no_gate_family_tool_silently_defaults_to_platform() {
#[cfg(not(feature = "flows"))]
fn default_tools_omits_flows_tools_when_feature_off() {
let security = Arc::new(SecurityPolicy::default());
- let tools = default_tools(security);
+ let tools = crate::tools::ops::default_tools(security);
let names = tool_names(&tools);
for absent in [
diff --git a/crates/openhuman-core/src/tools/ops_tests_domain_family_tests.rs b/crates/openhuman-core/src/tools/ops_tests_domain_family_tests.rs
index a37c6ab8bf..212d23aff1 100644
--- a/crates/openhuman-core/src/tools/ops_tests_domain_family_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_domain_family_tests.rs
@@ -1,5 +1,7 @@
use super::*;
-use crate::tools::{filter_tools_by_user_preference, http_request_tool, BrowserOpenTool};
+#[cfg(feature = "modules")]
+use crate::tools::BrowserOpenTool;
+use crate::tools::{filter_tools_by_user_preference, http_request_tool};
use tinytools_std::filesystem::{ApplyPatchTool, CsvExportTool};
#[tokio::test]
diff --git a/crates/openhuman-embed/tests/process_cancellation.rs b/crates/openhuman-embed/tests/process_cancellation.rs
index f5d79a2ed8..36f4078bdd 100644
--- a/crates/openhuman-embed/tests/process_cancellation.rs
+++ b/crates/openhuman-embed/tests/process_cancellation.rs
@@ -166,26 +166,6 @@ async fn exited_group_leader_is_not_reaped_until_its_descendants_close_the_pipes
assert!(!std::path::Path::new(&format!("/proc/{}", pids[0])).exists());
}
-#[tokio::test]
-async fn cancellable_turns_route_interpreters_away_from_unacknowledged_pools() {
- let mut config = openhuman_core::config::RuntimePoolConfig::default();
- config.python.enabled = Some(true);
- assert!(openhuman_core::runtime::pool::python::enabled(&config));
- assert!(openhuman_core::runtime::pool::node::enabled(&config));
- let cleanup = ProcessCleanup::default();
- cleanup
- .scope(async {
- tokio::task::yield_now().await;
- assert!(!openhuman_core::runtime::pool::python::enabled(&config));
- assert!(
- !openhuman_core::runtime::pool::node::enabled(&config),
- "cancellable node jobs must use an owned subprocess"
- );
- })
- .await;
- assert!(openhuman_core::runtime::pool::node::enabled(&config));
-}
-
#[tokio::test]
async fn host_commands_receive_stdin_and_timeout_after_reaping() {
let mut cmd = tokio::process::Command::new("/bin/sh");
diff --git a/tests/in_process/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rs
index 15bd018d03..88b9452651 100644
--- a/tests/in_process/config_auth_app_state_connectivity_e2e.rs
+++ b/tests/in_process/config_auth_app_state_connectivity_e2e.rs
@@ -1241,12 +1241,10 @@ async fn config_env_overlay_public_loader_applies_runtime_and_tool_overrides() {
assert!(config.proxy.enabled);
assert_eq!(config.proxy.scope, ProxyScope::Services);
assert!(config.proxy.should_apply_to_service("tool.browser"));
- assert!(!config.node.enabled);
- assert_eq!(config.node.version, "v24.0.0");
- assert!(!config.node.prefer_system);
- assert!(!config.runtime_python.enabled);
- assert_eq!(config.runtime_python.minimum_version, "3.13.0");
- assert!(config.runtime_python.prefer_system);
+ // Deprecated runtime environment settings must not resurrect removed fields.
+ let serialized = serde_json::to_value(&config).expect("serialize config");
+ assert!(serialized.get("node").is_none());
+ assert!(serialized.get("runtime_python").is_none());
assert!(!config.observability.analytics_enabled);
assert_eq!(
config.observability.sentry_dsn.as_deref(),
diff --git a/tests/raw_coverage/automation_scheduling_e2e.rs b/tests/raw_coverage/automation_scheduling_e2e.rs
index 28aaa7e875..f48cad1e36 100644
--- a/tests/raw_coverage/automation_scheduling_e2e.rs
+++ b/tests/raw_coverage/automation_scheduling_e2e.rs
@@ -1,7 +1,7 @@
//! JSON-RPC E2E coverage for the automation/scheduling controllers that no
//! e2e target reached: `cron_remove` / `cron_run` / `cron_runs`,
//! `task_sources_sync` / `task_sources_list_databases`, the whole `hooks`
-//! namespace, and `harness_init_run`.
+//! namespace, and removal of managed runtime provisioning RPCs.
//!
//! Every case boots the real Axum JSON-RPC router over HTTP against an
//! isolated `HOME` and asserts on the **content** of the response. Nothing
@@ -79,13 +79,8 @@ async fn serve_rpc() -> (
(addr, token, join)
}
-/// The config every case here runs against.
-///
-/// `[node] enabled = false` and `[runtime_python] enabled = false` are load-
-/// bearing: `harness_init_run` would otherwise **download** a managed Node.js
-/// and CPython. `Config` does not `deny_unknown_fields`, so a mistyped table
-/// name would be silently ignored and the download would happen anyway —
-/// [`assert_provisioning_is_disabled`] is the guard against exactly that.
+/// Offline config: local AI is disabled and the backend URL cannot reach a
+/// real service. Managed Node/Python provisioning no longer exists.
const TEST_CONFIG_TOML: &str = r#"api_url = "http://127.0.0.1:9"
default_model = "automation-e2e-model"
default_temperature = 0.2
@@ -97,28 +92,15 @@ encrypt = false
[local_ai]
enabled = false
-[node]
-enabled = false
-
-[runtime_python]
-enabled = false
-
"#;
-/// Prove the disable switches actually bound to the fields harness-init reads,
-/// rather than being silently dropped as unknown keys.
-fn assert_provisioning_is_disabled() -> openhuman_core::config::Config {
+/// Validate the active offline settings against the typed schema.
+fn assert_offline_config() -> openhuman_core::config::Config {
let parsed: openhuman_core::config::Config =
toml::from_str(TEST_CONFIG_TOML).expect("test config must match the Config schema");
- assert!(
- !parsed.node.enabled,
- "[node] enabled=false must bind — otherwise harness_init downloads Node.js"
- );
- assert!(
- !parsed.runtime_python.enabled,
- "[runtime_python] enabled=false must bind — otherwise harness_init downloads CPython"
- );
+ assert!(!parsed.local_ai.enabled);
+ assert_eq!(parsed.api_url.as_deref(), Some("http://127.0.0.1:9"));
parsed
}
@@ -131,7 +113,7 @@ fn write_min_config(openhuman_dir: &Path) {
// Runtime config resolution is user-scoped before login, so the pre-login
// `users/local` layer needs the same file or the RPC handlers load defaults.
write(&openhuman_dir.join("users").join("local"));
- assert_provisioning_is_disabled();
+ assert_offline_config();
}
struct Harness {
@@ -826,116 +808,20 @@ async fn hooks_reload_surfaces_a_malformed_file_as_a_warning() {
h.join.abort();
}
-// ── harness_init ────────────────────────────────────────────────────────────
+// ── removed runtime provisioning ────────────────────────────────────────────
-/// `harness_init_run` is the retry behind the first-run setup overlay. With
-/// every provisioning backend switched off, each step's cheap probe reports it
-/// satisfied and the run must settle `done` **without downloading anything**.
-///
-/// `force` is the interesting parameter: it must bypass the probe and actually
-/// invoke each step, which is observable in the per-step message — the
-/// probe-satisfied path stamps "already provisioned" and the forced path does
-/// not.
#[tokio::test]
-async fn harness_init_run_completes_offline_and_force_bypasses_the_probes() {
+async fn managed_runtime_provisioning_rpcs_are_not_registered() {
let _lock = env_lock_async().await;
let h = setup().await;
-
- let snapshot = h.ok(2701, "openhuman.harness_init_run", json!({})).await;
- let steps = snapshot
- .pointer("/snapshot/steps")
- .and_then(Value::as_array)
- .unwrap_or_else(|| panic!("the snapshot carries a steps array: {snapshot}"));
- assert_eq!(
- snapshot
- .pointer("/snapshot/overall")
- .and_then(Value::as_str),
- Some("done"),
- "no required step can fail when every backend is off: {snapshot}"
- );
-
- let step_ids: Vec<&str> = steps.iter().map(|step| str_at(step, "/id")).collect();
- for expected in [
- "python_runtime",
- "kompress",
- "runtime_python_server",
+ for (id, method, params) in [
+ (2701, "openhuman.harness_init_run", json!({})),
+ (2702, "openhuman.harness_init_run", json!({ "force": true })),
+ (2703, "openhuman.harness_init_status", json!({})),
] {
- assert!(
- step_ids.contains(&expected),
- "the registry step {expected} must appear in the snapshot, got {step_ids:?}"
- );
+ let response = h.rpc(id, method, params).await;
+ assert_eq!(response.pointer("/error/code").and_then(Value::as_i64),
+ Some(-32601), "removed RPC {method} must be unavailable: {response}");
}
-
- for step in steps {
- assert_eq!(
- step.get("state").and_then(Value::as_str),
- Some("done"),
- "every disabled step probes satisfied: {step}"
- );
- assert_eq!(
- step.get("message").and_then(Value::as_str),
- Some("already provisioned"),
- "the unforced path marks Done from the probe, without running: {step}"
- );
- assert_eq!(step.get("percent").and_then(Value::as_u64), Some(100));
- assert_eq!(
- step.get("required").and_then(Value::as_bool),
- Some(false),
- "every registered step is non-required today: {step}"
- );
- assert!(
- step.get("updated_at").and_then(Value::as_str).is_some(),
- "each state change is stamped: {step}"
- );
- }
-
- let forced = h
- .ok(2702, "openhuman.harness_init_run", json!({ "force": true }))
- .await;
- assert_eq!(
- forced.pointer("/snapshot/overall").and_then(Value::as_str),
- Some("done"),
- "a forced re-run of disabled steps still settles done: {forced}"
- );
- let forced_steps = forced
- .pointer("/snapshot/steps")
- .and_then(Value::as_array)
- .expect("forced steps array");
- for step in forced_steps {
- assert_eq!(
- step.get("state").and_then(Value::as_str),
- Some("done"),
- "a forced disabled step returns Ok immediately: {step}"
- );
- assert!(
- step.get("message").and_then(Value::as_str) != Some("already provisioned"),
- "force must bypass the probe, so the probe's message cannot appear: {step}"
- );
- }
- assert!(
- forced
- .pointer("/snapshot/finished_at")
- .and_then(Value::as_str)
- .is_some(),
- "a finished run is stamped: {forced}"
- );
-
- // `harness_init_status` must report the same snapshot the run just left
- // behind, not recompute one.
- let status = h.ok(2703, "openhuman.harness_init_status", json!({})).await;
- assert_eq!(
- status.pointer("/snapshot/overall").and_then(Value::as_str),
- Some("done"),
- "status reads the store the run wrote: {status}"
- );
- assert_eq!(
- status
- .pointer("/snapshot/steps")
- .and_then(Value::as_array)
- .map(Vec::len),
- forced_steps.len().into(),
- "status and run agree on the step list: {status}"
- );
-
h.join.abort();
}
diff --git a/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs b/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
index 8691d19466..8da64c7a5c 100644
--- a/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
@@ -99,7 +99,6 @@ async fn setup_direct_config(base: &str) -> Harness {
config.composio.mode = "direct".to_string();
config.composio.api_key = Some(" ck_round25_direct ".to_string());
config.composio.entity_id = " entity-round25 ".to_string();
- config.node.enabled = false;
config.secrets.encrypt = false;
config.observability.analytics_enabled = false;
config.save().await.expect("save config");
diff --git a/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs b/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
index 2011a7a4cd..192d510622 100644
--- a/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
@@ -90,7 +90,6 @@ async fn setup_config() -> Harness {
config_path: root.join("config.toml"),
..Config::default()
};
- config.node.enabled = false;
config.secrets.encrypt = false;
config.observability.analytics_enabled = false;
config.save().await.expect("save config");