KB-73B0

RP Final Acceptance 03 — Registry Pin Design + Apply (LIVE)

2 min read Revision 1
registries-pivotregistry-pinpinning2026-06-03

03 — Registry Pin (Workstream B) — LIVE

Pinning is live (table + honest contract + ordering view), proven end-to-end, empty (owner inserts).

Before: no pin registry. pin_state was a hardcoded 'PIN_REGISTRY_MISSING' literal for every node.

Built (committed, additive, reversible)

Table registry_pin: pin_id (bigserial PK), node_code (text NOT NULL), scope (node|layer|pivot_row|substrate|warning, CHECK), pinned_by, pin_reason, priority (int default 100, lower sorts first), created_at, active (bool default true). Partial-unique registry_pin_active_uq(node_code,scope) WHERE active.

Honest pin_state: v_registries_pivot_node_contract.pin_state now reads registry → PINNED if an active pin exists else UNPINNED (all UNPINNED today). Other 25 cols byte-identical.

Companion v_registries_pivot_surface: base + pin_active, pin_priority, pin_reason, pin_scope, pin_sort_rank (active priority, NULLs last) + grouping. UI orders pinned-first: ORDER BY pin_sort_rank, display_order.

Scope: any node — layer/pivot-row/substrate/warning — by node_code + scope.

Proven (rehearsal, rolled back): inserting a pin for PIV-019 (priority 10) flipped base pin_state→PINNED and surfaced pin_active=t, pin_priority=10, pin_sort_rank=10; ROLLBACK removed it (table GONE). Committed table empty.

Pin a row: INSERT INTO registry_pin(node_code,scope,pinned_by,pin_reason,priority) VALUES ('PIV-019','node','owner','...',10); Unpin: UPDATE registry_pin SET active=false WHERE node_code='PIV-019' AND scope='node';

Why empty: choosing important rows is an owner decision (do not hardcode pins). Ships empty + ready.

Completion: pin LIVE, UI behavior defined.

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-final-acceptance-law-pin-ui-information-handoff-2026-06-03/03-registry-pin-design-or-apply.md