Skip to content

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

chore: reorder imports to place module docs before use statements

Steven Enamakel3700b1fe57ae
diff --git a/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs b/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs
index 1d9f7fad59..41508c6d46 100644
--- a/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs
+++ b/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs
@@ -1,8 +1,9 @@
-use crate::agent::messages::ConversationMessage;
//! Public getters and setters on [`Agent`]: tool registry views, config
//! snapshots, session identity, and the per-session tool-visibility filter
//! (which rebuilds the tool policy snapshot on every change).
+
+use crate::agent::messages::ConversationMessage;
use super::super::types::{Agent, AgentBuilder};
use crate::memory::Memory;
use crate::tools::agent_policy::ToolPolicyEngine;
diff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs
index 49d14f96eb..6e24e66bc4 100644
--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs
+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs
@@ -1,8 +1,9 @@
-use crate::agent::harness::subagent_runner::ops::checkpoint;
//! The sub-agent turn dispatch: driving one graph turn through the shared
//! tinyagents seam, building its context middleware, and folding a cap-hit
//! checkpoint summary back into the result.
+
+use crate::agent::harness::subagent_runner::ops::checkpoint;
use std::collections::HashSet;
use std::sync::Arc;
diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
index c9eb4a94a0..9e6b3bc7de 100644
--- a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs
@@ -1,6 +1,7 @@
-use crate::config::schema::load::env::parse_env_bool;
//! Env overrides for web search: SearXNG, Seltz, Tavily, and the search engine selection.
+
+use crate::config::schema::load::env::parse_env_bool;
use crate::config::schema::load::env::EnvLookup;
use crate::config::schema::Config;
diff --git a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs b/crates/openhuman-core/src/inference/provider/factory/chat_model.rs
index b27b288df7..1108d2977b 100644
--- a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/chat_model.rs
@@ -1,7 +1,8 @@
-use crate::inference::provider::factory::access_gates::verify_session_active;
//! One-shot `create_chat_model*` entry points, the readiness probe, the
//! default-temperature wrapper, and the unresolved-route error builder.
+
+use crate::inference::provider::factory::access_gates::verify_session_active;
use super::*;
/// Build an `Arc<dyn ChatModel>` for the given workload role.
diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rs
index f5f676fb91..c866aed336 100644
--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs
@@ -1,7 +1,8 @@
-use crate::inference::provider::fallback_diagnostics;
//! Role → configured provider-string resolution (`provider_for_role`) plus the
//! managed-credits bypass check and the `<model>[@<temp>]` suffix parser.
+
+use crate::inference::provider::fallback_diagnostics;
use super::*;
/// The provider route a role has **explicitly** configured, before any
diff --git a/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs b/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs
index d7e3a5b64d..8d10fa677a 100644
--- a/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs
+++ b/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs
@@ -1,6 +1,7 @@
-use crate::inference::provider::factory::access_gates::verify_session_active;
//! Subprocess-backed providers: the Claude Agent SDK and the Claude Code CLI.
+
+use crate::inference::provider::factory::access_gates::verify_session_active;
use super::*;
/// Build the Claude Agent SDK subprocess directly as a crate model. This is a
diff --git a/crates/openhuman-core/src/integrations/client_tests.rs b/crates/openhuman-core/src/integrations/client_tests.rs
index 656a12320a..e456115674 100644
--- a/crates/openhuman-core/src/integrations/client_tests.rs
+++ b/crates/openhuman-core/src/integrations/client_tests.rs
@@ -1,4 +1,3 @@
-use std::sync::Arc;
//! Tests for the shared integrations HTTP client.
//!
//! Focus: backend error body propagation. Pre-fix, non-2xx responses
@@ -8,6 +7,8 @@ use std::sync::Arc;
//! envelope's `error` field (or falls back to truncated raw text) and
//! the bail message includes it.
+
+use std::sync::Arc;
use super::*;
use axum::{
http::StatusCode,
diff --git a/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs b/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs
index 585c8ec45b..bbe7395d0e 100644
--- a/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs
+++ b/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs
@@ -1,4 +1,3 @@
-use ForgetOutcome;
//! Guarded `Entities`, `Graph`, `Diff`, `Goals`, `ToolMemory`, `Sources`,
//! `Maintenance`, and `People` — the knowledge-graph and bookkeeping
//! families.
@@ -6,6 +5,8 @@ use ForgetOutcome;
//! Split out of `families.rs`; see [`super::types`] for the shared decorator
//! scaffolding these `impl` blocks build on.
+
+use ForgetOutcome;
use crate::memory::api::capabilities::Capability;
use crate::memory::api::error::MemoryError;
use crate::memory::api::goals::GoalsDoc;
diff --git a/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs b/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs
index 9958289783..b7c6998f90 100644
--- a/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs
+++ b/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs
@@ -1,10 +1,11 @@
-use crate::memory::sources::sync::SourceScope;
//! Guarded `Retrieval`, `Episodic`, `Profile`, `SourceSync`, `Scoring`, and
//! `CodingSessions` — the read/query families.
//!
//! Split out of `families.rs`; see [`super::types`] for the shared decorator
//! scaffolding these `impl` blocks build on.
+
+use crate::memory::sources::sync::SourceScope;
use crate::memory::api::capabilities::Capability;
use crate::memory::api::error::MemoryError;
use crate::memory::api::provider::episodic::{ConversationSegment, EpisodicTurn};
diff --git a/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs b/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs
index 9808c04151..2757903f97 100644
--- a/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs
+++ b/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs
@@ -1,4 +1,3 @@
-use crate::memory::sources::sync::SourceScope;
//! Guarded `DocumentIngest`, `ConversationIngest`, `LearningIngest`,
//! `EventIngest`, `Answer`, and `Chunks` — the typed-ingestion round the
//! v1.13.7 contract release added, plus the sibling `Chunks` family wired
@@ -7,6 +6,8 @@ use crate::memory::sources::sync::SourceScope;
//! Split out of `families.rs`; see [`super::types`] for the shared decorator
//! scaffolding these `impl` blocks build on.
+
+use crate::memory::sources::sync::SourceScope;
use crate::memory::api::capabilities::Capability;
use crate::memory::api::chunks::Chunk;
use crate::memory::api::error::MemoryError;
diff --git a/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs b/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs
index 0966c8fb43..7df9bb11c9 100644
--- a/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs
+++ b/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs
@@ -1,4 +1,3 @@
-use crate::memory::sources::sync::SourceScope;
//! `RecordingProvider`'s `Episodic`, `Profile`, `Chunks`, `Retrieval`,
//! `People`, `Scoring`, `Answer`, and typed-ingestion (`DocumentIngest`,
//! `ConversationIngest`, `LearningIngest`, `EventIngest`) family
@@ -9,6 +8,8 @@ use crate::memory::sources::sync::SourceScope;
//! families live in [`super::provider_and_sync_impls`] and
//! [`super::core_and_docs_impls`].
+
+use crate::memory::sources::sync::SourceScope;
use crate::memory::api::chunks::Chunk;
use crate::memory::api::error::MemoryError;
use crate::memory::api::provider::chunks::{
diff --git a/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs b/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs
index 25e95b09fd..1410cd6fe0 100644
--- a/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs
+++ b/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs
@@ -1,6 +1,7 @@
-use crate::modules::memory::capabilities::capabilities_for;
//! Split off memory_tests.rs to stay under the repo's line-count gate.
//! Same module, same imports — see memory_tests.rs for what this covers.
+
+use crate::modules::memory::capabilities::capabilities_for;
use super::*;
/// The runtime-tree and flavour doors, driven against a **real** module.
diff --git a/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs b/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs
index 0f5f5e4287..7a62184789 100644
--- a/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs
+++ b/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs
@@ -1,7 +1,8 @@
-use crate::platform::socket::medulla::workflows;
//! The reconnect loop: [`ws_loop`], its failure-escalation logging, the
//! invalid-token retry decision, and the emit-queue drain used on shutdown.
+
+use crate::platform::socket::medulla::workflows;
use std::sync::Arc;
use parking_lot::Mutex;