Skip to content

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

chore: remove stale doc comments from workspace descriptor and identity field code

Steven Enamakel0650303e6487
diff --git a/src/openhuman/agent/harness/session/builder/factory.rs b/src/openhuman/agent/harness/session/builder/factory.rs
index af80e83ac1..6b3666fa3d 100644
--- a/src/openhuman/agent/harness/session/builder/factory.rs
+++ b/src/openhuman/agent/harness/session/builder/factory.rs
@@ -1479,19 +1479,6 @@ pub(crate) fn provider_role_for(agent_id: &str, default_model: Option<&str>) ->
#[path = "factory_provider_role_tests_tests.rs"]
mod provider_role_tests;
-/// Section D — derive the top-level chat turn's per-profile workspace
-/// descriptor. Shared by [`Agent::build_session_agent_inner`] and its unit tests
-/// so the two can never drift.
-///
-/// Returns a [`WorkspaceDescriptor`](tinyagents_harness::workspace::WorkspaceDescriptor)
-/// rooted at `<action_dir>/profiles/<id>` when `profile` opts into
-/// `dedicated_workspace` and its id passes validation (via
-/// [`dedicated_workspace_dir`](crate::openhuman::agent::profiles::dedicated_workspace_dir)),
-/// creating the dir as a side effect; `None` for the shared-workspace common case,
-/// for legacy ids that fail validation, and when the directory can't be created
-/// (all three fall back to the shared `action_dir` cwd rather than binding tools
-/// to a nonexistent dir). The returned descriptor propagates to subagents — see
-/// the deliberate-isolation note at the call site.
pub(crate) fn derive_profile_workspace_descriptor(
action_dir: &std::path::Path,
profile: Option<&crate::openhuman::agent::profiles::AgentProfile>,
@@ -1524,24 +1511,6 @@ pub(crate) fn derive_profile_workspace_descriptor(
)
}
-/// Section D, embedder variant — the turn's workspace descriptor from the
-/// per-turn root an embedder scoped via
-/// [`turn_workspace::with_workspace`](crate::openhuman::agent::turn_workspace::with_workspace).
-///
-/// Returns a [`WorkspaceDescriptor`](tinyagents_harness::workspace::WorkspaceDescriptor)
-/// rooted at the scoped directory so this turn's acting tools (shell, file,
-/// git) resolve their default cwd there instead of the shared `action_dir`.
-/// `None` — every caller that scoped nothing — leaves the shared-`action_dir`
-/// behaviour byte-identical.
-///
-/// The root is only honoured when it is an existing directory: binding every
-/// acting tool to a cwd that does not exist would turn a host's stale path into
-/// an unexplained failure in each individual tool, and the shared `action_dir`
-/// is the better fallback (same reasoning as the profile variant's
-/// create-failure path).
-///
-/// The policy id is a fixed label rather than the path: it is surfaced in tool
-/// logs, and a host's checkout path is not something to spread through them.
fn derive_turn_workspace_descriptor() -> Option<tinyagents_harness::workspace::WorkspaceDescriptor>
{
let root = crate::openhuman::agent::turn_workspace::current()?;
@@ -1575,13 +1544,6 @@ fn build_profile_security(
}
}
-/// Section D — per-profile dedicated-workspace descriptor seam.
-///
-/// These tests exercise the **production** [`derive_profile_workspace_descriptor`]
-/// directly (the same function the session builder calls), so they cannot drift
-/// from the real seam. They pin that the descriptor root points at
-/// `<action_dir>/profiles/<id>` for an opted-in profile, and that shared/legacy
-/// profiles produce no descriptor (so the shared `action_dir` cwd is preserved).
#[cfg(test)]
#[path = "factory_profile_workspace_descriptor_tests_tests.rs"]
mod profile_workspace_descriptor_tests;
diff --git a/src/openhuman/agent/prompts/sections.rs b/src/openhuman/agent/prompts/sections.rs
index 3b80071640..ac13d03349 100644
--- a/src/openhuman/agent/prompts/sections.rs
+++ b/src/openhuman/agent/prompts/sections.rs
@@ -738,11 +738,7 @@ impl PromptSection for UserIdentitySection {
}
}
-/// Collapse newlines and runs of whitespace in a user-identity field so
-/// it fits on a single markdown bullet without breaking the prompt
-/// structure. Values come from `auth_get_me` (server-controlled), but
-/// defence-in-depth: a name with embedded newlines could split the
-/// `- name:` bullet and reshape the `## User` block.
+/// Collapse whitespace in a user-identity field for a single markdown bullet.
fn sanitize_identity_field(s: &str) -> String {
s.chars()
.map(|c| if c == '\n' || c == '\r' { ' ' } else { c })