Skip to content

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

chore(core): remove unused imports and inline test module

Steven Enamakel5cf0d9aabb10
diff --git a/crates/openhuman-core/src/agent/learning/stability_detector.rs b/crates/openhuman-core/src/agent/learning/stability_detector.rs
index cf4f572f7d..aeeda7305d 100644
--- a/crates/openhuman-core/src/agent/learning/stability_detector.rs
+++ b/crates/openhuman-core/src/agent/learning/stability_detector.rs
@@ -31,11 +31,9 @@
//! rows by stability. Excess Active rows are demoted to Provisional. A cross-class
//! overflow pool holds up to `BUDGET_OVERFLOW` extra Provisional rows.
-use std::collections::{HashMap, HashSet};
+use std::collections::HashMap;
use std::path::{Path, PathBuf};
-use std::sync::{Arc, OnceLock, PoisonError};
-
-use fs2::FileExt;
+use std::sync::{Arc, PoisonError};
use crate::agent::learning::cache::FacetCache;
use crate::agent::learning::candidate::{self, CueFamily, FacetClass, LearningCandidate};
diff --git a/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs b/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
index 78d0b79c2b..5ddc187510 100644
--- a/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
+++ b/crates/openhuman-core/src/agent/learning/stability_detector_helpers.rs
@@ -9,11 +9,9 @@ use std::sync::{Arc, OnceLock, PoisonError};
use fs2::FileExt;
use crate::agent::learning::candidate::{self, CueFamily, FacetClass, LearningCandidate};
-use tinymemory_api::provider::{FacetState, FacetType, ProfileFacet, UserState};
+use tinymemory_api::provider::{FacetState, ProfileFacet, UserState};
-use super::{
- class_budget, half_life, stability, RebuildState, TAU_EVICT, TAU_PROMOTE, TAU_PROVISIONAL,
-};
+use super::{half_life, RebuildState, TAU_EVICT, TAU_PROMOTE, TAU_PROVISIONAL};
// ── The rebuild time ──────────────────────────────────────────────────────────
diff --git a/crates/openhuman-core/src/core/all_extensions_tests.rs b/crates/openhuman-core/src/core/all_extensions_tests.rs
index fe0a2414cc..c2599965f6 100644
--- a/crates/openhuman-core/src/core/all_extensions_tests.rs
+++ b/crates/openhuman-core/src/core/all_extensions_tests.rs
@@ -1,6 +1,5 @@
use serde_json::Map;
-use super::tests::schema;
use super::*;
// ── Controller extensions (crates above the core) ──────────────────────────
diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rs
index 8a4c1dc1ab..d462914e9e 100644
--- a/crates/openhuman-core/src/core/all_tests.rs
+++ b/crates/openhuman-core/src/core/all_tests.rs
@@ -3,7 +3,7 @@ use serde_json::Map;
use super::*;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
-pub(super) fn schema(
+fn schema(
namespace: &'static str,
function: &'static str,
inputs: Vec<FieldSchema>,
@@ -2598,3 +2598,6 @@ fn session_db_controllers_are_gone_and_run_ledger_survives() {
"the `session_db` namespace was removed and must not be registered, got: {namespaces:?}"
);
}
+
+#[path = "all_extensions_tests.rs"]
+mod extensions_tests;
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index 181623cca4..cf7bf58734 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -54,7 +54,7 @@ const LEGACY_LIMIT_ENTRIES = [
// `core/` was pruned from the line limit by name until these pins; its
// oversized files are pinned at the size they had when enforcement began.
["crates/openhuman-core/src/core/all.rs", 1840],
- ["crates/openhuman-core/src/core/all_tests.rs", 2709],
+ ["crates/openhuman-core/src/core/all_tests.rs", 2604],
["crates/openhuman-core/src/core/cli.rs", 803],
["crates/openhuman-core/src/core/events.rs", 2005],
["crates/openhuman-core/src/core/events_tests.rs", 1062],