docs(schema): document enum migration (widen/narrow/String↔enum)

Add an "Enum evolution" section to schema-language.md covering the four
supported shapes and their tiers, plus the unsupported cases (non-String
scalar change, interface enums, in-place variant rename). Record the new
ChangeEnumConstraint migration step. Add OG-MF-105 / OG-MF-107 to the
schema-lint code table and clarify OG-MF-106 as a genuine scalar change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
aaltshuler 2026-05-25 23:56:51 +01:00
parent cf18d9b600
commit 5e7b1aad78
2 changed files with 17 additions and 1 deletions

View file

@ -35,7 +35,9 @@ The chassis defines ten families. Today only DS and MF have emitted codes. The r
| `OG-DS-105` | Destructive | destructive | error | drop populated vector column (reserved) |
| `OG-MF-103` | Maybe-fail | validated | error | add required property without `@default` to populated type |
| `OG-MF-104` | Maybe-fail | validated | error | tighten nullable to non-nullable (reserved) |
| `OG-MF-106` | Maybe-fail | destructive | error | narrowing scalar type |
| `OG-MF-105` | Maybe-fail | validated | error | narrow enum value set (remove allowed variants) |
| `OG-MF-106` | Maybe-fail | destructive | error | narrowing scalar type (genuine scalar change only) |
| `OG-MF-107` | Maybe-fail | validated | error | constrain `String` to `enum` |
The full code catalog source of truth lives in `crates/omnigraph-compiler/src/lint/codes.rs`. CI-level invariants (uniqueness, format, family coverage) are unit-tested in the same module.