From 8c5f78460639f6ac9c1c3de4365ebe1a7c081c8f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 22 Sep 2026 18:57:37 +0200 Subject: [PATCH] Fix stale test-support and test-door prose The test-support feature comment in huginn-mind/Cargo.toml named only store_path_for; it also gates open_with. The RS-1 grammar-door test's doc called open_with "the door open shares" -- open and open_with both call open_checked, which is the actual shared construction site. Co-Authored-By: Claude Sonnet 5 --- crates/huginn-mind/Cargo.toml | 9 +++++---- crates/huginn-mind/src/mind.rs | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) 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();