pub fn delete_target(
root: &AppRoot,
agent: &AgentId,
profile: &ProfileName,
) -> Result<Option<PathBuf>>Expand description
The profile directory delete would remove: <root>/profiles/<P>/<agent>, shown to the user
un-canonicalized (SP5a design §3). None when nothing is there. Error::ProfileReferenced is not
consulted here; blocking_references is the caller’s advisory or locked check.
Safety is structural (SP5a design §3): the path is always inside <root>/profiles by construction, and
every component below the root is checked so a symlink or a containment escape is refused before any
removal, whatever the caller plans to remove_dir_all.