Skip to main content
This page documents the platform schema for governance signals, the operator-actionable observation surface.

Tables

governance_signals

The single row per open observation. The platform writes via the governance_signal_emit RPC; consumers (REST handlers, dispatcher, UI, CLI) read directly.

Indexes

governance_notification_destinations

governance_escalation_rules

RLS

Service-role bypass model: the API boundary applies authz in TypeScript, and PostgREST goes through the service role. RLS is enabled on all three tables with no user-facing policies — this is fail-closed against accidental exposure (a future PostgREST exposure can’t leak governance signals across orgs). Future tightening to user-driven RLS UPDATE policies is a follow-up once a shared cross-type org_members.user_id (TEXT) ↔ auth.uid() (UUID) policy helper is in place.

RPCs

governance_signal_emit

SECURITY DEFINER + service-role only. INSERT ... ON CONFLICT DO UPDATE on the open-dedup index — repeated cron emissions of the same condition refresh detected_at, severity, agent_ids, detail, source_ref on the existing open row instead of creating a new one.

governance_signal_acknowledge / _resolve / _dismiss

Operator state transitions. Each captures acknowledged_actor_role and is SECURITY DEFINER so the API can invoke after applying RBAC in TypeScript.

REST endpoints

See api-reference/governance for full schemas. Quick map:

Webhook event taxonomy

Legacy aliases (kept 30 days post-cutover, removed at D+30):
  • sideband.coherence.fired → use governance.signal.fired filtered on payload.source == "sideband.coherence".
  • sideband.fault_line.fired → same.
  • sideband.fleet.fired → same.
  • drift.detected → use governance.signal.fired filtered on payload.source == "sideband.drift".
All HMAC-SHA256 signed (X-Mnemom-Signature: sha256=…) following the AAP webhook contract; subscribers should verify the signature before trusting the payload.

Naming convention discipline

source is closed, hierarchical, append-only — mirrors the pending_advisories.source taxonomy. Adding a new value requires:
  1. A schema amendment.
  2. Migration extending the CHECK constraint with ASSERT-after-DDL guard.
  3. Producer code (typically observer).
  4. Consumer-tolerance discipline (gateway / UI / CLI / SDKs).
  5. Posture-gating extension if the source is detector-driven.
Removing a source is forbidden. Deprecation is the only valid path.