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 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-22 18:57:37 +02:00
commit 8c5f784606
2 changed files with 11 additions and 9 deletions

View file

@ -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 = []

View file

@ -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();