KB-4972
04 — /knowledge/pivot Audit (VERIFIED)
2 min read Revision 1
architecturepivotnuxtpage-auditdieu26dieu28render-shell2026-05-30verified
title: 04 — /knowledge/pivot Audit (VERIFIED) date: 2026-05-30
04 — /knowledge/pivot Audit (VERIFIED)
Route & sources
pages/knowledge/pivot.vue (SSR), reads PG grouping views / pivot_count() / pivot_results.
Render (live) — table Lớp/Phân loại/Tổng cá thể/Số loài/Mồ côi
atom 1,666,499/21/0 · molecule 774/11/0 · compound 423/8/0 · material/product/building 0/0/0 · meta(loài) 42/42/1 · DOT 307/0/140 · Collections 168/0/20.
VERIFIED view definitions
v_pivot_by_level=SELECT composition_level, count(*), sum(record_count) FROM meta_catalog WHERE status='active' AND registry_collection IS NOT NULL GROUP BY composition_level.v_pivot_species_by_level=entity_species GROUP BY composition_level.v_pivot_dot_by_category=dot_tools WHERE status='published' GROUP BY category(23).v_registry_counts_compat=pivot_definitions JOIN LATERAL pivot_count(code) WHERE is_active→ pivot-backed per-list counts; reusable as a count source (correction vs earlier "compat shim" framing).
Verdict: MOSTLY COMPLIANT (Điều 26/28)
Composition-level rows are exemplary render-shell-over-PG. Finding H4: rows 8–9 (DOT, Collections) read meta_catalog stored counts; DOT 307 is stale vs pivot 309 → re-point to pivot_count('PIV-007')/pivot_count('PIV-009').
Gaps vs target
Flat single table; no drill-down, no substrate links, no recursive layer generation; only composition levels +2 meta rows.
Reusable
The reference render-shell pattern (data-driven from PG rows, zero hardcoded counts). Extend with recursive drill (doc 07/09); fix H4.