Skip to content

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

fix(test): run the pack-resolution guard only where it can be trusted\n\nThe `Rust Feature-Gate Smoke (gates off)` lane runs\n`cargo test --no-default-features --lib -- ... tools::ops::tests::`, i.e. the\nguard with ZERO features. `PACKS` is unconditional but most packs' tools are\ngated (`flows`, `mcp`, `skills`, `web3`, `documents`, `voice`), so there the\nassertion reported 55 of a pack's REAL tools as missing.\n\nThe previous attempt gated three packs by feature and was wrong in shape: it\nfixed `crypto`/`documents`/`audio`, then the same lane failed again on\n`workflows`, `integrations` and `skills`. A per-pack map has to be updated\nevery time a pack becomes gated, and forgetting shows up as a confusing red in\nan unrelated lane.\n\nA stale name is a property of the `PACKS` table, not of the build, so checking\nit in one fully-featured configuration is sufficient. The guard now returns\nearly unless every gated family is compiled in, and asserts in full otherwise.\nThe product lane has all six on, which is where a stale entry gets caught.\n\n`composio` stays exempt in every configuration: its tools register only after\nthe user signs in to Composio, which no unit test can satisfy.\n\nVerified with CI's exact command (`--no-default-features --lib --\ntools::ops::tests::`): 72 passed, 0 failed. Product features: passes.\nTeeth-check: with a fabricated `wallet_definitely_not_a_tool` added to the\ncrypto pack, the product-feature run fails naming exactly it — so the early\nreturn has not turned the guard into a no-op. Full `tools::` +\n`agent::registry`: 1904 passed, 0 failed.\n

M3gA-Mindb3f070541c9a
diff --git a/src/openhuman/tools/ops_tests_part_01_tests.rs b/src/openhuman/tools/ops_tests_part_01_tests.rs
index 77a9e90bd8..29eef60901 100644
--- a/src/openhuman/tools/ops_tests_part_01_tests.rs
+++ b/src/openhuman/tools/ops_tests_part_01_tests.rs
@@ -208,36 +208,38 @@ fn every_packed_tool_name_resolves_to_a_registered_tool() {
.filter_map(|d| d.delegate_name)
.collect();
- // Whether this build can say anything about a pack at all.
+ // `PACKS` is unconditional, but most packs' tools are behind Cargo features
+ // that are NOT in `default` — `flows`, `mcp`, `skills`, `web3`, `documents`,
+ // `voice`. Under a partial feature set "missing" means "compiled out", not
+ // "stale", and asserting there reports the pack's REAL tools as missing.
+ // That is what the `Rust Feature-Gate Smoke (gates off)` lane caught twice.
//
- // `PACKS` is unconditional but several packs' tools are behind Cargo
- // features that are NOT in `default` (`web3`, `documents`, `voice` — see
- // Cargo.toml `default = [...]`). Under a bare `cargo test` those tools are
- // never constructed, so iterating them would report every entry as missing
- // and fail for a reason that has nothing to do with a stale name.
+ // A stale name is a property of the `PACKS` table, not of the build, so
+ // checking it in one fully-featured configuration is sufficient. The product
+ // lane runs with all of these on, which is where a stale entry is caught.
//
- // This map is deliberately explicit rather than inferred from "zero tools
- // resolved": a pack whose every name is stale would also resolve zero, and
- // inferring would silently skip exactly the case this test exists to catch.
- // A new feature-gated pack therefore fails here until it is added below —
- // loud, which is the correct direction for a guard.
- fn pack_is_assertable(id: &str) -> bool {
- match id {
- // Registered only once the user is signed in to Composio
- // (`all_composio_agent_tools` returns an empty vec otherwise,
- // `integrations/composio/tools_part_03.rs:320-323`) — runtime auth
- // state a unit test cannot satisfy.
- "composio" => false,
- "crypto" => cfg!(feature = "web3"),
- "documents" => cfg!(feature = "documents"),
- "audio" => cfg!(feature = "voice"),
- _ => true,
- }
+ // Deliberately ONE condition rather than a per-pack feature map: a map has
+ // to be updated every time a pack becomes gated, and the failure mode of
+ // forgetting is a confusing red in an unrelated lane rather than a clear
+ // signal here.
+ if !cfg!(all(
+ feature = "flows",
+ feature = "mcp",
+ feature = "skills",
+ feature = "web3",
+ feature = "documents",
+ feature = "voice",
+ )) {
+ return;
}
let mut missing: Vec<String> = Vec::new();
for pack in crate::openhuman::tools::toolpacks::PACKS {
- if !pack_is_assertable(pack.id) {
+ // Registered only once the user is signed in to Composio
+ // (`all_composio_agent_tools` returns an empty vec otherwise,
+ // `integrations/composio/tools_part_03.rs:320-323`) — runtime auth
+ // state no unit test can satisfy, in any feature configuration.
+ if pack.id == "composio" {
continue;
}
for name in pack.tools {