Skip to content

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

fix(core): remove unused observability module

Steven Enamakel90903aca13f9
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rs
index 80e40978a5..67f48bfdb6 100644
--- a/crates/openhuman-core/src/core/all.rs
+++ b/crates/openhuman-core/src/core/all.rs
@@ -82,7 +82,7 @@ impl RegisteredController {
/// use for. Those are now `Desktop` and `Hosted` and stay off.
///
/// `Platform` is now what its name says: the kernel surfaces with no family of
-/// their own (`platform/`, `tools/`, `http_host/`, `test_support/`).
+/// their own (`platform/`, `tools/`, `test_support/`).
///
/// When adding a family directory, add the matching variant here, a field on
/// [`crate::core::runtime::DomainSet`], an arm in `allows()`, and an entry in
@@ -688,15 +688,6 @@ fn build_registered_controllers() -> Vec<GroupedController> {
DomainGroup::Agent,
crate::commands::all_commands_registered_controllers(),
);
- // Ad-hoc static directory HTTP hosting for local file sharing / previews.
- // Gated with the `http-server` feature (#5048): the domain is an axum server,
- // so a slim build has no `http_host.*` controllers to register.
- #[cfg(feature = "http-server")]
- push(
- &mut controllers,
- DomainGroup::Platform,
- crate::http_host::all_http_host_registered_controllers(),
- );
// Token usage and billing cost tracking
push(
&mut controllers,
diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rs
index 407ec6ccf2..75f5451adb 100644
--- a/crates/openhuman-core/src/core/all_tests.rs
+++ b/crates/openhuman-core/src/core/all_tests.rs
@@ -1292,33 +1292,6 @@ fn http_server_compiled_out_when_feature_off() {
assert!(!crate::core::http_server_status::HTTP_SERVER_COMPILED_IN);
}
-/// With `http-server` on, the `http_host` static-directory server registers its
-/// controllers, so the `http_host.*` RPC surface is present in `/schema`.
-#[test]
-#[cfg(feature = "http-server")]
-fn http_host_controllers_registered_when_http_server_on() {
- let schemas = all_controller_schemas();
- assert!(
- schemas.iter().any(|s| s.namespace == "http_host"),
- "`http_host` controllers must be registered when the `http-server` feature is on"
- );
-}
-
-/// With `http-server` off, the whole `http_host` axum domain is compiled out and
-/// its controller-registration push in `core::all` is gated in lockstep, so the
-/// `http_host` namespace never enters the registry (unknown-method over `/rpc`,
-/// absent from `/schema`). This is the negative half that proves the gate
-/// removes the surface.
-#[test]
-#[cfg(not(feature = "http-server"))]
-fn http_host_controllers_absent_when_http_server_off() {
- let schemas = all_controller_schemas();
- assert!(
- !schemas.iter().any(|s| s.namespace == "http_host"),
- "`http_host` controllers must be compiled out when the `http-server` feature is off"
- );
-}
-
// ---- DomainGroup ↔ family-directory realignment ----------------------------
// The reorg (#5328) made `crates/openhuman-core/src/` one directory per family, so the
// runtime axis can finally name each one instead of sweeping half the surface
@@ -1373,8 +1346,8 @@ fn platform_holds_only_kernel_surfaces() {
.filter(|g| g.group == DomainGroup::Platform)
.map(|g| g.controller.schema.namespace)
.collect();
- // Namespaces legitimately without a family: platform/, tools/, http_host/,
- // test_support/. Anything else here is a missed tag.
+ // Namespaces legitimately without a family: platform/, tools/,
+ // test_support/, and the `http_host` extension `openhuman-rpc` registers. Anything else here is a missed tag.
for ns in &platform {
assert!(
!matches!(
diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rs
index 9fbddaf6af..a087cf6d64 100644
--- a/crates/openhuman-core/src/core/observability.rs
+++ b/crates/openhuman-core/src/core/observability.rs
@@ -167,7 +167,7 @@ pub enum ExpectedErrorKind {
/// /Users/<user>/Documents/<vault>`, observed on
/// `[email protected]`) and preempts the symmetric
/// `hosted path is not a directory:` shape from
- /// `crate::http_host::path_utils` once it starts surfacing.
+ /// `openhuman_rpc::http_host::path_utils` once it starts surfacing.
/// See [`is_filesystem_user_path_invalid_message`] for the polarity
/// contract — the safety-guard variant in `skills::ops_install`
/// (`{path} is not a directory — refusing to remove`) is
@@ -1891,7 +1891,7 @@ fn is_prompt_injection_blocked_message(lower: &str) -> bool {
/// didn't exist or pointed at a file (Sentry TAURI-RUST-4QH). Kept as a
/// classifier fixture since the wire shape may recur from other callers.
/// - `"hosted path is not a directory: <path>"` —
-/// [`crate::http_host::path_utils`] when an HTTP host config
+/// `openhuman_rpc::http_host::path_utils` when an HTTP host config
/// references a missing directory. Not yet observed in Sentry but
/// shares the same user-input failure mode; preempts a future ID.
///
diff --git a/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs b/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs
index 6f62591ada..ed5d34a119 100644
--- a/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs
+++ b/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs
@@ -272,7 +272,7 @@ fn classifies_vault_create_root_path_not_a_directory_as_filesystem_user_path_inv
#[test]
fn classifies_http_host_hosted_path_not_a_directory_as_filesystem_user_path_invalid() {
// Preempt the symmetric shape from
- // `openhuman::http_host::path_utils:23` —
+ // `openhuman_rpc::http_host::path_utils:23` —
// `"hosted path is not a directory: <path>"`. Not yet observed
// in Sentry but shares the same RPC validation polarity as
// vault_create's `root_path` check. Anchoring on
diff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rs
index bab61d1d97..c7c2efd653 100644
--- a/crates/openhuman-core/src/lib.rs
+++ b/crates/openhuman-core/src/lib.rs
@@ -11,8 +11,8 @@
//! alphabetical, with the `rpc` re-export sitting between `platform` and
//! `runtime` — keep new modules sorted the same way): `agent`, `api`,
//! `channels`, `config`, `core`, `cron`, `desktop`, `flows` (feature
-//! `flows`), `hooks`, `hosting` (feature `hosting`), `http_host`
-//! (feature `http-server`), `inference`, `integrations`, `json_schema`,
+//! `flows`), `hooks`, `hosting` (feature `hosting`),
+//! `inference`, `integrations`, `json_schema`,
//! `mcp`, `media` (feature `media`), `memory`, `modules` (feature
//! `modules`), `platform`, `runtime`, `sandbox`, `search`, `security`,
//! `skills`, `test_support` (feature `e2e-test-support`), `threads`, `tools`,
@@ -65,8 +65,6 @@ pub mod flows;
pub mod hooks;
#[cfg(feature = "hosting")]
pub mod hosting;
-#[cfg(feature = "http-server")]
-pub mod http_host;
pub mod inference;
pub mod integrations;
pub mod json_schema;