refactor: keep generated scene runtime only in sgclaw

This commit is contained in:
木炎
2026-05-06 16:37:19 +08:00
parent 1d586dbe27
commit 548dfc4aa9
12 changed files with 67 additions and 7063 deletions

View File

@@ -0,0 +1,42 @@
use std::fs;
use std::path::Path;
fn repo_root() -> &'static Path {
Path::new(env!("CARGO_MANIFEST_DIR"))
}
#[test]
fn sgclaw_no_longer_ships_generated_scene_binary_entrypoint() {
let binary_entrypoint = repo_root().join("src/bin/sg_scene_generate.rs");
assert!(
!binary_entrypoint.exists(),
"sgclaw should not keep sg_scene_generate.rs once generated_scene_core owns generation"
);
}
#[test]
fn generated_scene_module_only_exports_runtime_adapter() {
let module_source =
fs::read_to_string(repo_root().join("src/generated_scene/mod.rs")).unwrap();
assert!(
module_source.contains("pub mod scheduled_monitoring_runtime;"),
"generated_scene runtime adapter must remain exported"
);
assert!(
!module_source.contains("pub mod analyzer;"),
"generated_scene analyzer export must move out of sgclaw"
);
assert!(
!module_source.contains("pub mod generator;"),
"generated_scene generator export must move out of sgclaw"
);
assert!(
!module_source.contains("pub mod ir;"),
"generated_scene ir export must move out of sgclaw"
);
assert!(
!module_source.contains("pub mod lessons;"),
"generated_scene lessons export must move out of sgclaw"
);
}