diff --git a/crates/huginn-mind/Cargo.toml b/crates/huginn-mind/Cargo.toml index 7435696..c8156a3 100644 --- a/crates/huginn-mind/Cargo.toml +++ b/crates/huginn-mind/Cargo.toml @@ -24,10 +24,11 @@ sha2 = "0.10" serde_json = "1" tempfile = "3" -# `test-support` exposes `Mind::store_path_for`, a grammar-checked path -# accessor tests in other crates need to reach a raw store directly. It buys -# no runtime surface: gated `#[cfg(any(test, feature = "test-support"))]`, so -# it compiles only under `cargo test` in this crate or when a dependent's own +# `test-support` exposes `Mind::store_path_for` and `Mind::open_with`, a +# grammar-checked path accessor and the fail-closed open door, for tests in +# other crates that need to reach a raw store directly. It buys no runtime +# surface: gated `#[cfg(any(test, feature = "test-support"))]`, so it +# compiles only under `cargo test` in this crate or when a dependent's own # dev-dependencies enable it (see huginn-daemon/Cargo.toml). [features] test-support = [] diff --git a/crates/huginn-mind/src/mind.rs b/crates/huginn-mind/src/mind.rs index cefe4d5..5f644ba 100644 --- a/crates/huginn-mind/src/mind.rs +++ b/crates/huginn-mind/src/mind.rs @@ -703,11 +703,12 @@ mod tests { assert!(!inner.join("minds").exists(), "no store was created under the state root either"); } - /// `open_with` is the door `open` shares with every store already in - /// hand (planted directly, or opened by a test through `store_path_for`), - /// so it must run `require_grammatical_slug` too, not only `open`'s own - /// path-joining caller. A store need not hold anything for this to - /// refuse: the declared name is checked before the store is even pulled. + /// `open_with` calls `open_checked`, the one construction site `open` + /// shares with every store already in hand (planted directly, or opened + /// by a test through `store_path_for`), so it must run + /// `require_grammatical_slug` too, not only `open`'s own path-joining + /// caller. A store need not hold anything for this to refuse: the + /// declared name is checked before the store is even pulled. #[test] fn open_with_refuses_a_declared_instance_outside_the_grammar() { let store = MemoryStore::new();