delete_canonical_entity
Delete a canonical entity from the portfolio registry: the registry counterpart to `delete_node` (which only sees the active product). Retires an obsolete or twin canonical that would otherwise linger as a 0-instance orphan in `list_registry`. Safe by default: refuses while anything still references the canonical (instance_of edges, area/classification cross-edges, registry-internal edges) unless `cascade: true`, which deletes those references in the same atomic flush, severing the instances. When instances should SURVIVE under another canonical, use `merge_canonical_entities` instead: it repoints them. Preview the exact blast radius first with `dry_run: true`.
Arguments
canonical_idstringrequiredThe registry entity id (bare, or registry/{id}).
cascadebooleanoptionalAlso delete every edge referencing the canonical (default false). Without it, a referenced canonical is refused.
dry_runbooleanoptionalPreview the canonical + every referencing edge that deletion would remove; nothing is written (default false).
Returns
{ deleted, cascaded: { instance_of, cross_edges, registry_edges }, portfolio_file }— or { dry_run: true, would_delete, references }.