Omnigraph
Schema

Schema Lint

Stable diagnostic codes emitted by omnigraph schema plan.

omnigraph schema plan emits code-tagged diagnostics for every change it rejects. Codes have the form OG-XXX-NNN and identify the rule (not the human-readable message), so CI suppressions and severity overrides can pin to stable identifiers.

[OG-DS-104] removing property 'Person.age' is not supported

The catalog is small in v0. Five rules across two families today. The chassis reserves prefixes for the remaining families (constraint deletion, backward-incompat, naming, vector, etc.); those will fill in over time without renumbering existing codes.

Families

PrefixFamilyStatus
DSDestructive (data-loss)shipped
MFMaybe-fail / data-dependentshipped
CDConstraint deletion (relaxation warning)reserved
BCBackward-incompatible (rename)implicit in @rename_from; will be codified
NMNaming conventionsreserved
OWOwnership (per-resource Cedar)reserved
NLNon-linear (branch-merge divergence)reserved
VEVector / embeddingreserved
EDEdge / graph topologyreserved
LKLock duration / costreserved

Catalog (v0)

CodeFamilyTierDefault severityMeaning
OG-DS-101Destructivedestructiveerrordrop graph type with rows (reserved; not yet emitted)
OG-DS-102Destructivedestructiveerrordrop node type with rows
OG-DS-103Destructivedestructiveerrordrop edge type with rows
OG-DS-104Destructivedestructiveerrordrop property with rows
OG-DS-105Destructivedestructiveerrordrop populated vector column (reserved)
OG-MF-103Maybe-failvalidatederroradd required property without @default to populated type
OG-MF-104Maybe-failvalidatederrortighten nullable to non-nullable (reserved)
OG-MF-106Maybe-faildestructiveerrornarrowing scalar type

destructive rules forbid actions that throw away data. validated maybe-fail rules forbid actions whose success depends on the data already in the graph, so they need an explicit allowance or a migration script.

Workflow

  1. Author your candidate schema in a new .pg file.
  2. Run omnigraph schema plan ./graph.omni --schema ./next.pg to preview.
  3. If diagnostics fire, treat them as a decision point:
    • Adjust the schema to keep history (the safest path).
    • Or, when the data loss is intentional, rerun schema apply with --allow-data-loss to promote soft drops to hard drops.
  4. omnigraph schema apply runs the migration. It takes a per-branch schema-apply lock so the migration sees a stable snapshot.

Suppression and severity (planned)

Two pieces of the chassis are designed but not shipped yet:

  • Severity configuration in omnigraph.yaml (lint: { OG-DS-103: error }).
  • In-schema suppression via @allow(OG-XXX-NNN, "rationale") annotations.

Until those land, treat every code in the catalog as error and adjust the schema (or pass --allow-data-loss deliberately) rather than suppressing.

On this page