Skip to content

Commit ccc856f

Browse files
Remove the OpenHuman framing from core (#18 §C4)
Deletes `default_openhuman_dir()` and its one caller, `MemoryClient::new_local()`. `new_local` is the constructor that produced openhuman#5570: it resolved `~/.openhuman/workspace` from the home directory and never consulted the host's workspace scoping, so on any scoped host the write landed in a store nothing else reads -- it failed by succeeding. openhuman#5575 removed the last caller; the reviewer there noted no lint on the host side can hold this line (a scanner needle for a dead function fails the liveness check), so the deletion has to happen here. `default_openhuman_dir` existed for `new_local` alone. With it gone, core no longer knows the host's directory layout at all: every construction path takes an explicit workspace directory. What deliberately stays: - `global::init_default()` -- `#[cfg(test)]`, and its doc already warns it must never run in production. - The `"openhuman"` provider slug in the embedder resolution ladder -- host config vocabulary, not directory framing; removing it breaks existing configs for no containment gain. - `OPENHUMAN_OLLAMA_BASE_URL` in `TestEmbeddingHost` -- `#[cfg(test)]`. - Test fixture prose mentioning OpenHuman. `dirs` stays a normal dependency: `engine/persona.rs` still resolves the home directory for persona files. cargo test -p tinymemory-core: 804 passed, 0 failed cargo clippy -p tinymemory-core --all-targets: clean cargo fmt --all -- --check: clean
1 parent dd6fd33 commit ccc856f

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

‎core/src/lib.rs‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,6 @@ pub use tinymemory_api::host::{
7979
DEFAULT_MEMORY_SYNC_INTERVAL_SECS,
8080
};
8181

82-
/// The default OpenHuman root directory, `~/.openhuman`.
83-
///
84-
/// The host resolves this through `config::default_root_openhuman_dir`, which
85-
/// this crate cannot see. Reproduced here rather than added to the config seam
86-
/// because the two callers only need it as a last-resort fallback when no
87-
/// workspace was supplied.
88-
///
89-
/// # Errors
90-
///
91-
/// Returns `Err` when the home directory cannot be determined.
92-
pub fn default_openhuman_dir() -> Result<std::path::PathBuf, String> {
93-
dirs::home_dir()
94-
.ok_or_else(|| "Could not find home directory".to_string())
95-
.map(|home| home.join(".openhuman"))
96-
}
97-
9882
pub use ingestion::{
9983
ExtractedEntity, ExtractedRelation, ExtractionMode, IngestionJob, IngestionQueue,
10084
IngestionState, IngestionStatusSnapshot, MemoryIngestionConfig, MemoryIngestionRequest,

‎core/src/store/client.rs‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,6 @@ impl MemoryClient {
128128
}
129129
}
130130

131-
/// Create a new local memory client using the default `.openhuman` directory.
132-
///
133-
/// # Errors
134-
///
135-
/// Returns an error string if the home directory cannot be resolved or if
136-
/// initialization fails.
137-
pub fn new_local() -> Result<Self, String> {
138-
let workspace_dir = crate::default_openhuman_dir()
139-
.map_err(|e| e.to_string())?
140-
.join("workspace");
141-
Self::from_workspace_dir(workspace_dir)
142-
}
143-
144131
/// Create a new memory client from a specific workspace directory.
145132
///
146133
/// # Arguments

0 commit comments

Comments
 (0)