feat(grid-agent): supervise grid sessions (#121)
This commit is contained in:
@@ -46,7 +46,7 @@ fn runtime_source_has_no_subprocess_or_native_abi_escape_hatch() {
|
||||
let mut files = Vec::with_capacity(8);
|
||||
collect_rust_files(&source, &mut files);
|
||||
assert!(
|
||||
files.len() <= 10,
|
||||
files.len() <= 12,
|
||||
"source-file count needs a reviewed bound update"
|
||||
);
|
||||
for path in files {
|
||||
@@ -86,6 +86,25 @@ fn world_backend_requires_the_opaque_policy_authorization() {
|
||||
assert!(!backend.contains("decision: PolicyDecision"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn live_session_adapter_reuses_only_the_native_network_manager_lifecycle() {
|
||||
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
let backend = fs::read_to_string(root.join("src/backend.rs")).expect("backend source");
|
||||
for required in [
|
||||
".native_default_login_params(",
|
||||
".native_login(",
|
||||
".native_subscribe_disconnected(",
|
||||
".native_subscribe_event_queue_running(",
|
||||
".native_logout_async(",
|
||||
] {
|
||||
assert!(
|
||||
backend.contains(required),
|
||||
"missing native lifecycle {required}"
|
||||
);
|
||||
}
|
||||
assert!(!backend.contains("reqwest"));
|
||||
}
|
||||
|
||||
fn collect_rust_files(directory: &Path, output: &mut Vec<PathBuf>) {
|
||||
for entry in fs::read_dir(directory).expect("read source directory") {
|
||||
let path = entry.expect("source entry").path();
|
||||
|
||||
Reference in New Issue
Block a user