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
chore: files changed crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs,cra
Steven Enamakel7c7a5aac0eb2
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rsindex e3d145d56a..c1b5fc2131 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs@@ -142,41 +142,6 @@ pub(crate) fn steer_directive_error_from_registry(}}-/// Deliver a crate-native control-flow [`SteeringDirective`] to a running-/// sub-agent through its registered TinyAgents `SteeringHandle`.-///-/// Unlike [`steer`], this has **no** `RunQueue` fallback: the crate control-/// variants (`Redirect`/`Pause`/`Resume`/`Cancel`) have no OpenHuman queue lane,-/// so a run must have a live registered handle to receive them. The directive's-/// command kind is checked against the run's own `SteeringPolicy` *before*-/// enqueue — a disallowed command would otherwise abort the run — so this can-/// never smuggle a control kind past a policy that a tighter run class installed.-pub(crate) fn steer_directive(- task_id: &str,- parent_session: &str,- directive: SteeringDirective,-) -> Result<(), SteerDirectiveError> {- let handle = registry()- .steering_handle(&TaskId::new(task_id), parent_session)- .map_err(steer_directive_error_from_registry)?;- let kind = directive.kind();- if !handle.policy().is_allowed(kind) {- log::warn!(- "[running_subagents] directive rejected by run policy task_id={} kind={}",- task_id,- kind.as_str()- );- return Err(SteerDirectiveError::PolicyRejected);- }- handle.send(directive.into_command());- log::info!(- "[running_subagents] steered task_id={} directive={} via=tinyagents_registry",- task_id,- kind.as_str()- );- Ok(())-}-/// Inject a message into a running sub-agent. Prefer the crate-native/// TinyAgents steering registry when the child run has registered its live/// handle, and fall back to the OpenHuman `RunQueue` compatibility path.diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rsindex c459445193..43dc7c525a 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs@@ -73,106 +73,6 @@ async fn steer_prefers_registered_tinyagents_handle() {prune("task-registered-steer");}-#[tokio::test]-async fn steer_directive_delivers_control_flow_via_background_policy() {- let _guard = test_guard();- let rq = run_queue();- let tx = register_test("task-directive", "session-A", rq.clone());- // A background sub-agent handle accepts Cancel/Redirect/Resume.- let handle = openhuman_steering_handle(SteeringRunClass::Background);- let task_id = TaskId::new("task-directive");- shared_steering_registry().register(task_id.clone(), handle.clone());-- steer_directive(- "task-directive",- "session-A",- SteeringDirective::Redirect("focus on the failing test".into()),- )- .expect("redirect should be accepted");- steer_directive("task-directive", "session-A", SteeringDirective::Cancel)- .expect("cancel should be accepted");-- // RunQueue is untouched — directives never fall back to it.- assert_eq!(rq.status().await.steers, 0);- let commands = handle.drain();- assert_eq!(commands.len(), 2);- assert!(matches!(- &commands[0],- SteeringCommand::Redirect { instruction } if instruction == "focus on the failing test"- ));- assert_eq!(commands[1], SteeringCommand::Cancel);-- let _ = shared_steering_registry().deregister(&task_id);- let _ = tx.send(SubagentStatus::Completed {- output: "done".into(),- iterations: 1,- });- prune("task-directive");-}--#[tokio::test]-async fn steer_directive_refuses_kinds_the_policy_rejects() {- let _guard = test_guard();- let rq = run_queue();- let tx = register_test("task-tight", "session-A", rq);- // An interactive-class handle only allows InjectMessage/Pause, so a- // Cancel directive must be refused up front rather than enqueued (which- // would abort the run).- let handle = SteeringHandle::new(- SteeringPolicy::new()- .allow(SteeringCommandKind::InjectMessage)- .allow(SteeringCommandKind::Pause),- );- let task_id = TaskId::new("task-tight");- shared_steering_registry().register(task_id.clone(), handle.clone());-- assert_eq!(- steer_directive("task-tight", "session-A", SteeringDirective::Cancel),- Err(SteerDirectiveError::PolicyRejected)- );- // Pause is allowed on the tight policy.- steer_directive("task-tight", "session-A", SteeringDirective::Pause)- .expect("pause should be accepted by the tight policy");- let commands = handle.drain();- assert_eq!(commands, vec![SteeringCommand::Pause]);-- let _ = shared_steering_registry().deregister(&task_id);- let _ = tx.send(SubagentStatus::Completed {- output: "done".into(),- iterations: 1,- });- prune("task-tight");-}--#[tokio::test]-async fn steer_directive_enforces_ownership_and_registration() {- let _guard = test_guard();- let rq = run_queue();- let tx = register_test("task-own", "session-owner", rq);-- // Cross-parent is refused before any handle lookup.- assert_eq!(- steer_directive("task-own", "session-intruder", SteeringDirective::Resume),- Err(SteerDirectiveError::NotOwned)- );- // Unknown task id.- assert_eq!(- steer_directive("task-missing", "session-owner", SteeringDirective::Resume),- Err(SteerDirectiveError::Unknown)- );- // Owned but no registered crate handle → cannot deliver control-flow.- assert_eq!(- steer_directive("task-own", "session-owner", SteeringDirective::Resume),- Err(SteerDirectiveError::NoRegisteredHandle)- );-- let _ = tx.send(SubagentStatus::Completed {- output: "done".into(),- iterations: 1,- });- prune("task-own");-}-#[tokio::test]async fn steer_rejects_cross_parent_and_unknown() {let _guard = test_guard();diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rsindex d3ea6aba8a..9fa21a6ae7 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs@@ -676,16 +676,6 @@ impl SecurityGate for OpenHumanSecurityGate {}}-/// Marks a verdict the gate could not reach at all (storage down, config-/// unreadable). Callers fail closed on it; a *policy* refusal is a `Deny`, not-/// an error. Nothing in this adapter currently produces one — every branch-/// reaches a decision — but the helper keeps the distinction explicit for the-/// storage-backed checks a later slice may add.-#[allow(dead_code)]-pub(crate) fn gate_unavailable(detail: impl std::fmt::Display) -> TinyAgentsError {- TinyAgentsError::Capability(format!("security gate could not reach a verdict: {detail}"))-}-#[cfg(test)]#[path = "security_gate_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rsindex ae11fdb7f3..4d8c262254 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs@@ -266,14 +266,6 @@ async fn ordinary_text_passes_screening_unchanged() {assert_eq!(outcome.effective_text(text), Some(text));}-#[test]-fn gate_unavailable_is_an_error_not_a_refusal() {- // A policy refusal is Deny/Block; Err means no verdict was reachable.- let err = gate_unavailable("approval store unreadable");- assert!(matches!(err, TinyAgentsError::Capability(_)));- assert!(err.to_string().contains("could not reach a verdict"));-}-/// Builds a session whose channel policy yields `action` for `tool_name`.fn policy_session(tool_name: &str, action: ToolPolicyAction) -> Arc<ToolPolicySession> {use crate::tools::agent_policy::{TaskProfile, TaskRiskLevel, ToolPolicyDecision};diff --git a/crates/openhuman-core/src/core/cli_capability.rs b/crates/openhuman-core/src/core/cli_capability.rsindex 4c07aaf2c4..e23211661e 100644--- a/crates/openhuman-core/src/core/cli_capability.rs+++ b/crates/openhuman-core/src/core/cli_capability.rs@@ -212,37 +212,6 @@ pub fn ensure_capability_blocking(required: Option<Capability>, invocation: &strcapability_verdict(&driver_id, advertised, Some(required), invocation)}-/// The pure verdict for the legacy-client gate: does the bound driver class-/// permit commands that operate on the embedded store directly?-///-/// Mirrors [`capability_verdict`]'s default-OPEN posture — `None` from the-/// caller means "no legacy gate applies", and an unresolvable binding has-/// already been defaulted-OPEN upstream by the caller skipping this entirely.-pub fn legacy_client_verdict(driver_id: &str, class: DriverClass, invocation: &str) -> Result<()> {- // `Module` passes for the same reason `Embedded` does, and omitting it was- // refusing every `openhuman memory` subcommand in the field: `binding::admit`- // stopped admitting `Embedded` at all (the built-in driver binds as- // `Module`), so a gate that only accepted `Embedded` accepted nothing.- //- // The gate's premise is about WHERE the memory lives, not how the driver is- // linked. A module is a `cdylib` over the in-process bus with no egress and- // no process boundary — the local store is still the store these- // subcommands operate on. `External` and `Null` stay refused, and for the- // reason the message gives: the local store is not the source of truth- // there, so reading it directly would answer from the wrong place.- if matches!(class, DriverClass::Embedded | DriverClass::Module) {- return Ok(());- }- log::warn!(- "[cli][legacy-client-gate] rejected invocation='{invocation}' driver='{driver_id}' \- class={} — not the embedded engine",- class.as_str()- );- anyhow::bail!(legacy_client_unavailable_message(- driver_id, class, invocation- ))-}-#[cfg(test)]#[path = "cli_capability_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/core/memory_cli_tests.rs b/crates/openhuman-core/src/core/memory_cli_tests.rsindex ceffffc472..fd6c1002c4 100644--- a/crates/openhuman-core/src/core/memory_cli_tests.rs+++ b/crates/openhuman-core/src/core/memory_cli_tests.rs@@ -107,71 +107,6 @@ fn default_embedded_driver_gates_nothing() {/// reason — see [`create_memory_binding`].const LEGACY_ENGINE_SUBCOMMANDS: &[&str] = &["ingest", "query"];-/// Every legacy subcommand — gated or not — must be rejected under a null-/// binding: they operate on the embedded store directly, and the null-/// driver is not that engine. This is the regression the reviewer flagged:-/// `openhuman memory clear` used to open the embedded DB even with-/// `driver = "null"` (and now does not open it at all).-#[test]-fn null_driver_rejects_every_legacy_subcommand() {- for sub in LEGACY_ENGINE_SUBCOMMANDS {- let err = crate::core::cli_capability::legacy_client_verdict(- "null",- DriverClass::Null,- &format!("openhuman memory {sub}"),- )- .expect_err("a null binding must reject legacy subcommands");- let msg = err.to_string();- assert!(msg.contains("null"), "{msg}");- assert!(- msg.contains("local store"),- "refusal must explain that these subcommands read the local store: {msg}"- );- }-}--/// Both local-store classes may serve the legacy subcommands.-///-/// `Module` matters more than `Embedded` now: `binding::admit` refuses-/// `Embedded` outright, so the built-in driver binds as `Module` and a gate-/// that accepted only `Embedded` refused every subcommand in the field.-#[test]-fn local_store_drivers_serve_every_legacy_subcommand() {- for (driver, class) in [- ("tinycortex", DriverClass::Embedded),- ("tinymemory", DriverClass::Module),- ] {- for sub in LEGACY_ENGINE_SUBCOMMANDS {- assert!(- crate::core::cli_capability::legacy_client_verdict(- driver,- class,- &format!("openhuman memory {sub}"),- )- .is_ok(),- "`openhuman memory {sub}` must stay available under {driver} ({class:?})"- );- }- }-}--/// A driver that answers from somewhere else must still be refused —-/// reading the local store there would answer from the wrong place.-#[test]-fn external_driver_still_rejects_every_legacy_subcommand() {- for sub in LEGACY_ENGINE_SUBCOMMANDS {- assert!(- crate::core::cli_capability::legacy_client_verdict(- "supermemory",- DriverClass::External,- &format!("openhuman memory {sub}"),- )- .is_err(),- "`openhuman memory {sub}` must stay refused under a remote driver"- );- }-}-/// The legacy-client diagnostic must not leak credentials or endpoints.#[test]fn legacy_message_never_contains_a_credential_or_endpoint() {diff --git a/crates/openhuman-core/src/core/subsystem/registry.rs b/crates/openhuman-core/src/core/subsystem/registry.rsindex 38453a41ca..aef4511a91 100644--- a/crates/openhuman-core/src/core/subsystem/registry.rs+++ b/crates/openhuman-core/src/core/subsystem/registry.rs@@ -196,40 +196,6 @@ impl SubsystemRegistry {previous}- /// Binds `primary` if it constructed; otherwise logs the failure loudly and- /// binds the driver `fallback` produces, tagging it with the id that failed- /// so status can show the substitution (kernel.md §3.7).- ///- /// `fallback` is `FnOnce` so the embedded default is not constructed at all- /// when the primary succeeds.- pub fn bind_with_fallback<E, F>(- &mut self,- slot: SubsystemSlot,- attempted_driver_id: &str,- primary: Result<BoundDriver, E>,- fallback: F,- ) -> &BoundDriver- where- E: std::fmt::Display,- F: FnOnce() -> BoundDriver,- {- match primary {- Ok(driver) => {- self.bind(driver);- }- Err(err) => {- let mut driver = fallback();- log::warn!(- "[subsystem] {slot} driver '{attempted_driver_id}' failed to bind: {err}; falling back to '{}'",- driver.id- );- driver.fell_back_from = Some(attempted_driver_id.to_string());- self.bind(driver);- }- }- &self.slots[&slot]- }-/// The driver bound to `slot`, if any.pub fn get(&self, slot: SubsystemSlot) -> Option<&BoundDriver> {self.slots.get(&slot)diff --git a/crates/openhuman-core/src/core/subsystem/registry_tests.rs b/crates/openhuman-core/src/core/subsystem/registry_tests.rsindex 0a317e7f0d..676e52b2c4 100644--- a/crates/openhuman-core/src/core/subsystem/registry_tests.rs+++ b/crates/openhuman-core/src/core/subsystem/registry_tests.rs@@ -130,83 +130,6 @@ fn rebind_does_not_disturb_other_slots() {assert_eq!(registry.len(), 2);}-#[test]-fn bind_with_fallback_binds_the_primary_when_it_constructs() {- let mut registry = SubsystemRegistry::new();- let primary: Result<BoundDriver, String> = Ok(bound(- SubsystemSlot::Memory,- "supermemory",- DriverClass::External,- ));-- let driver = registry.bind_with_fallback(SubsystemSlot::Memory, "supermemory", primary, || {- bound(SubsystemSlot::Memory, "tinycortex", DriverClass::Embedded)- });-- assert_eq!(driver.id, "supermemory");- assert!(!driver.is_fallback());- assert_eq!(driver.fell_back_from, None);-}--#[test]-fn bind_with_fallback_binds_the_fallback_when_the_primary_fails() {- let mut registry = SubsystemRegistry::new();- let primary: Result<BoundDriver, String> = Err("handshake refused".into());-- let driver = registry.bind_with_fallback(SubsystemSlot::Memory, "supermemory", primary, || {- bound(SubsystemSlot::Memory, "tinycortex", DriverClass::Embedded)- });-- assert_eq!(driver.id, "tinycortex");- assert_eq!(driver.class, DriverClass::Embedded);- assert_eq!(- registry.get(SubsystemSlot::Memory).expect("bound").id,- "tinycortex"- );-}--#[test]-fn bind_with_fallback_records_fell_back_from_so_status_is_never_silent() {- let mut registry = SubsystemRegistry::new();- let primary: Result<BoundDriver, String> = Err("handshake refused".into());-- registry.bind_with_fallback(SubsystemSlot::Memory, "supermemory", primary, || {- bound(SubsystemSlot::Memory, "tinycortex", DriverClass::Embedded)- });-- let driver = registry.get(SubsystemSlot::Memory).expect("bound");- assert!(driver.is_fallback());- assert_eq!(driver.fell_back_from.as_deref(), Some("supermemory"));-- let encoded = serde_json::to_value(driver).expect("status record serializes");- assert_eq!(- encoded["fell_back_from"],- json!("supermemory"),- "the substitution must be visible in status output"- );-}--#[test]-fn bind_with_fallback_does_not_construct_the_fallback_on_success() {- let mut registry = SubsystemRegistry::new();- let constructed = Cell::new(false);- let primary: Result<BoundDriver, String> = Ok(bound(- SubsystemSlot::Memory,- "supermemory",- DriverClass::External,- ));-- registry.bind_with_fallback(SubsystemSlot::Memory, "supermemory", primary, || {- constructed.set(true);- bound(SubsystemSlot::Memory, "tinycortex", DriverClass::Embedded)- });-- assert!(- !constructed.get(),- "the embedded default must not be constructed when the primary binds"- );-}-#[test]fn set_health_updates_only_the_named_slot() {let mut registry = SubsystemRegistry::new();diff --git a/crates/openhuman-core/src/core/types.rs b/crates/openhuman-core/src/core/types.rsindex 7584fe9782..d0a7350893 100644--- a/crates/openhuman-core/src/core/types.rs+++ b/crates/openhuman-core/src/core/types.rs@@ -5,20 +5,6 @@use serde::{Deserialize, Serialize};-/// Standard response structure for commands that include execution logs.-///-/// This is commonly used in internal APIs and CLI outputs where it's-/// important to see the side-effects or diagnostic information alongside-/// the primary result.-#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct CommandResponse<T> {- /// The primary data returned by the command.- pub result: T,- /// A list of log messages generated during command execution.- /// These can include warnings, info, or trace messages.- pub logs: Vec<String>,-}-/// Success payload from a core RPC handler before JSON-RPC wrapping.////// This internal type allows handlers to return a generic JSON value along@@ -43,15 +29,6 @@ impl InvocationResult {})}- /// Creates a success result from a serializable value with accompanying logs.- ///- /// Use this when the domain logic has meaningful logs to surface to the caller.- pub fn with_logs<T: Serialize>(v: T, logs: Vec<String>) -> Result<Self, String> {- Ok(Self {- value: serde_json::to_value(v).map_err(|e| e.to_string())?,- logs,- })- }}/// Formats an [`InvocationResult`] into its standard JSON-RPC format.diff --git a/crates/openhuman-core/src/core/types_tests.rs b/crates/openhuman-core/src/core/types_tests.rsindex e13b18ee08..acbd83ccc2 100644--- a/crates/openhuman-core/src/core/types_tests.rs+++ b/crates/openhuman-core/src/core/types_tests.rs@@ -8,14 +8,6 @@ fn invocation_result_ok_serializes_value() {assert!(result.logs.is_empty());}-#[test]-fn invocation_result_with_logs() {- let result =- InvocationResult::with_logs(json!(42), vec!["log1".into(), "log2".into()]).unwrap();- assert_eq!(result.value, json!(42));- assert_eq!(result.logs.len(), 2);-}-#[test]fn invocation_to_rpc_json_no_logs_returns_value_directly() {let inv = InvocationResult {@@ -81,18 +73,6 @@ fn both_controller_return_paths_apply_the_same_log_envelope() {}}-#[test]-fn command_response_serde_roundtrip() {- let resp = CommandResponse {- result: "ok".to_string(),- logs: vec!["log1".into()],- };- let json = serde_json::to_string(&resp).unwrap();- let back: CommandResponse<String> = serde_json::from_str(&json).unwrap();- assert_eq!(back.result, "ok");- assert_eq!(back.logs.len(), 1);-}-#[test]fn app_state_clone() {let state = AppState {diff --git a/crates/openhuman-core/src/inference/host_runtime/core.rs b/crates/openhuman-core/src/inference/host_runtime/core.rsindex e503aa5faf..28dc3d6ea6 100644--- a/crates/openhuman-core/src/inference/host_runtime/core.rs+++ b/crates/openhuman-core/src/inference/host_runtime/core.rs@@ -24,19 +24,6 @@ pub fn try_global() -> Option<Arc<LocalAiService>> {LOCAL_AI.get().cloned()}-pub fn model_artifact_path(config: &Config) -> PathBuf {- let root = crate::config::default_root_openhuman_dir().unwrap_or_else(|_| {- config- .config_path- .parent()- .map(std::path::PathBuf::from)- .unwrap_or_else(|| config.workspace_dir.clone())- });- root.join("models")- .join("local-ai")- .join(effective_chat_model_id(config).replace(':', "-") + ".ollama")-}-#[cfg(test)]#[path = "core_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/inference/host_runtime/core_tests.rs b/crates/openhuman-core/src/inference/host_runtime/core_tests.rsindex 300dc1f52c..b5027feef8 100644--- a/crates/openhuman-core/src/inference/host_runtime/core_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/core_tests.rs@@ -1,43 +1,5 @@use super::*;-#[test]-fn model_artifact_path_includes_models_local_ai_subdirs() {- let config = Config::default();- let path = model_artifact_path(&config);- let path_str = path.to_string_lossy();- assert!(- path_str.contains("models"),- "expected `models` in path: {path_str}"- );- assert!(- path_str.contains("local-ai"),- "expected `local-ai` subdir in path: {path_str}"- );-}--#[test]-fn model_artifact_path_ends_with_ollama_suffix() {- let config = Config::default();- let path = model_artifact_path(&config);- assert_eq!(- path.extension().and_then(|s| s.to_str()),- Some("ollama"),- "model artifact must have `.ollama` extension: {}",- path.display()- );-}--#[test]-fn model_artifact_path_replaces_colon_in_model_id_with_dash() {- // Model IDs commonly look like `qwen2:1.5b`; colons are illegal on- // Windows path components, so we normalise to `-`. This test pins- // that mapping.- let config = Config::default();- let path = model_artifact_path(&config);- let file = path.file_name().unwrap().to_string_lossy().to_string();- assert!(!file.contains(':'), "filename must not contain `:`: {file}");-}-#[test]fn global_returns_same_arc_across_calls() {let config = Config::default();diff --git a/crates/openhuman-core/src/inference/provider/error_classify.rs b/crates/openhuman-core/src/inference/provider/error_classify.rsindex a514ba42a6..508d26b9a4 100644--- a/crates/openhuman-core/src/inference/provider/error_classify.rs+++ b/crates/openhuman-core/src/inference/provider/error_classify.rs@@ -25,13 +25,6 @@ fn classify(err: &anyhow::Error) -> ProviderFailureClass {classify_provider_failure(status, None, &message)}-pub(crate) fn is_non_retryable(err: &anyhow::Error) -> bool {- matches!(- classify(err),- ProviderFailureClass::NonRetryable | ProviderFailureClass::NonRetryableRateLimit- )-}-pub(crate) fn is_rate_limited(err: &anyhow::Error) -> bool {matches!(classify(err),diff --git a/crates/openhuman-core/src/inference/provider/error_classify_tests.rs b/crates/openhuman-core/src/inference/provider/error_classify_tests.rsindex 4563a8044f..4563e55b7b 100644--- a/crates/openhuman-core/src/inference/provider/error_classify_tests.rs+++ b/crates/openhuman-core/src/inference/provider/error_classify_tests.rs@@ -1,28 +1 @@use super::*;--#[test]-fn delegates_generic_failure_classes_to_tinyagents() {- assert!(is_non_retryable(&anyhow::anyhow!(- "HTTP 401 invalid api key"- )));- assert!(is_rate_limited(&anyhow::anyhow!(- "HTTP 429 rate limit exceeded"- )));- assert!(is_upstream_unhealthy(&anyhow::anyhow!(- "HTTP 503 service unavailable"- )));- assert_eq!(- parse_retry_after_ms(&anyhow::anyhow!("Retry-After: 2.5")),- Some(2_500)- );-}--#[test]-fn preserves_openhuman_terminal_account_rules() {- assert!(is_non_retryable(&anyhow::anyhow!(- "provider returned: you have reached the limit on your monthly requests"- )));- assert!(is_non_retryable(&anyhow::anyhow!(- "SESSION_EXPIRED: sign in again"- )));-}diff --git a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rsindex 3db0c9d8ff..192d0919c9 100644--- a/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs+++ b/crates/openhuman-core/src/inference/provider/fallback_diagnostics.rs@@ -160,18 +160,6 @@ pub(crate) fn local_vision_unsupported_message(model: &str) -> String {)}-/// Pure pre-flight for image input: `Ok(())` when `model` accepts images,-/// `Err(actionable message)` when it does not.-///-/// Split from the call sites so the wording is unit-testable and identical-/// everywhere an image is about to be dropped.-pub(crate) fn vision_preflight(model: &str, config: &crate::config::Config) -> Result<(), String> {- if crate::inference::model_context::model_supports_vision(model, config) {- return Ok(());- }- Err(local_vision_unsupported_message(model))-}-fn capitalize_first(s: &str) -> String {let mut chars = s.chars();match chars.next() {diff --git a/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs b/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rsindex 6642a0a59f..ad9c4a6dfd 100644--- a/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs+++ b/crates/openhuman-core/src/inference/provider/fallback_diagnostics_tests.rs@@ -106,35 +106,3 @@ fn vision_unsupported_message_names_model_and_a_concrete_remedy() {assert!(msg.contains("llava:7b"), "got: {msg}");assert!(msg.contains("vision_provider"), "got: {msg}");}--#[test]-fn vision_preflight_allows_a_vision_capable_model() {- use crate::config::schema::ModelRegistryEntry;- let mut config = crate::config::Config::default();- config.model_registry = vec![ModelRegistryEntry {- id: "llava:7b".into(),- provider: "ollama".into(),- cost_per_1m_output: 0.0,- vision: true,- ..Default::default()- }];- assert!(vision_preflight("llava:7b", &config).is_ok());-}--#[test]-fn vision_preflight_rejects_a_text_only_model_with_an_actionable_message() {- let config = crate::config::Config::default();- let err = vision_preflight("gemma3:1b", &config)- .expect_err("a text-only model must fail the vision pre-flight");- assert!(err.contains("gemma3:1b"), "got: {err}");- assert!(err.contains("llava:7b"), "got: {err}");-}--#[test]-fn vision_preflight_allows_the_managed_vision_route() {- // The vision route and the managed default are multimodal per- // `oh_tier_supports_vision`; the pre-flight must not fire for them.- let config = crate::config::Config::default();- assert!(vision_preflight("hint:vision", &config).is_ok());- assert!(vision_preflight(crate::config::MODEL_MANAGED_DEFAULT, &config).is_ok());-}diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rsindex 1010aabfc7..9e5aef21e8 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs@@ -153,15 +153,6 @@ pub(super) async fn proxy(_config: &crate::config::Config) -> Result<tinybus::PrErr("native modules are not compiled into this build".to_string())}-pub async fn compact_output_with_policy(- content: String,- tool_name: &str,- enabled: bool,- profile: AgentTokenjuiceCompression,-) -> String {- compact_output_with_config(content, tool_name, enabled, profile, None).await-}-/// Compact tool output using an already-resolved runtime config when available.////// Agent turns must not reload configuration from the middle of a deep tooldiff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rsindex 96654f2446..3bed73ac1e 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs@@ -7,32 +7,6 @@ fn recovery_tool_aliases_remain_stable() {assert!(!is_recovery_tool("shell"));}-#[tokio::test]-async fn disabled_compaction_is_an_exact_pass_through_without_loading_the_module() {- let content = "exact tool output".to_string();- let output = compact_output_with_policy(- content.clone(),- "shell",- false,- AgentTokenjuiceCompression::Full,- )- .await;- assert_eq!(output, content);-}--#[tokio::test]-async fn off_profile_is_an_exact_pass_through_without_loading_the_module() {- let content = "exact tool output".to_string();- let output = compact_output_with_policy(- content.clone(),- "shell",- true,- AgentTokenjuiceCompression::Off,- )- .await;- assert_eq!(output, content);-}-/// The whole summary path over the real bus: `CompactWith` into the module,/// `MlHost.Generate` back out to a registered call, the summary back in./// Runs where CI builds the module (`TINYJUICE_TEST_MODULE`); skippeddiff --git a/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs b/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rsindex 03810f706c..29b02546b0 100644--- a/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs+++ b/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs@@ -56,17 +56,6 @@ fn sanitize_basename_replaces_windows_illegal_characters() {assert_eq!(sanitize_basename("safe-name.md"), "safe-name.md");}-#[test]-fn parse_source_kind_str_accepts_known_values_only() {- assert_eq!(parse_source_kind_str("chat"), Some(SourceKind::Chat));- assert_eq!(parse_source_kind_str("email"), Some(SourceKind::Email));- assert_eq!(- parse_source_kind_str("document"),- Some(SourceKind::Document)- );- assert_eq!(parse_source_kind_str("unknown"), None);-}-#[tokio::test]async fn obsidian_status_registered_when_override_config_lists_content_root() {let (_tmp, cfg) = test_config();diff --git a/crates/openhuman-core/src/memory/read_rpc/mod.rs b/crates/openhuman-core/src/memory/read_rpc/mod.rsindex 9c5eb16a7f..c922974429 100644--- a/crates/openhuman-core/src/memory/read_rpc/mod.rs+++ b/crates/openhuman-core/src/memory/read_rpc/mod.rs@@ -41,11 +41,6 @@ pub use types::{};pub use vault::{obsidian_vault_status_rpc, vault_health_check_rpc};-#[allow(dead_code)]-pub(crate) fn parse_source_kind_str(s: &str) -> Option<tinymemory_api::chunks::SourceKind> {- tinymemory_api::chunks::SourceKind::parse(s).ok()-}-// Re-exports for `read_rpc_tests.rs`, which drives this module with// `use super::*;`.//diff --git a/crates/openhuman-core/src/memory/source_scope.rs b/crates/openhuman-core/src/memory/source_scope.rsindex cfc9242fb5..8f8041364c 100644--- a/crates/openhuman-core/src/memory/source_scope.rs+++ b/crates/openhuman-core/src/memory/source_scope.rs@@ -89,15 +89,6 @@ pub fn current_source_scope() -> Option<HashSet<String>> {SOURCE_SCOPE.try_with(|v| v.clone()).ok().flatten()}-/// Whether `scope` is recallable under the ambient allowlist. `true` when there-/// is no active scope (unrestricted) or when the scope is explicitly allowed.-pub fn scope_allowed(scope: &str) -> bool {- match current_source_scope() {- None => true,- Some(set) => set.contains(scope),- }-}-/// Render the ambient scope in the vocabulary a `MemoryProvider` call takes.////// This is the whole point of keeping the task-local host-side: the ambientdiff --git a/crates/openhuman-core/src/memory/source_scope_tests.rs b/crates/openhuman-core/src/memory/source_scope_tests.rsindex 62127074db..e98a0e5396 100644--- a/crates/openhuman-core/src/memory/source_scope_tests.rs+++ b/crates/openhuman-core/src/memory/source_scope_tests.rs@@ -1,47 +1,5 @@use super::*;-#[tokio::test]-async fn unrestricted_outside_scope() {- assert!(current_source_scope().is_none());- assert!(scope_allowed("anything"));-}--#[tokio::test]-async fn restricts_to_allowlisted_scopes() {- with_source_scope(- Some(vec!["slack:#eng".into(), " gmail:me ".into()]),- async {- let set = current_source_scope().expect("scope set");- assert_eq!(set.len(), 2);- assert!(scope_allowed("slack:#eng"));- assert!(scope_allowed("gmail:me")); // trimmed- assert!(!scope_allowed("notion:team"));- },- )- .await;- // Must not leak past the scope.- assert!(current_source_scope().is_none());- assert!(scope_allowed("notion:team"));-}--#[tokio::test]-async fn empty_allowlist_blocks_everything() {- with_source_scope(Some(vec![]), async {- assert!(current_source_scope().is_some());- assert!(!scope_allowed("slack:#eng"));- })- .await;-}--#[tokio::test]-async fn explicit_none_is_unrestricted() {- with_source_scope(None, async {- assert!(current_source_scope().is_none());- assert!(scope_allowed("slack:#eng"));- })- .await;-}-#[tokio::test]async fn chunk_gate_passes_non_source_chunks_and_gates_tagged_ones() {let src_tags = vec!["memory_sources".to_string(), "document".to_string()];diff --git a/crates/openhuman-core/src/platform/cost/catalog.rs b/crates/openhuman-core/src/platform/cost/catalog.rsindex 6fb0c99380..5caa812c77 100644--- a/crates/openhuman-core/src/platform/cost/catalog.rs+++ b/crates/openhuman-core/src/platform/cost/catalog.rs@@ -527,13 +527,6 @@ pub fn tinyagents_catalog_entry(price: &ModelPrice) -> tinyagents_registry::Mode}}-/// Resolve a model id and return its TinyAgents catalog projection.-pub fn tinyagents_catalog_entry_for_model(- model: &str,-) -> Option<tinyagents_registry::ModelCatalogEntry> {- lookup(model).map(tinyagents_catalog_entry)-}-/// Source tag for local (runtime-discovered) model entries in the unified/// catalog. Distinct from [`TINYAGENTS_CATALOG_SOURCE`] so consumers can tell a/// priced vendor row apart from a free local runtime model.diff --git a/crates/openhuman-core/src/platform/cost/catalog_tests.rs b/crates/openhuman-core/src/platform/cost/catalog_tests.rsindex 3cdbc88f75..2c91d33622 100644--- a/crates/openhuman-core/src/platform/cost/catalog_tests.rs+++ b/crates/openhuman-core/src/platform/cost/catalog_tests.rs@@ -72,26 +72,6 @@ fn default_registry_entries_are_fully_populated() {}}-#[test]-fn tinyagents_projection_uses_per_token_rates_and_context_window() {- let entry = tinyagents_catalog_entry_for_model("anthropic/claude-opus-4-8")- .expect("projected catalog entry");- assert_eq!(entry.provider, "anthropic");- assert_eq!(entry.model_id, "claude-opus-4-8");- assert_eq!(entry.mode, "chat");- assert_eq!(entry.max_input_tokens, Some(1_000_000));- assert_eq!(entry.pricing.input_per_token, Some(5.0 / 1_000_000.0));- assert_eq!(entry.pricing.output_per_token, Some(25.0 / 1_000_000.0));- assert_eq!(- entry.pricing.cache_read_input_per_token,- Some(0.50 / 1_000_000.0)- );- assert_eq!(entry.pricing.cache_creation_input_per_token, None);- assert_eq!(entry.pricing.output_reasoning_per_token, None);- assert!(entry.capabilities.prompt_caching);- assert_eq!(entry.source, TINYAGENTS_CATALOG_SOURCE);-}-#[test]fn tinyagents_snapshot_contains_all_known_rows() {let snapshot = tinyagents_catalog_snapshot();diff --git a/crates/openhuman-core/src/security/audit.rs b/crates/openhuman-core/src/security/audit.rsindex 2389fa9ddb..301323c37f 100644--- a/crates/openhuman-core/src/security/audit.rs+++ b/crates/openhuman-core/src/security/audit.rs@@ -339,17 +339,6 @@ impl AuditLogger {self.log(&event)}- /// Log a generated tool execution event with provider/capability- /// provenance suitable for runtime policy audits.- pub fn log_generated_tool_event(&self, entry: GeneratedToolExecutionLog<'_>) -> Result<()> {- let event = AuditEvent::new(AuditEventType::CommandExecution)- .with_actor(entry.channel.to_string(), None, None)- .with_generated_tool_action(entry.clone())- .with_result(entry.success, None, entry.duration_ms, None);-- self.log(&event)- }-/// Rotate log if it exceeds max sizefn rotate_if_needed(&self) -> Result<()> {if let Ok(metadata) = std::fs::metadata(&self.log_path) {diff --git a/crates/openhuman-core/src/security/audit_tests.rs b/crates/openhuman-core/src/security/audit_tests.rsindex 9ca1ac0bf2..d5a8230e50 100644--- a/crates/openhuman-core/src/security/audit_tests.rs+++ b/crates/openhuman-core/src/security/audit_tests.rs@@ -156,42 +156,6 @@ async fn audit_log_command_event_writes_structured_entry() -> Result<()> {Ok(())}-#[tokio::test]-async fn audit_log_generated_tool_event_writes_correlation_fields() -> Result<()> {- let tmp = TempDir::new()?;- let config = AuditConfig {- enabled: true,- max_size_mb: 10,- ..Default::default()- };- let logger = AuditLogger::new(config, tmp.path().to_path_buf())?;-- logger.log_generated_tool_event(GeneratedToolExecutionLog {- channel: "chat",- tool_name: "email.send",- provider_id: "mail.runtime",- capability_id: "email.send",- risk_level: "external_write",- policy_decision: "require_approval",- approval_id: Some("approval-1"),- approved: true,- allowed: true,- success: true,- duration_ms: 13,- })?;-- let log_path = tmp.path().join("audit.log");- let content = tokio::fs::read_to_string(&log_path).await?;- let parsed: AuditEvent = serde_json::from_str(content.trim())?;- let action = parsed.action.unwrap();- assert_eq!(action.command, Some("email.send".to_string()));- assert_eq!(action.provider_id, Some("mail.runtime".to_string()));- assert_eq!(action.capability_id, Some("email.send".to_string()));- assert_eq!(action.policy_decision, Some("require_approval".to_string()));- assert_eq!(action.approval_id, Some("approval-1".to_string()));- Ok(())-}-#[test]fn audit_rotation_creates_numbered_backup() -> Result<()> {let tmp = TempDir::new()?;diff --git a/crates/openhuman-core/src/security/keyring/encrypted_store.rs b/crates/openhuman-core/src/security/keyring/encrypted_store.rsindex 721605f554..e39a2ebf7c 100644--- a/crates/openhuman-core/src/security/keyring/encrypted_store.rs+++ b/crates/openhuman-core/src/security/keyring/encrypted_store.rs@@ -193,11 +193,6 @@ impl SecretStore {value.starts_with("enc2:") || value.starts_with("enc:")}- /// Check if a value uses the secure `enc2:` format.- pub fn is_secure_encrypted(value: &str) -> bool {- value.starts_with("enc2:")- }-fn use_legacy_file_key(&self) -> bool {cfg!(test)}diff --git a/crates/openhuman-core/src/security/keyring/encrypted_store_crypto_migration_tests.rs b/crates/openhuman-core/src/security/keyring/encrypted_store_crypto_migration_tests.rsindex c5bf8be59d..400a434ea5 100644--- a/crates/openhuman-core/src/security/keyring/encrypted_store_crypto_migration_tests.rs+++ b/crates/openhuman-core/src/security/keyring/encrypted_store_crypto_migration_tests.rs@@ -226,14 +226,6 @@ fn needs_migration_detects_legacy_prefix() {assert!(!SecretStore::needs_migration(""));}-#[test]-fn is_secure_encrypted_detects_enc2_only() {- assert!(SecretStore::is_secure_encrypted("enc2:aabbcc"));- assert!(!SecretStore::is_secure_encrypted("enc:aabbcc"));- assert!(!SecretStore::is_secure_encrypted("sk-plaintext"));- assert!(!SecretStore::is_secure_encrypted(""));-}-#[test]fn decrypt_and_migrate_returns_none_for_enc2() {let tmp = TempDir::new().unwrap();diff --git a/crates/openhuman-core/src/skills/catalog/store.rs b/crates/openhuman-core/src/skills/catalog/store.rsindex b33dc1c8b9..a544532285 100644--- a/crates/openhuman-core/src/skills/catalog/store.rs+++ b/crates/openhuman-core/src/skills/catalog/store.rs@@ -69,14 +69,6 @@ pub fn load_cached_catalog_state() -> Option<CachedCatalog> {}}-/// Load the cached catalog only when within the freshness TTL.-pub fn load_cached_catalog() -> Option<Vec<CatalogEntry>> {- match load_cached_catalog_state()? {- CachedCatalog::Fresh(entries) => Some(entries),- CachedCatalog::Stale(_) => None,- }-}-pub fn save_catalog_cache(entries: &[CatalogEntry]) {let Some(dir) = registry_dir() else { return };if let Err(e) = std::fs::create_dir_all(&dir) {diff --git a/crates/openhuman-core/src/skills/catalog/store_tests.rs b/crates/openhuman-core/src/skills/catalog/store_tests.rsindex 9f6c0ee301..b00dab7da8 100644--- a/crates/openhuman-core/src/skills/catalog/store_tests.rs+++ b/crates/openhuman-core/src/skills/catalog/store_tests.rs@@ -9,43 +9,3 @@ fn write_cache(dir: &std::path::Path, fetched_at_epoch: u64) {std::fs::create_dir_all(dir).unwrap();std::fs::write(dir.join(CACHE_FILE), serde_json::to_string(&cache).unwrap()).unwrap();}--#[test]-fn within_ttl_is_fresh_past_ttl_is_stale() {- let _guard = crate::skills::catalog::TEST_ENV_LOCK- .lock()- .unwrap_or_else(|e| e.into_inner());- let tmp = tempfile::tempdir().unwrap();- std::env::set_var(CACHE_DIR_ENV, tmp.path());-- // Fresh: just written.- write_cache(tmp.path(), now_epoch());- assert!(matches!(- load_cached_catalog_state(),- Some(CachedCatalog::Fresh(_))- ));- assert!(load_cached_catalog().is_some());-- // Stale: older than the TTL. `load_cached_catalog` (TTL-respecting)- // returns None, but the state loader still surfaces the entries.- write_cache(tmp.path(), now_epoch().saturating_sub(CACHE_TTL_SECS + 60));- assert!(matches!(- load_cached_catalog_state(),- Some(CachedCatalog::Stale(_))- ));- assert!(load_cached_catalog().is_none());-- std::env::remove_var(CACHE_DIR_ENV);-}--#[test]-fn missing_cache_returns_none() {- let _guard = crate::skills::catalog::TEST_ENV_LOCK- .lock()- .unwrap_or_else(|e| e.into_inner());- let tmp = tempfile::tempdir().unwrap();- std::env::set_var(CACHE_DIR_ENV, tmp.path());- assert!(load_cached_catalog_state().is_none());- assert!(load_cached_catalog().is_none());- std::env::remove_var(CACHE_DIR_ENV);-}diff --git a/crates/openhuman-core/src/skills/webhooks/router.rs b/crates/openhuman-core/src/skills/webhooks/router.rsindex 4ab959fb36..5348ac5857 100644--- a/crates/openhuman-core/src/skills/webhooks/router.rs+++ b/crates/openhuman-core/src/skills/webhooks/router.rs@@ -317,20 +317,6 @@ impl WebhookRouter {self.routes.read().ok()?.get(tunnel_uuid).cloned()}- /// List tunnels owned by a specific skill (for the skill JS API).- pub fn list_for_skill(&self, skill_id: &str) -> Vec<TunnelRegistration> {- self.routes- .read()- .map(|routes| {- routes- .values()- .filter(|r| r.skill_id == skill_id)- .cloned()- .collect()- })- .unwrap_or_default()- }-/// List all tunnel registrations (for the frontend admin UI).pub fn list_all(&self) -> Vec<TunnelRegistration> {self.routesdiff --git a/crates/openhuman-core/src/skills/webhooks/router_tests.rs b/crates/openhuman-core/src/skills/webhooks/router_tests.rsindex ecbe766a67..9cf4524804 100644--- a/crates/openhuman-core/src/skills/webhooks/router_tests.rs+++ b/crates/openhuman-core/src/skills/webhooks/router_tests.rs@@ -58,24 +58,6 @@ fn test_unregister_skill() {assert_eq!(router.route("uuid-3"), Some("notion".to_string()));}-#[test]-fn test_list_for_skill() {- let router = WebhookRouter::new(None);- router.register("uuid-1", "gmail", None, None).unwrap();- router.register("uuid-2", "notion", None, None).unwrap();- router.register("uuid-3", "gmail", None, None).unwrap();-- let gmail_tunnels = router.list_for_skill("gmail");- assert_eq!(gmail_tunnels.len(), 2);- assert!(gmail_tunnels.iter().all(|t| t.skill_id == "gmail"));-- let notion_tunnels = router.list_for_skill("notion");- assert_eq!(notion_tunnels.len(), 1);-- let empty = router.list_for_skill("nonexistent");- assert!(empty.is_empty());-}-#[test]fn test_record_request_and_response() {let router = WebhookRouter::new(None);diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rsindex 81d9ce07c9..ab5839f707 100644--- a/crates/openhuman-core/src/tools/ops.rs+++ b/crates/openhuman-core/src/tools/ops.rs@@ -21,26 +21,6 @@ use tinytools_std::network::{CurlTool, PushoverTool};pub(crate) use super::capability::tool_capability;-/// Derive the browser tool's host allowlist from the unified web-access list-/// (`http_request.allowed_domains`).-///-/// The browser tool shares the single fetch allowlist rather than the-/// deprecated `[browser].allowed_domains`, but the `"*"` allow-all wildcard is-/// stripped on purpose: `web_fetch`/`curl` treat `"*"` as "open to all public-/// sites", whereas the browser (a real Chromium with JS, cookies, and-/// logged-in sessions) must NOT inherit blanket access from a fetch-side-/// toggle. Browser allow-all stays gated by `OPENHUMAN_BROWSER_ALLOW_ALL`-/// (`allow_all_browser_domains()`), and the tool itself stays behind-/// `browser.enabled`. Net effect is fail-safe: unifying can only ever narrow-/// the browser's reach, never widen it.-pub(crate) fn browser_allowed_domains(http_allowed_domains: &[String]) -> Vec<String> {- http_allowed_domains- .iter()- .filter(|domain| domain.as_str() != "*")- .cloned()- .collect()-}-/// Create the default tool registrypub fn default_tools(security: Arc<SecurityPolicy>) -> Vec<Box<dyn Tool>> {default_tools_with_runtime(security, Arc::new(NativeRuntime::new()))diff --git a/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs b/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rsindex 7b116e71ac..12f49a18da 100644--- a/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_execution_and_serde_tests.rs@@ -1,31 +1,5 @@use super::*;-#[test]-fn browser_allowed_domains_shares_fetch_list_minus_wildcard() {- // Unified web-access firewall: the browser tool derives its host allowlist- // from `http_request.allowed_domains`, but the `"*"` allow-all wildcard is- // stripped so a fetch-side "Allow all" never silently opens the browser.-- // Explicit hosts pass straight through (shared with fetch).- assert_eq!(- browser_allowed_domains(&["reuters.com".into(), "github.com".into()]),- vec!["reuters.com".to_string(), "github.com".to_string()],- );-- // `"*"` (fetch allow-all, and the http_request default) yields an EMPTY- // browser list — browser stays closed unless OPENHUMAN_BROWSER_ALLOW_ALL.- assert!(browser_allowed_domains(&["*".into()]).is_empty());-- // Mixed: wildcard dropped, explicit hosts kept.- assert_eq!(- browser_allowed_domains(&["*".into(), "intranet.corp".into()]),- vec!["intranet.corp".to_string()],- );-- // Block-all (empty fetch list) -> empty browser list.- assert!(browser_allowed_domains(&[]).is_empty());-}-#[test]fn all_tools_includes_browser_when_enabled() {let tmp = TempDir::new().unwrap();