KB-40C0
RP Final Acceptance 04 — Auto-Grouping / Label Threshold Policy (LIVE)
2 min read Revision 1
registries-pivotauto-groupingthreshold2026-06-03
04 — Auto-Grouping / Label Threshold Policy (Workstream C) — LIVE
Deterministic, PG-driven; no ML; design-first.
Threshold table rp_grouping_policy: scope PK (default|pivot:<code>|species:<name>), threshold (default 50), grouping_dimension, note, active. Seed ('default',50). Resolution per node: pivot:<code> → species:<species> → default → 50.
Surface fields (v_registries_pivot_surface)
grouping_threshold (resolved); grouping_required = count_value > threshold; grouping_status ∈ NO_COUNT | NOT_REQUIRED | SATISFIED (required & has child) | NEEDS_GROUPING (required & no child → show "needs grouping", not flat list).
Live examples
PIV-007 DOT 309 has child → SATISFIED (25 groups/309). PIV-019 birth 1,132,025 no child → NEEDS_GROUPING. PIV-313 issues 207,940 → NEEDS_GROUPING. PIV-311 IU 219 → NEEDS_GROUPING. PIV-005 steps 70 → NEEDS_GROUPING. PIV-002 21 → NOT_REQUIRED. PIV-020 NULL → NO_COUNT.