diff --git a/crates/relicario-cli/src/commands/get.rs b/crates/relicario-cli/src/commands/get.rs index 14cb595..c6de334 100644 --- a/crates/relicario-cli/src/commands/get.rs +++ b/crates/relicario-cli/src/commands/get.rs @@ -8,7 +8,6 @@ pub fn cmd_get(query: String, show: bool, copy: bool) -> Result<()> { let vault = crate::session::UnlockedVault::unlock_interactive()?; let manifest = vault.load_manifest()?; - crate::helpers::refresh_groups_cache(vault.root(), &manifest); let entry = super::resolve_query(&manifest, &query)?; let item = vault.load_item(&entry.id)?; diff --git a/crates/relicario-cli/src/commands/list.rs b/crates/relicario-cli/src/commands/list.rs index d192b5a..d4be596 100644 --- a/crates/relicario-cli/src/commands/list.rs +++ b/crates/relicario-cli/src/commands/list.rs @@ -12,7 +12,6 @@ pub fn cmd_list( let vault = crate::session::UnlockedVault::unlock_interactive()?; let manifest = vault.load_manifest()?; - crate::helpers::refresh_groups_cache(vault.root(), &manifest); let parsed_type: Option = match type_filter.as_deref() { None => None, diff --git a/crates/relicario-cli/src/helpers.rs b/crates/relicario-cli/src/helpers.rs index 4c58906..30a5fd4 100644 --- a/crates/relicario-cli/src/helpers.rs +++ b/crates/relicario-cli/src/helpers.rs @@ -142,7 +142,13 @@ pub fn groups_cache_path(vault_dir: &Path) -> PathBuf { /// /// Failures are silently swallowed — a missing cache is merely a UX degradation, /// not a correctness problem. -pub fn refresh_groups_cache(vault_dir: &Path, manifest: &relicario_core::Manifest) { +/// +/// Visibility note: this is `pub(crate)` so only `session::after_manifest_change` +/// can call it. The Plan B Phase 4 done-criterion requires every mutating +/// handler to funnel through the wrapper — exposing this helper to commands/ +/// would let a caller refresh the cache without updating the manifest, breaking +/// the invariant. +pub(crate) fn refresh_groups_cache(vault_dir: &Path, manifest: &relicario_core::Manifest) { let mut set = std::collections::BTreeSet::::new(); for entry in manifest.items.values() { if let Some(g) = entry.group.as_ref() {