Skip to content

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

fix: clear PR lane validation failures

Steven Enamakel31ace356e3a8
diff --git a/app/scripts/e2e-run-all-flows.sh b/app/scripts/e2e-run-all-flows.sh
index 9df79e6bb9..d70291176c 100755
--- a/app/scripts/e2e-run-all-flows.sh
+++ b/app/scripts/e2e-run-all-flows.sh
@@ -245,6 +245,7 @@ if should_run_suite "navigation"; then
run "test/e2e/specs/command-palette.spec.ts" "command-palette" "navigation"
run "test/e2e/specs/channels-smoke.spec.ts" "channels-smoke" "navigation"
run "test/e2e/specs/guided-tour-gates.spec.ts" "guided-tour-gates" "navigation"
+ run "test/e2e/specs/chip-tabs-keyboard.spec.ts" "chip-tabs-keyboard" "navigation"
_mini_summary "navigation"
fi
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index e734888758..8cc233720b 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -833,22 +833,11 @@ impl OpenHumanSessionHost {
definitions,
security_policy: security,
post_turn_hooks: agent.post_turn_hooks.clone(),
- // The caller's own definition, when this session was built from
- // one rather than from a registry id. `AgentSpec::into_core`
- // re-stamps the built-in orchestrator under the caller's id, so
- // ids like `harness`/`alpha`/`beta` reach hosted resolution as
- // names no registry holds; without handing the definition over
- // here the lookup misses and the turn is rejected as a policy
- // failure before any provider call (#6404/#6392/#6393).
- session_definition: session_definition.clone().map(|mut definition| {
- // Explicit host attachments belong to this session's belt,
- // including when the definition uses a named tool scope.
- definition
- .extra_tools
- .extend(agent.permanent_tool_names.iter().cloned());
- definition.extra_tools.sort();
- definition.extra_tools.dedup();
- Arc::new(definition)
+ session_definition: session_definition.clone().map(|definition| {
+ Arc::new(super::host_tools::add_permanent_tools(
+ definition,
+ &agent.permanent_tool_names,
+ ))
}),
})
});
diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
index 2485b164db..79afe4e63c 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
@@ -196,6 +196,16 @@ pub(super) struct MergedHostTurnTools {
pub scope_additions: HashSet<String>,
}
+pub(super) fn add_permanent_tools(
+ mut definition: crate::agent::harness::definition::AgentDefinition,
+ permanent: &HashSet<String>,
+) -> crate::agent::harness::definition::AgentDefinition {
+ definition.extra_tools.extend(permanent.iter().cloned());
+ definition.extra_tools.sort();
+ definition.extra_tools.dedup();
+ definition
+}
+
pub(super) fn scope_def(
definition: Option<&crate::agent::harness::definition::AgentDefinition>,
host_tools: &MergedHostTurnTools,
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs
new file mode 100644
index 0000000000..2aa9f0bf26
--- /dev/null
+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs
@@ -0,0 +1,42 @@
+use super::*;
+
+// #6932: an offline local profile is a valid sign-in, but it cannot
+// authenticate managed inference.
+#[test]
+fn the_offline_local_session_cannot_authenticate_managed_inference() {
+ use crate::security::credentials::session_support::{
+ SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,
+ };
+
+ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))
+ .expect_err("a local session has no managed bearer");
+
+ assert_eq!(
+ error.to_string(),
+ LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE
+ );
+}
+
+#[test]
+fn the_refusal_does_not_read_as_an_expired_session() {
+ use crate::security::credentials::session_support::SessionTokenCheck;
+
+ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))
+ .expect_err("a local session has no managed bearer");
+
+ assert!(!crate::core::observability::is_session_expired_message(
+ &error.to_string()
+ ));
+}
+
+#[test]
+fn a_signed_in_session_still_authenticates_managed_inference() {
+ use crate::security::credentials::session_support::SessionTokenCheck;
+
+ let bearer = managed_bearer(SessionTokenCheck::Live(
+ "header.payload.signature".to_string(),
+ ))
+ .expect("a hosted session is the bearer");
+
+ assert_eq!(bearer, "header.payload.signature");
+}
diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
index 7b6a30fdba..8dc7f83471 100644
--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs
@@ -714,47 +714,5 @@ fn resolve_bearer_returns_token_for_exp_less_offline_session() {
#[path = "openhuman_backend_model_endpoint_tests.rs"]
mod endpoint_tests;
-// #6932: the offline local profile is a valid sign-in with no TinyHumans
-// account behind it. `classify_session_token` reports its `exp`-less token
-// `Live`, so managed inference used to send it, collect a backend
-// `401 "Invalid token"` and surface that as an expired session.
-#[test]
-fn the_offline_local_session_cannot_authenticate_managed_inference() {
- use crate::security::credentials::session_support::{
- SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,
- };
-
- let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))
- .expect_err("a local session has no managed bearer");
-
- assert_eq!(
- error.to_string(),
- LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE
- );
-}
-
-#[test]
-fn the_refusal_does_not_read_as_an_expired_session() {
- use crate::security::credentials::session_support::SessionTokenCheck;
-
- let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))
- .expect_err("a local session has no managed bearer");
-
- // The whole point of the fix: this must not reach the sign-out path that
- // the backend's 401 envelope used to trigger.
- assert!(!crate::core::observability::is_session_expired_message(
- &error.to_string()
- ));
-}
-
-#[test]
-fn a_signed_in_session_still_authenticates_managed_inference() {
- use crate::security::credentials::session_support::SessionTokenCheck;
-
- let bearer = managed_bearer(SessionTokenCheck::Live(
- "header.payload.signature".to_string(),
- ))
- .expect("a hosted session is the bearer");
-
- assert_eq!(bearer, "header.payload.signature");
-}
+#[path = "openhuman_backend_model_offline_session_tests.rs"]
+mod offline_session_tests;
diff --git a/scripts/__tests__/capture-first-inference.test.mjs b/scripts/__tests__/capture-first-inference.test.mjs
index a5dac7189a..113ea1a280 100644
--- a/scripts/__tests__/capture-first-inference.test.mjs
+++ b/scripts/__tests__/capture-first-inference.test.mjs
@@ -11,8 +11,11 @@ const HERE = dirname(fileURLToPath(import.meta.url));
const SCRIPT = resolve(HERE, "..", "debug", "capture-first-inference.mjs");
test("capture proxy --help prints usage without opening a listener", () => {
+ const helpEnv = { ...process.env };
+ delete helpEnv.FORCE_COLOR;
const result = spawnSync(process.execPath, [SCRIPT, "--help"], {
encoding: "utf8",
+ env: helpEnv,
});
assert.equal(result.status, 0, result.stderr);
assert.match(
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index c18f05b790..484a39f126 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -76,16 +76,21 @@ test("Rust coverage installs the mock backend dependencies without a frontend ar
areas: { ...NONE, rustCore: true },
env: profile === "ex63" ? EX63_ENV : {},
});
- const selected = selectLanes(plan, ["rust-cov"]);
+ const selected = selectLanes(
+ plan,
+ profile === "ex63" ? ["frontend", "rust-cov"] : ["rust-cov"],
+ );
assert.deepEqual(validatePlan(selected), []);
- const checks = selected.lanes[0].checks;
+ const checks = selected.lanes.flatMap((lane) => lane.checks);
const install = checks.find((c) => c.name === "pnpm-install");
assert.equal(install.when, true);
assert.equal(install.run, "pnpm install --frozen-lockfile");
assert.ok(
checks
.find((c) => c.name === "rust-core-coverage")
- .needs.includes("pnpm-install"),
+ .needs.includes(
+ profile === "ex63" ? "frontend:pnpm-install" : "pnpm-install",
+ ),
);
}
});
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index 1f4006a3f8..c80f7a55b7 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -43,7 +43,7 @@ const LEGACY_LIMIT_ENTRIES = [
// provider, security, memory, tool and prompt policy. Generic session
// state moved to tinyagents-runtime; this remaining composition is split in
// a follow-up without reintroducing an old harness/session exception.
- ["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 1003],
+ ["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 1001],
["crates/openhuman-core/src/agent/subagent_host/lifecycle.rs", 1309],
["crates/openhuman-core/src/agent/subagent_host/ops/runner.rs", 1152],
["crates/openhuman-core/src/tools/ops.rs", 1209],