generated-scene: add scheduled monitoring runtime and helper lifecycle hardening

This commit is contained in:
木炎
2026-05-06 09:47:12 +08:00
parent 6cdd71b682
commit 8162118e6d
183 changed files with 103674 additions and 130 deletions

View File

@@ -321,6 +321,35 @@ fn sgclaw_settings_load_service_ws_listen_addr_from_browser_config() {
);
}
#[test]
fn sgclaw_settings_load_scheduled_monitoring_platform_service_base_from_browser_config() {
let root = std::env::temp_dir().join(format!("sgclaw-monitoring-platform-config-{}", Uuid::new_v4()));
fs::create_dir_all(&root).unwrap();
let config_path = root.join("sgclaw_config.json");
fs::write(
&config_path,
r#"{
"apiKey": "sk-runtime",
"baseUrl": "https://api.deepseek.com",
"model": "deepseek-chat",
"scheduledMonitoringPlatformServiceBaseUrl": "http://25.215.213.128:18080"
}"#,
)
.unwrap();
let settings = SgClawSettings::load(Some(config_path.as_path()))
.unwrap()
.expect("expected sgclaw settings from config file");
assert_eq!(
settings
.scheduled_monitoring_platform_service_base_url
.as_deref(),
Some("http://25.215.213.128:18080")
);
}
#[test]
fn browser_attached_config_uses_low_temperature_for_deterministic_execution() {
let settings = SgClawSettings::from_legacy_deepseek_fields(