KB-735C

08 — Registry Pin / Ghim (NEW, rehearsed shape, governance + pivots + UI)

3 min read Revision 1
registries-pivotregistry_pinghimscopegovernancePIV-321rehearsedgated-RG52026-05-31

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_ref carries 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 in meta_catalog; pin.created/pin.removed registered in event_type_registry before emit (Đ45 register-before-emit; verified: these event types do NOT exist yet → NEW).

Pivots / counting for pinned rows

  • PIV-321 (registry_pin GROUP BY scope, count — native-DSL, rehearsed accept) → pinned-count is pivot-backed, never a client array length. Add a CAT row for registry_pin in meta_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.

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-ratify-foundation-commit-preview-campaign-2026-05-31/08-registry-pin-ghim.md