Skip to content

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

fix: restore CI after merging upstream main

Steven Enamakelfa8d7c808267
diff --git a/.github/workflows/ci-lanes.yml b/.github/workflows/ci-lanes.yml
index c258aa952f..25c02859f2 100644
--- a/.github/workflows/ci-lanes.yml
+++ b/.github/workflows/ci-lanes.yml
@@ -71,12 +71,6 @@ jobs:
- name: Check out submodules
run: bash scripts/ci/checkout-submodules.sh
- - name: Install jq for release-script tests
- if: steps.filter.outputs.scripts == 'true'
- run: |
- apt-get update
- apt-get install -y --no-install-recommends jq python3-tomli
-
- name: Detect changed areas
id: filter
uses: dorny/paths-filter@v4
@@ -84,6 +78,12 @@ jobs:
filters: .github/ci-paths-filter.yml
base: ${{ inputs.base-ref }}
+ - name: Install jq for release-script tests
+ if: steps.filter.outputs.scripts == 'true'
+ run: |
+ apt-get update
+ apt-get install -y --no-install-recommends jq python3-tomli
+
# One step per lane: `Start lanes` launches every lane in the background
# (they still run in parallel); each `Lane:` step streams its own lane's
# log live and passes or fails on that lane alone; `Lane summary` waits
diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
index 60695639f4..1019c851b2 100644
--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
@@ -93,7 +93,7 @@ async fn engine_run_drives_trigger_to_http_request_through_the_real_seam() {
/// the untrusted-code floor.
#[cfg(target_os = "linux")]
#[tokio::test]
-async fn code_adapter_javascript_passthrough_round_trips_json() {
+async fn code_adapter_javascript_runs_when_isolated_and_refuses_when_isolation_is_unavailable() {
if std::process::Command::new("node")
.arg("--version")
.output()
@@ -112,11 +112,18 @@ async fn code_adapter_javascript_passthrough_round_trips_json() {
let runner = OpenHumanCode { config, security };
let input = json!([{ "json": { "n": 7 } }]);
- let result = runner
+ match runner
.run(CodeLanguage::JavaScript, "return input;", input.clone())
.await
- .expect("javascript passthrough should succeed when node is present");
- assert_eq!(result, input);
+ {
+ Ok(result) => assert_eq!(result, input),
+ Err(error) => assert!(
+ error
+ .to_string()
+ .contains("TinyBox native jail cannot meet the required isolation floor"),
+ "unexpected JavaScript code-runner failure: {error}"
+ ),
+ }
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/mcp/module_client.rs b/crates/openhuman-core/src/mcp/module_client.rs
index 9ed66a32e5..7ba7b72d37 100644
--- a/crates/openhuman-core/src/mcp/module_client.rs
+++ b/crates/openhuman-core/src/mcp/module_client.rs
@@ -443,12 +443,12 @@ impl McpConfiguredClient {
/// implementation operation.
pub(crate) async fn normalize_tool_arguments(
&self,
- arguments: Value,
+ arguments: Option<Value>,
) -> Result<Map<String, Value>, ModuleCallError> {
if SHUTTING_DOWN.load(Ordering::Acquire) {
return Err(ModuleCallError::Unavailable);
}
- self.port.normalize_tool_arguments(Some(arguments)).await
+ self.port.normalize_tool_arguments(arguments).await
}
/// Normalizes a model-supplied MCP identifier in TinyMCP.
diff --git a/crates/openhuman-core/src/mcp/registry/tools_tests.rs b/crates/openhuman-core/src/mcp/registry/tools_tests.rs
index 62d064f812..bdfe5f7e07 100644
--- a/crates/openhuman-core/src/mcp/registry/tools_tests.rs
+++ b/crates/openhuman-core/src/mcp/registry/tools_tests.rs
@@ -399,3 +399,27 @@ async fn tool_call_with_string_arguments_reaches_the_module_as_an_object() {
&[json!({ "city": "Paris" })]
);
}
+
+#[tokio::test]
+async fn tool_call_without_arguments_reaches_the_module_as_an_empty_object() {
+ let dir = tempfile::tempdir().expect("temp workspace");
+ let config = workspace_config(dir.path());
+ let port = ToolCallPort {
+ connected: true,
+ ..ToolCallPort::default()
+ };
+ let arguments = SharedArc::clone(&port.arguments);
+ crate::mcp::module_client::McpConfiguredClient::install_test_port(&config, Box::new(port))
+ .expect("test module port");
+
+ let result = McpRegistryToolCallTool::new(Arc::clone(&config))
+ .execute(json!({
+ "server_id": "srv-1",
+ "tool_name": "forecast"
+ }))
+ .await
+ .expect("call");
+ assert!(!result.is_error, "{}", result.text());
+
+ assert_eq!(arguments.lock().unwrap().as_slice(), &[json!({})]);
+}
diff --git a/crates/openhuman-core/src/modules/registry_tests.rs b/crates/openhuman-core/src/modules/registry_tests.rs
index 852bdb4bf3..d3d05f7f2f 100644
--- a/crates/openhuman-core/src/modules/registry_tests.rs
+++ b/crates/openhuman-core/src/modules/registry_tests.rs
@@ -20,6 +20,7 @@ fn tinycomputer_registry_matches_bus_contract_and_published_release() {
}
#[test]
+#[cfg(feature = "web3")]
fn tinywallet_registry_matches_the_verified_v019_release_manifest() {
let wallet = find("tinywallet").expect("compiled TinyWallet module");
assert_eq!(wallet.version, "0.19.0");
diff --git a/crates/openhuman-core/src/modules/wallet_host_tests.rs b/crates/openhuman-core/src/modules/wallet_host_tests.rs
index 760500172d..361a3c24a6 100644
--- a/crates/openhuman-core/src/modules/wallet_host_tests.rs
+++ b/crates/openhuman-core/src/modules/wallet_host_tests.rs
@@ -204,7 +204,7 @@ fn module_selected_rpc_endpoints_are_public_http_urls_without_credentials() {
}
#[test]
-fn native_solana_approval_accepts_the_module_signed_message_for_its_quote() {
+fn native_solana_approval_accepts_the_exact_typed_transfer_for_its_quote() {
let quote = PreparedTransaction {
quote_id: "solana-native-quote".into(),
kind: PreparedKind::NativeTransfer,
@@ -231,6 +231,53 @@ fn native_solana_approval_accepts_the_module_signed_message_for_its_quote() {
Some(quote.clone()),
None,
);
+ let request = AuthorizeNativeWalletExecutionRequest {
+ quote_id: quote.quote_id.clone(),
+ operation: "transfer".into(),
+ quote: quote.clone(),
+ intent: NativeWalletExecutionIntent::Transaction {
+ transaction: TransactionSpec::Solana {
+ from: quote.from_address.clone(),
+ to: quote.to_address.clone(),
+ lamports: 1000,
+ recent_blockhash: "recent-blockhash".into(),
+ },
+ },
+ };
+
+ assert!(native_approval_matches_request(&quote, &request));
+ assert!(!consume_approval(ApprovalKind::Native, &quote.quote_id));
+ drop(permit);
+}
+
+#[test]
+fn native_solana_approval_rejects_an_unverified_signed_message() {
+ let quote = PreparedTransaction {
+ quote_id: "solana-native-opaque-quote".into(),
+ kind: PreparedKind::NativeTransfer,
+ chain: WalletChain::Solana,
+ evm_network: None,
+ from_address: "sender".into(),
+ to_address: "recipient".into(),
+ asset_symbol: "SOL".into(),
+ amount_raw: "1000".into(),
+ amount_formatted: "0.000001".into(),
+ receive_symbol: None,
+ min_receive_raw: None,
+ calldata: None,
+ token_address: None,
+ estimated_fee_raw: "5000".into(),
+ status: PreparedStatus::AwaitingConfirmation,
+ created_at_ms: 1,
+ expires_at_ms: u64::MAX,
+ notes: vec![],
+ };
+ let permit = ApprovalPermit::new(
+ ApprovalKind::Native,
+ &quote.quote_id,
+ Some(quote.clone()),
+ None,
+ );
let request = AuthorizeNativeWalletExecutionRequest {
quote_id: quote.quote_id.clone(),
operation: "transfer".into(),
@@ -240,7 +287,7 @@ fn native_solana_approval_accepts_the_module_signed_message_for_its_quote() {
},
};
- assert!(native_approval_matches_request(&quote, &request));
+ assert!(!native_approval_matches_request(&quote, &request));
assert!(!consume_approval(ApprovalKind::Native, &quote.quote_id));
drop(permit);
}
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rs
index c6e5ec9745..9b09458807 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs
@@ -338,7 +338,6 @@ impl Tool for McpCallTool {
.normalize_identifier(&tool)
.await
.map_err(|error| anyhow::anyhow!(input_module_error_message(error)))?;
- let client_config = host::client_config(&self.config);
let prepared = client
.prepare_agent_tools(tinymcp_bus::PrepareAgentToolsRequest {
sources: vec![tinymcp_bus::McpToolSourceSpec {
@@ -372,7 +371,7 @@ impl Tool for McpCallTool {
.cloned()
.ok_or_else(|| anyhow::anyhow!("missing MCP tool arguments"))?;
let arguments = client
- .normalize_tool_arguments(arguments)
+ .normalize_tool_arguments(Some(arguments))
.await
.map_err(|error| anyhow::anyhow!(input_module_error_message(error)))?;
Ok(Some(call.with_arguments(Value::Object(arguments))))
@@ -432,7 +431,7 @@ impl Tool for McpCallTool {
}
};
let client_config = host::client_config(&self.config);
- let arguments = match client.normalize_tool_arguments(arguments).await {
+ let arguments = match client.normalize_tool_arguments(Some(arguments)).await {
Ok(arguments) => Value::Object(arguments),
Err(error) => {
let outcome = tinymcp_bus::McpCallOutcome::failed(
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
index 7caeff57b5..64fbf12b8b 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs
@@ -148,7 +148,7 @@ impl Tool for ModuleConfiguredMcpServerTool {
anyhow::bail!("MCP tool is no longer available or safe");
}
let arguments = client
- .normalize_tool_arguments(args)
+ .normalize_tool_arguments(Some(args))
.await
.map_err(|error| anyhow::anyhow!(super::mcp::input_module_error_message(error)))?;
let call: tinymcp_bus::ClassifiedStaticToolCall = client
diff --git a/crates/openhuman-core/src/web3/x402/stub_tests.rs b/crates/openhuman-core/src/web3/x402/stub_tests.rs
index 410e451665..6b5afb0e5c 100644
--- a/crates/openhuman-core/src/web3/x402/stub_tests.rs
+++ b/crates/openhuman-core/src/web3/x402/stub_tests.rs
@@ -1,12 +1,12 @@
use super::*;
-use crate::web3::x402::init_ledger;
-use std::path::Path;
-
#[test]
fn init_ledger_is_callable_noop() {
// Must not panic — the boot path calls this unconditionally (itself
// runtime-gated on `DomainGroup::Web3`) even in a slim build.
- init_ledger(Path::new("/tmp/openhuman-x402-stub-test"), "session-x");
+ crate::web3::x402::init_ledger(
+ std::path::Path::new("/tmp/openhuman-x402-stub-test"),
+ "session-x",
+ );
}
#[test]
diff --git a/crates/openhuman-embed/src/agent/mod.rs b/crates/openhuman-embed/src/agent/mod.rs
index 13ea47e015..c1b0bbd2e0 100644
--- a/crates/openhuman-embed/src/agent/mod.rs
+++ b/crates/openhuman-embed/src/agent/mod.rs
@@ -139,8 +139,8 @@ pub(crate) struct AgentInner {
impl AgentInner {
/// Releases what the core keeps for this agent: parked approvals are
- /// denied with `resolution`, its state slots and MCP host are dropped,
- /// and its context leaves the registry. Runs once.
+ /// denied with `resolution`, its state slots are cleared, and its context
+ /// leaves the registry. Runs once.
pub(crate) fn teardown(&self, resolution: &str) {
if !self.lifecycle.begin_teardown() {
return;
@@ -153,14 +153,6 @@ impl AgentInner {
);
self.deny_approvals(resolution);
self.ctx.agent_state().clear();
- if openhuman_core::mcp::host::take_agent_host(&self.config.workspace_dir, &self.id)
- .is_some()
- {
- log::debug!(
- "[embed][agent] teardown id={} evicted its MCP host",
- self.id
- );
- }
openhuman_core::core::runtime::AgentContextRegistry::deregister(&self.id, &self.ctx);
log::debug!("[embed][agent] teardown complete id={}", self.id);
}
diff --git a/scripts/__tests__/rust-e2e-enumeration.test.mjs b/scripts/__tests__/rust-e2e-enumeration.test.mjs
index c76c49daf2..b3b811c648 100644
--- a/scripts/__tests__/rust-e2e-enumeration.test.mjs
+++ b/scripts/__tests__/rust-e2e-enumeration.test.mjs
@@ -218,6 +218,19 @@ test("a failing case still fails the suite, and nothing after it runs", () => {
assert.deepEqual(res.runs, [runOf("scenario_a")]);
});
+test("mcp_registry_e2e runs serially because its module state is process-global", () => {
+ const source = fs.readFileSync(runner, "utf8");
+ const start = source.indexOf('if [ "$suite" = "mcp_registry_e2e" ]');
+ assert.ok(start >= 0, "MCP registry target has an explicit runner branch");
+ const end = source.indexOf(" if [ \"${#EXTRA_ARGS[@]}\" -gt 0 ]", start);
+ assert.ok(end > start, "MCP registry branch ends before the generic suite runner");
+ assert.match(
+ source.slice(start, end),
+ /--test-threads=1/,
+ "per-config module clients must not race through process-global state",
+ );
+});
+
test("the E2E runner builds and exports its pinned search module fixture", () => {
const source = fs.readFileSync(runner, "utf8");
const start = source.indexOf("# Module-backed Composio coverage");
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index 7550bdb7d0..ca8de84542 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -45,6 +45,12 @@ const ALL = Object.fromEntries(Object.keys(AREA_ENV).map((k) => [k, true]));
const NONE = Object.fromEntries(Object.keys(AREA_ENV).map((k) => [k, false]));
const EX63_ENV = { CI_SCRATCH_DIR: "/scratch" };
+test("EX63 installs script dependencies only after changed areas are detected", () => {
+ const detect = ciLanes.indexOf("- name: Detect changed areas");
+ const install = ciLanes.indexOf("- name: Install jq for release-script tests");
+ assert.ok(detect >= 0 && install > detect, "filter outputs must exist before they gate jq installation");
+});
+
const plans = () => [
buildPlan({ profile: "ex63", areas: ALL, env: EX63_ENV }),
buildPlan({ profile: "hosted", areas: ALL }),
diff --git a/scripts/test-rust-e2e.sh b/scripts/test-rust-e2e.sh
index b65f0455dc..8ab4738dc8 100755
--- a/scripts/test-rust-e2e.sh
+++ b/scripts/test-rust-e2e.sh
@@ -280,6 +280,15 @@ for suite in "${SUITES[@]}"; do
run_in_process_modules
continue
fi
+ if [ "$suite" = "mcp_registry_e2e" ]; then
+ # The registry tests open several process-global module clients across
+ # workspaces. Parallel libtest threads can race their module lifecycle.
+ echo "[rust-e2e] $CARGO_BIN test --manifest-path Cargo.toml --test $suite (serial)"
+ bash "$SCRIPT_DIR/ci-cancel-aware.sh" "$CARGO_BIN" test \
+ --manifest-path Cargo.toml --features "$PRODUCT_FEATURES" \
+ --test "$suite" -- --test-threads=1 ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"}
+ continue
+ fi
if [ "${#EXTRA_ARGS[@]}" -gt 0 ]; then
echo "[rust-e2e] $CARGO_BIN test --manifest-path Cargo.toml --test $suite -- ${EXTRA_ARGS[*]}"