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§
Functions§
- cmd_
forget forgethandler. Deletes (and archives) memories matching at least one of namespace/pattern/tier. CLI always passesarchive=true.- global_
scope_ forget_ error_ message - Round-2 F11 — return the safety-rail error string when the operator
invoked a global-scope
forgetwithout the--confirm-globalopt-in. Pulled out so the integration test intests/round2_f11_forget_safety.rscan 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
truewhen the args describe a global-scope delete (no--namespace, but--patternor--tierset) and--confirm-globalwas NOT supplied.