Skip to main content

Module forget

Module forget 

Source
Expand description

cmd_forget migration. See cli::store for the design pattern.

§Round-2 F11 — global-scope safety rail

forget --pattern <p> and forget --tier <t> without --namespace delete across every namespace in the database. That has been the contract since v0.6.x, but it is a sharp edge: a typo in --pattern can wipe the operator’s working set with no confirmation.

v0.7.0 adds a --confirm-global flag. When --namespace is omitted AND (--pattern or --tier is set) the handler refuses to proceed unless --confirm-global is also present. forget --id is fine because the id is unambiguous; forget --namespace is fine because the blast radius is bounded.

Structs§

ForgetArgs

Functions§

cmd_forget
forget handler. Deletes (and archives) memories matching at least one of namespace/pattern/tier. CLI always passes archive=true.
global_scope_forget_error_message
Round-2 F11 — return the safety-rail error string when the operator invoked a global-scope forget without the --confirm-global opt-in. Pulled out so the integration test in tests/round2_f11_forget_safety.rs can assert on the exact wording without coupling to handler-internal control flow.
requires_global_confirmation
Round-2 F11 — predicate used by both the CLI handler and the integration test. Returns true when the args describe a global-scope delete (no --namespace, but --pattern or --tier set) and --confirm-global was NOT supplied.