pattern_display_label

Function pattern_display_label 

Source
pub fn pattern_display_label(key: &str, members: &[String]) -> String
Expand description

Compute the operator-facing display label for a pattern-aware group, given the union of baseline+candidate member comms. For buckets with ≥ 2 distinct member names, runs grex over the sorted union to emit a regex that exactly matches the constituent thread names. For singleton or all-identical buckets, returns the join key unchanged so the rendered label equals what would have shown under literal grouping.

Empty members returns key — defensive against synthetic inputs; production builds populate members for every bucket.

When built without the pretty-labels feature, the grex regex-synthesis path is compiled out and the function returns the join key for every input — same bucket identity, just no rendered regex.