Skip to content

Implement exact SchemaApply v7 recovery#348

Merged
aaltshuler merged 3 commits into
mainfrom
codex/schema-apply-v7-exact
Jul 12, 2026
Merged

Implement exact SchemaApply v7 recovery#348
aaltshuler merged 3 commits into
mainfrom
codex/schema-apply-v7-exact

Conversation

@aaltshuler

@aaltshuler aaltshuler commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • convert SchemaApply to the RFC-022 v7 exact-effects adapter with captured authority, fixed lineage, and initiating actor
  • add exact first-touch creation plus all-or-nothing roll-forward and compensation recovery
  • make schema promotion and read capture coherent across stale handles and read-only opens
  • update RFC-022, write-path, invariants, testing, and capability documentation

Recovery coverage

  • partial multi-table effects compensate exactly
  • owned first-touch targets are reclaimed while foreign winners are preserved
  • disjoint post-effect winners survive; buried same-table effects fail closed
  • metadata-only applies retain fixed outcome semantics
  • partial schema promotion resumes safely
  • stale handles capture the accepted catalog for query, export, graph index, and blob reads

Verification

  • cargo test --workspace --locked
  • cargo test -p omnigraph-engine --locked --features failpoints --test failpoints (111 passed)
  • scripts/check-agents-md.sh
  • git diff --check

Known boundary

The schema publication gate is process-local. Cross-process live-reader fencing remains a documented distributed-schema follow-up.


Open in Devin Review

Greptile Summary

This PR moves SchemaApply onto the exact v7 recovery path. The main changes are:

  • Captures fixed SchemaApply authority, lineage, actor, and exact table effects.
  • Adds roll-forward and rollback handling for confirmed effects and schema staging.
  • Tightens read-only schema coherence checks around committed but unpromoted applies.
  • Updates recovery tests and developer documentation for the new protocol.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
crates/omnigraph/src/db/manifest/recovery.rs Adds the v7 SchemaApply recovery protocol, exact outcome detection, and read-only coherence checks.
crates/omnigraph/src/db/omnigraph/schema_apply.rs Writes exact v7 SchemaApply sidecars and confirms table effects before publishing the manifest.
crates/omnigraph/src/db/schema_state.rs Separates legacy schema staging recovery from v7-owned staging promotion and discard.

Reviews (3): Last reviewed commit: "Admit completed legacy schema recovery r..." | Re-trigger Greptile

Context used:

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

Comment thread crates/omnigraph/src/db/manifest/recovery.rs Outdated
Comment thread crates/omnigraph/src/db/manifest/recovery.rs

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Comment thread crates/omnigraph/src/db/manifest/recovery.rs
@aaltshuler aaltshuler merged commit d7bbbba into main Jul 12, 2026
7 checks passed
@aaltshuler aaltshuler deleted the codex/schema-apply-v7-exact branch July 12, 2026 17:57
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