Expands repo group references (@group_name) in target repo lists.
@group_name
Handles nested groups, cycle detection, and error reporting.
@type error() :: {:unknown_group, String.t()} | {:cycle, [String.t()]} | {:invalid_group_value, String.t(), term()}
@spec expand([String.t()] | nil, map() | nil) :: {[String.t()] | nil, [error()]}
@spec expand!([String.t()] | nil, map() | nil) :: [String.t()] | nil
@spec format_error(error()) :: String.t()