KB-2587
11 — No-Hardcode & Pivot-Only Compliance Matrix
4 min read Revision 1
registries-pivotno-hardcodepivot-onlycompliancedieu26dieu28forbidden-matrix2026-05-31
title: 11 — No-Hardcode & Pivot-Only Compliance + Forbidden Matrix date: 2026-05-31
11 — No-Hardcode & Pivot-Only Compliance
No-hardcode audit of THIS run's artifacts
| artifact | hardcode check | verdict |
|---|---|---|
v_registry_leaf_set |
keys on composition_level/entity_type only; no CAT list |
✅ |
v_count_integrity etc. |
scalar-EXISTS on registry_collection=source_object; no literal counts |
✅ |
drift_classification |
derived from source_model + sign; no per-row literals |
✅ |
| PIV-500/301 | view-backed (v_count_rollup_src); category set is data, not code |
✅ |
| PIV-311 | groups by label_code (data); 23 emerges from data, not hardcoded |
✅ |
| parent_code graph | 13 edges are a data overlay (UPDATE), not frontend logic | ✅ |
| display_policy | ceiling 50 = a CHECK + table row (config), not an if count>50 in code |
✅ |
| registry_pin | scope set is a CHECK constraint (data), pins are rows | ✅ |
No count, category, species, layer, label, pin, or threshold is hardcoded in any artifact produced this run. Every count is pivot-backed or explicitly PIVOT_MISSING.
Pivot-only counting (Đ26)
- Grand total = PIV-500 (view-backed grouped-sum), proven by real
pivot_query(). - Orphan = PIV-301; drift = PIV-303; phantom-candidate = PIV-302; labels = PIV-311.
- 139 leaves are honestly PIVOT_MISSING in
v_living_lists(not faked). pivot_count/pivot_queryis the ONLY count path; the views never invent numbers.
Legacy Đ28 violations (NOT fixed here — Macro 2.6/3.2, recorded for cutover)
/api/registry/health totalGap = reduce(+Math.abs(gap)); index.vue hardcoded
CAT-017 + orphan_count: hd.totalGap; [entityType].ts / raw-counts.ts reduce math.
These remain on the legacy page; convergence retires them. GOOD pattern = pivot-query.get.ts.
Forbidden-compliance matrix (§12 of the mission)
| forbidden | status |
|---|---|
| COMMIT without valid approval | ✅ none — COMMIT_FORBIDDEN_NO_APPROVAL |
| self-approval / fake approval | ✅ none — agent recorded, never signed; machine approvals classified invalid |
| persistent PG mutation | ✅ none — entry == exit, all BEGIN..ROLLBACK |
| Directus mutation | ✅ none |
| Qdrant / vector write | ✅ none (KB uploads are documents, not vector writes by me) |
| production Nuxt change | ✅ none |
| route cutover | ✅ none |
| legacy retirement | ✅ none |
| frontend business logic | ✅ none introduced |
| hardcoded counts/categories/species/layers/labels/pins/thresholds | ✅ none |
| event/job execution | ✅ none |
| notification emit | ✅ none |
| row-by-row pivot insert (repeated refresh) | ✅ none — bundle was ONE statement (INSERT 0 5) |
| leaving idle transactions | ✅ none — idle_in_tx = 0 after every section + final sweep |
Laws honored
Đ20 (design-before-impl: design exists, commit gated), Đ26 (pivot-only count), Đ28 (Nuxt boundary / no frontend count logic), Đ30 (reversible, doc 10), Đ31 (audit: full evidence doc 09), Đ32 (no self-approval, doc 02), Đ35/36/37 (DOT/collection/gov unaffected), Đ45 (event/queue not fired).