The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(core): add tests for configuration migration and retired features
Steven Enamakelc7e5d56051bf
diff --git a/crates/openhuman-core/src/config/schema/load/parse_tests.rs b/crates/openhuman-core/src/config/schema/load/parse_tests.rsindex 36fe638b24..0216b22472 100644--- a/crates/openhuman-core/src/config/schema/load/parse_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/parse_tests.rs@@ -63,6 +63,28 @@ fn legacy_configuration_with_retired_sections_still_parses() {assert!(config.tokenjuice.router_enabled);}+#[test]+fn stale_configured_agents_are_dropped_before_typed_decode() {+ let legacy = config_from_toml_str(+ r#"+default_model = "preserved-model"++[agents.research]+model = "old/configured-model"+system_prompt = "retired"+"#,+ )+ .expect("legacy config with configured agents still loads");++ assert_eq!(legacy.default_model.as_deref(), Some("preserved-model"));+ let saved = toml::to_string(&legacy).expect("config serializes");+ assert!(!saved.contains("[agents"), "stale table survived: {saved}");++ let reloaded = config_from_toml_str(&saved).expect("migrated config reloads");+ assert_eq!(reloaded.default_model.as_deref(), Some("preserved-model"));+ assert_eq!(toml::to_string(&reloaded).unwrap(), saved);+}+#[test]fn a_syntax_error_reports_the_toml_location() {let err = config_from_toml_str("default_model = \n[broken").unwrap_err();diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 4d72515243..a97c88f181 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -4048,6 +4048,22 @@ async fn json_rpc_agent_work_list_groups_runs_by_bucket() {rpc_join.abort();}+#[tokio::test]+async fn retired_agent_work_methods_are_unknown_over_http() {+ let (rpc_addr, rpc_join) = serve_on_ephemeral(build_core_http_router(false)).await;+ let rpc_base = format!("http://{rpc_addr}");++ for (id, method) in [+ (20_001, "openhuman.agent_work_list"),+ (20_002, "openhuman.agent_work_control"),+ ] {+ let response = post_json_rpc(&rpc_base, id, method, json!({})).await;+ assert_unknown_method(&response, method);+ }++ rpc_join.abort();+}+#[test]fn json_rpc_web_chat_routing_cases_use_expected_backend_models() {run_json_rpc_e2e_on_agent_stack(