Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(tools): preserve hosted tool families when regenerating catalog fixture

Steven Enamakel7dbe0049d303
diff --git a/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs b/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
index 6dd104c0cb..7dd67f7756 100644
--- a/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
@@ -168,6 +168,16 @@ fn tool_catalog_matches_frontend_fixture() {
if std::env::var("UPDATE_TOOL_CATALOG").as_deref() == Ok("1") {
assert!(full_product_features_enabled(), "{REGENERATE_COMMAND}");
+ // Keep the hosted families the fixture already lists: this build
+ // cannot see them, so regenerating must not drop them.
+ let mut names = names;
+ if let Ok(previous) = std::fs::read_to_string(&path) {
+ if let Ok(previous) = serde_json::from_str::<Vec<String>>(&previous) {
+ names.extend(previous.into_iter().filter(|n| is_hosted_tool(n)));
+ names.sort();
+ names.dedup();
+ }
+ }
let json = serde_json::to_string_pretty(&names).expect("serialize tool catalog");
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent).expect("create fixture directory");