mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-15 01:55:13 +02:00
feat(cluster): embed schema migration previews in cluster plan
RFC-004 §D7's data-aware preview: for every schema update, plan opens the live graph read-only and embeds the engine's migration plan (supported flag + typed steps) in the change record; the human renderer prints the steps. Preview failures (unreachable graph, planner error) degrade to the digest diff with a schema_preview_unavailable warning — planning never blocks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b313075476
commit
ca63a9340b
2 changed files with 126 additions and 2 deletions
|
|
@ -804,6 +804,17 @@ fn print_cluster_plan_human(output: &PlanOutput) {
|
|||
);
|
||||
for change in &output.changes {
|
||||
println!(" {:?} {}", change.operation, change.resource);
|
||||
if let Some(migration) = &change.migration {
|
||||
if !migration.supported {
|
||||
println!(" migration UNSUPPORTED:");
|
||||
}
|
||||
for step in &migration.steps {
|
||||
println!(
|
||||
" {}",
|
||||
serde_json::to_string(step).unwrap_or_else(|_| format!("{step:?}"))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
if output.changes.is_empty() {
|
||||
println!(" no changes");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue