Expand description
§4.5 auto-strategy selection and §4.5 fallback grouping-field pick.
auto_strategy inspects an axis field’s value distribution across
the items list and picks one of the §5.2 / §5.3 strategies:
Strategy::Exactfor enum-detected fields (cardinality ≤ 20 OR ≤ √N, top values cover ≥ 80%) and small-cardinality integer enums.Strategy::Prefixfor path-like strings (≥ 50% contain a path separator (/,::, or.) AND share at least one 2-segment prefix on that separator).Strategy::Topfor free-form strings as the catchall.Strategy::Bandsfor continuous numeric fields.
pick_grouping_field is used when the user supplied no --by and
no score was detected: scan all top-level string fields for a
“discriminating” choice, with a small canonical preference list
(data.path.text, path, file, module, kind, status, type).
Structs§
- Strategy
Detection Options - Tunable inputs for §4.5 strategy and grouping-field detection.
Functions§
- auto_
strategy - Auto-pick a strategy for a given axis field, given the items list.
- auto_
strategy_ with_ options - Auto-pick a strategy with caller-supplied heuristic thresholds.
- pick_
grouping_ field - Pick the most-discriminating string field when no explicit
--bywas given AND no score was detected (§4.5 fallback). - pick_
grouping_ field_ with_ options - Pick the fallback grouping field with caller-supplied preferences.