refactor(cli): drop cluster init — no replacement scaffold

Andrew's call, and the right one by the repo's own lens: a minimal
cluster.yaml is five lines; a generator is a second copy of the schema to
keep in sync forever, emitting a file that is unusable until hand-edited
anyway (graphs: {} cannot apply or serve). Terraform has no config
scaffolder either. New users copy from the cluster quick-start; migrants
get a ready-to-review cluster.yaml from config migrate. RFC-008 stage 3
becomes purely subtractive.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
aaltshuler 2026-06-11 23:45:18 +03:00
parent 3adbc65af2
commit 5328c91341
5 changed files with 8 additions and 105 deletions

View file

@ -950,49 +950,3 @@ graphs:
assert!(!leaked.contains("phantom") && !leaked.contains("9999"), "{leaked}");
}
/// RFC-008 stage 3: `cluster init` scaffolds a minimal valid cluster.yaml
/// (the replacement for the retired omnigraph.yaml scaffold) and refuses
/// to overwrite.
#[test]
fn cluster_init_scaffolds_minimal_valid_config_and_refuses_overwrite() {
let temp = tempdir().unwrap();
let output = cli()
.arg("cluster")
.arg("init")
.arg("--config")
.arg(temp.path())
.arg("--name")
.arg("brain")
.output()
.unwrap();
assert!(output.status.success(), "{output:?}");
let text = fs::read_to_string(temp.path().join("cluster.yaml")).unwrap();
assert!(text.contains("version: 1") && text.contains("name: brain"), "{text}");
// The scaffold validates clean.
let output = cli()
.arg("cluster")
.arg("validate")
.arg("--config")
.arg(temp.path())
.arg("--json")
.output()
.unwrap();
assert!(output.status.success(), "{output:?}");
let payload: serde_json::Value = serde_json::from_slice(&output.stdout).unwrap();
assert_eq!(payload["ok"], true, "{payload}");
// Refuses a second run.
let output = cli()
.arg("cluster")
.arg("init")
.arg("--config")
.arg(temp.path())
.output()
.unwrap();
assert!(!output.status.success());
assert!(
String::from_utf8_lossy(&output.stderr).contains("refuses to overwrite"),
"{output:?}"
);
}