The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
Discover the client's parts instead of naming four of them\n\nThe label scan hard-coded `memory_part_01..04`. Split the client differently\ntomorrow and it keeps passing while reading fewer sources, finding fewer\nlabels, and checking less than its name claims — the failure mode a guard\nagainst silent drift should not itself have.\n\nRead the module directory instead, take every `memory_part_*.rs` that is not a\ntest file, and assert at least four turned up so a repartition that loses one\nfails loudly rather than narrowing the scan.\n
Shanue22a13d1a882
diff --git a/src/openhuman/modules/memory_tests_part_01_tests.rs b/src/openhuman/modules/memory_tests_part_01_tests.rsindex eb7a1601d6..148766982f 100644--- a/src/openhuman/modules/memory_tests_part_01_tests.rs+++ b/src/openhuman/modules/memory_tests_part_01_tests.rs@@ -151,12 +151,35 @@ fn no_mutating_operation_label_is_classified_as_a_read() {.expect("a valid pattern");let mut labels: Vec<String> = Vec::new();- for part in 1..=4 {- let path = format!(- "{}/src/openhuman/modules/memory_part_0{part}.rs",- env!("CARGO_MANIFEST_DIR")- );- let source = std::fs::read_to_string(&path).unwrap_or_else(|_| panic!("read {path}"));+ // Discovered, not enumerated. A hard-coded `memory_part_01..04` would keep+ // passing after the file is split differently — scanning fewer sources,+ // finding fewer labels, and quietly checking less than it claims to.+ let modules_dir = format!("{}/src/openhuman/modules", env!("CARGO_MANIFEST_DIR"));+ let mut parts: Vec<std::path::PathBuf> = std::fs::read_dir(&modules_dir)+ .unwrap_or_else(|error| panic!("read {modules_dir}: {error}"))+ .filter_map(Result::ok)+ .map(|entry| entry.path())+ .filter(|path| {+ path.file_name()+ .and_then(|name| name.to_str())+ .is_some_and(|name| {+ name.starts_with("memory_part_")+ && name.ends_with(".rs")+ && !name.contains("_tests")+ })+ })+ .collect();+ parts.sort();+ assert!(+ parts.len() >= 4,+ "expected the memory client to be split across at least four parts, found {:?} — if the \+ split changed, this scan is looking in the wrong place",+ parts+ );++ for path in &parts {+ let source = std::fs::read_to_string(path)+ .unwrap_or_else(|error| panic!("read {}: {error}", path.display()));for captured in call_site.captures_iter(&source) {labels.push(captured[1].to_string());}