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.

DOT label/grouping registry: labels live in dot_tools.category, counted — 25 groups/309 (uncategorized 142, cấu_trúc_dữ_liệu 37, vận_hành 21, quản_lý_danh_mục 10, tích_hợp_ai 10, kiểm_tra_lỗi 9, pivot 8…). 309>50 → required & satisfied by PIV-104. A category exceeding threshold → recursive second-level group pivot.

Scaling: DOT 309→category (live); future 10k→category×subsystem; atom/molecule millions→never flat, group by composition×lane then source (PIV-019 already NEEDS_GROUPING so UI never renders 1.13M flat).

Completion: large-list behaviour explicit (SATISFIED/NEEDS_GROUPING/NOT_REQUIRED).

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-final-acceptance-law-pin-ui-information-handoff-2026-06-03/04-auto-grouping-label-threshold-policy.md