08 — Registry Pin / Ghim (NEW, rehearsed shape, governance + pivots + UI)
title: 08 — Registry Pin / Ghim (Branch F) date: 2026-05-31 gate: RG5 + Đ32 (global pins). Rehearsed; commit DEFERRED.
08 — Registry Pin / Ghim (Branch F)
Re-check: still no pin/favorite/watch registry
pg_class scan (%pin%/%ghim%/%watch%) → only PG internals + kg_thresholds. Source scan of
nuxt-repo/web for localStorage pin/ghim/favorite/watch → 0 hits. So no client pin array exists
and no PG pin table exists → registry_pin is genuinely NEW.
Finalized shape (rehearsed GREEN; CHECK confirmed live)
CREATE TABLE registry_pin (
id serial PRIMARY KEY,
object_ref text NOT NULL, -- CAT code / pivot code / list / node key
object_kind text, -- 'registry'|'pivot'|'list'|'node'
surface_ref text NOT NULL, -- route/surface the pin shows on
pinned_by text NOT NULL,
scope text NOT NULL DEFAULT 'user',
scope_ref text, -- user/role/team id when scope<>global
reason text,
priority int NOT NULL DEFAULT 0,
active boolean NOT NULL DEFAULT true, -- soft-retire only (Đ0 Atom)
created_at timestamptz NOT NULL DEFAULT now(),
CONSTRAINT registry_pin_scope_ck CHECK (scope IN ('global','user','role','team'))
);
Rehearsal: 2 rows inserted (global CAT-023, user PIV-007); CHECK def confirmed; rolled back clean.
Scope & audit/governance
- scope ∈ global / user / role / team (
scope_refcarries the principal for non-global). - global pins require Đ32 approval (reuse
approval_requests+apr_approvals); user/role/team are self-service within scope. - Owner = an existing governance owner (Đ37); no new Mother. Soft-retire only (
active=false). - Audit:
pinned_by,created_at,reason,priority; births inmeta_catalog;pin.created/pin.removedregistered inevent_type_registrybefore emit (Đ45 register-before-emit; verified: these event types do NOT exist yet → NEW).
Pivots / counting for pinned rows
- PIV-321 (
registry_pinGROUP BYscope, count — native-DSL, rehearsed accept) → pinned-count is pivot-backed, never a client array length. Add a CAT row forregistry_pininmeta_catalog. - Pins are an overlay/sort key on existing lists — a pinned registry still counts once in
v_living_lists(no double-count).
UI contract
Nuxt reads registry_pin filtered by (scope='global') OR (scope_ref = current principal), ordered by
priority DESC — pins render as a column/section on /knowledge/registries-pivot. Pin/unpin = INSERT /
soft-retire via API → PG. No localStorage pin array (would be Đ28 hardcode; source confirms none today).
Gate
RG5 (+ Đ32 for global pins / pin births), macro M6. No persistent creation until approved; shape proven safe.