Skip to content

Implement RFC-028 stable schema identity#357

Merged
aaltshuler merged 13 commits into
mainfrom
codex/rfc028-stable-schema-identity
Jul 15, 2026
Merged

Implement RFC-028 stable schema identity#357
aaltshuler merged 13 commits into
mainfrom
codex/rfc028-stable-schema-identity

Conversation

@aaltshuler

@aaltshuler aaltshuler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • activate SchemaIR v2 with a durable graph identity domain plus stable type, property, and table-incarnation IDs
  • key manifest authority, OCC, recovery v9, branch merge, maintenance, repair, diffs, and runtime caches by immutable table identity
  • preserve identity and physical history across explicit renames while isolating drop/re-add lifetimes with new IDs and paths
  • add strict rename validation, historical type-alias binding, real v0.8.1 export/rebuild coverage, and aligned RFC/developer/user documentation

Architecture

This completes the broad RFC-028 slice without introducing a parallel identity registry. Accepted SchemaIR remains the identity authority, Lance remains the physical substrate, and the manifest remains the sole graph visibility boundary. Identity-less older formats are intentionally refused and upgraded through export/init/load rebuild.

Validation

  • cargo test --workspace --locked
  • cargo test -p omnigraph-engine --features failpoints --test failpoints --locked (119 passed)
  • cargo test -p omnigraph-compiler --locked (276 passed)
  • scripts/check-agents-md.sh
  • git diff --check
  • independent blocker review found no actionable issues

Greptile Summary

This PR adds stable schema identity across the compiler, manifest, recovery, and runtime paths. The main changes are:

  • SchemaIR v2 with graph-domain type, property, and table-incarnation IDs.
  • Manifest schema v5 keyed by immutable table identity instead of public aliases.
  • Identity-bearing recovery, schema apply, branch merge, maintenance, repair, diff, and cache paths.
  • Upgrade tests and documentation for the new storage identity model.

Confidence Score: 4/5

The stable identity paths need fixes before merging.

  • Branch merge can publish without fencing a candidate when alias lookup fails.
  • Interface renames can mint a new identity instead of preserving the accepted interface lifetime.
  • The manifest, recovery, cache, and staging changes otherwise use identity-keyed state consistently in the inspected paths.

crates/omnigraph/src/exec/merge.rs; crates/omnigraph-compiler/src/catalog/schema_ir.rs; crates/omnigraph-compiler/src/catalog/schema_shape.rs

Important Files Changed

Filename Overview
crates/omnigraph-compiler/src/catalog/schema_ir.rs Adds SchemaIR v2 identity allocation and evolution; interface rename binding is missing from the type-shape path.
crates/omnigraph-compiler/src/catalog/schema_shape.rs Adds canonical schema shapes with rename hints for nodes, edges, and properties.
crates/omnigraph/src/db/manifest/publisher.rs Moves manifest publication state and preconditions to identity-keyed table maps.
crates/omnigraph/src/db/manifest/recovery.rs Extends recovery sidecars, pins, effects, and validation with table identity.
crates/omnigraph/src/exec/merge.rs Adds identity checks to branch merge, but one expected-version bridge can drop unresolved candidates.
crates/omnigraph/src/exec/staging.rs Carries table identity through staged writes, recovery sidecars, and publish preconditions.
crates/omnigraph/src/runtime_cache.rs Adds table identity to graph index cache keys to split reincarnated table lifetimes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Source[.pg schema source] --> Shape[SchemaShape]
  Shape --> IR[SchemaIR v2 stable IDs]
  IR --> Catalog[Bound catalog]
  Catalog --> Manifest[Manifest v5 identity rows]
  Manifest --> Paths[Identity-derived Lance paths]
  Manifest --> Recovery[Recovery v9 identity pins]
  Manifest --> Runtime[Diffs, merge, repair, caches]
  Recovery --> Manifest
  Runtime --> Manifest
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
  Source[.pg schema source] --> Shape[SchemaShape]
  Shape --> IR[SchemaIR v2 stable IDs]
  IR --> Catalog[Bound catalog]
  Catalog --> Manifest[Manifest v5 identity rows]
  Manifest --> Paths[Identity-derived Lance paths]
  Manifest --> Recovery[Recovery v9 identity pins]
  Manifest --> Runtime[Diffs, merge, repair, caches]
  Recovery --> Manifest
  Runtime --> Manifest
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "docs: finalize stable identity contract" | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used:

  • Context used - AGENTS.md (source)
  • Context used - CLAUDE.md (source)

Comment thread crates/omnigraph/src/exec/merge.rs
Comment thread crates/omnigraph-compiler/src/catalog/schema_ir.rs
@aaltshuler aaltshuler merged commit 46b6d90 into main Jul 15, 2026
7 checks passed
@aaltshuler aaltshuler deleted the codex/rfc028-stable-schema-identity branch July 15, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant