fn command_name(cmd: &Command) -> StringExpand description
Extracts the variant name (e.g. "NewPack") from a Command for telemetry.
Uses the Debug impl via a custom fmt::Write that captures only the leading
identifier, so we don’t pay the cost of formatting any inner data.