Skip to content

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

chore(tests): add raw coverage e2e test files for automation, composio, dispatch, and notification

Steven Enamakel01f6a375a237
diff --git a/tests/raw_coverage/automation_scheduling_e2e.rs b/tests/raw_coverage/automation_scheduling_e2e.rs
index 70dbc8bcf6..f27b8ad31d 100644
--- a/tests/raw_coverage/automation_scheduling_e2e.rs
+++ b/tests/raw_coverage/automation_scheduling_e2e.rs
@@ -852,7 +852,6 @@ async fn harness_init_run_completes_offline_and_force_bypasses_the_probes() {
let step_ids: Vec<&str> = steps.iter().map(|step| str_at(step, "/id")).collect();
for expected in [
"python_runtime",
- "spacy",
"kompress",
"runtime_python_server",
] {
diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rs
index 82f93074eb..ceaf978e7f 100644
--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs
@@ -209,14 +209,9 @@ async fn composio_controller_registry_and_scope_handlers_cover_validation_edges(
.unwrap_or_else(|poisoned| poisoned.into_inner());
crate::tinyhumans_boot::boot();
// The controller loads config through the process workspace resolver. Pin
- // this test to a null memory driver so its fail-closed assertion does not
- // depend on a developer's local config or attempt to load TinyMemory.
+ // the test to an isolated workspace so the scope store does not depend on
+ // a developer's local config.
let workspace = tempdir().expect("isolated workspace");
- std::fs::write(
- workspace.path().join("config.toml"),
- "[subsystems.memory]\ndriver = \"null\"\n",
- )
- .expect("write isolated memory config");
let _workspace = WorkspaceEnvGuard::set(workspace.path());
let schemas = all_composio_controller_schemas();
let registered = all_composio_registered_controllers();
@@ -256,26 +251,28 @@ async fn composio_controller_registry_and_scope_handlers_cover_validation_edges(
.await
.expect_err("write must be bool");
assert!(invalid_write.contains("invalid 'write'"));
- // The storage half must refuse rather than report a write it did not do.
- //
- // This transport-only test does not configure a memory module, so the
- // workspace binds the null driver. Pin the refusal at the driver's family
- // boundary instead of claiming to reach the module's `kv_put` path.
- let memory_missing = composio_call(
+ // The storage half persists to `<workspace>/integrations/composio_user_scopes.json`
+ // (no memory driver involved) and reads back through `get_user_scopes`.
+ let saved = composio_call(
set_scopes,
- json!({ "toolkit": "gmail", "read": true, "write": true, "admin": false }),
+ json!({ "toolkit": " GitHub ", "read": true, "write": false, "admin": true }),
)
.await
- .expect_err("the backing write must fail when the bound driver has no Graph family");
- assert!(
- memory_missing.starts_with("[composio][scopes] "),
- "the refusal must be tagged as the scopes storage half's, so a failure here \
- points at this handler rather than at whatever it called; got: {memory_missing}"
- );
+ .expect("set_user_scopes persists to the workspace file store");
+ assert_eq!(saved.pointer("/admin"), Some(&json!(true)));
+ assert_eq!(saved.pointer("/write"), Some(&json!(false)));
+ let reread = composio_call(get_scopes, json!({ "toolkit": "github" }))
+ .await
+ .expect("get_user_scopes reads the stored pref");
+ assert_eq!(reread.pointer("/admin"), Some(&json!(true)));
+ assert_eq!(reread.pointer("/write"), Some(&json!(false)));
assert!(
- memory_missing.contains("does not serve Graph"),
- "set_user_scopes must fail CLOSED when the bound driver cannot store scopes; \
- got: {memory_missing}"
+ workspace
+ .path()
+ .join("integrations")
+ .join("composio_user_scopes.json")
+ .exists(),
+ "the pref lands in the workspace file store"
);
}
diff --git a/tests/raw_coverage/dispatch_param_validation_e2e.rs b/tests/raw_coverage/dispatch_param_validation_e2e.rs
index 5440775759..cb4ea09d13 100644
--- a/tests/raw_coverage/dispatch_param_validation_e2e.rs
+++ b/tests/raw_coverage/dispatch_param_validation_e2e.rs
@@ -63,13 +63,13 @@ async fn missing_required_param_is_refused_with_the_schema_comment() {
async fn unknown_param_is_refused_by_the_gate_alone() {
let err = dispatch(
state(),
- "openhuman.memory_goals_list",
+ "openhuman.memory_engines_list",
json!({ "nonsense_param": 1 }),
)
.await
.expect_err("unknown params are refused");
- assert_eq!(err, "unknown param 'nonsense_param' for memory_goals.list");
+ assert_eq!(err, "unknown param 'nonsense_param' for memory.engines_list");
}
/// Declared types are enforced at the same gate, so a handler's own
@@ -97,24 +97,27 @@ async fn mistyped_param_is_refused_with_the_declared_type() {
/// directory call controllers.
#[tokio::test]
async fn handler_refusal_differs_from_the_dispatcher_refusal_for_an_absent_param() {
- let dispatched = dispatch(state(), "openhuman.learning_get_facet", json!({}))
+ let dispatched = dispatch(state(), "openhuman.memory_recall", json!({}))
.await
- .expect_err("`class` is required");
+ .expect_err("`question` is required");
assert!(
- dispatched.starts_with("missing required param 'class': "),
+ dispatched.starts_with("missing required param 'question': "),
"got: {dispatched}"
);
let controllers = all_registered_controllers();
let controller = controllers
.iter()
- .find(|controller| rpc_method_name(&controller.schema) == "openhuman.learning_get_facet")
- .expect("learning_get_facet is registered unconditionally");
+ .find(|controller| rpc_method_name(&controller.schema) == "openhuman.memory_recall")
+ .expect("memory_recall is registered unconditionally");
let direct = (controller.handler)(Map::new())
.await
.expect_err("the handler refuses too");
- assert_eq!(direct, "missing required `class`");
+ assert!(
+ direct.contains("INVALID_REQUEST") && direct.contains("question"),
+ "the handler refuses with the memory taxonomy's INVALID_REQUEST: {direct}"
+ );
assert_ne!(
dispatched, direct,
"the two refusals must stay distinguishable: a test written against the \
@@ -130,17 +133,18 @@ async fn handler_refusal_differs_from_the_dispatcher_refusal_for_an_absent_param
async fn explicit_null_passes_the_gate_and_the_handler_refuses_instead() {
let err = dispatch(
state(),
- "openhuman.learning_get_facet",
- json!({ "class": null, "key": "verbosity" }),
+ "openhuman.memory_recall",
+ json!({ "question": null }),
)
.await
- .expect_err("`class` is null, so the handler refuses");
+ .expect_err("`question` is null, so the handler refuses");
- // The handler's wording, not the dispatcher's — the mirror image of
+ // The handler's wording (the memory error taxonomy), not the dispatcher's
+ // — the mirror image of
// `missing_required_param_is_refused_with_the_schema_comment`.
- assert_eq!(err, "missing required `class`");
+ assert!(err.contains("INVALID_REQUEST"), "got: {err}");
assert!(
- !err.starts_with("missing required param 'class'"),
+ !err.starts_with("missing required param 'question'"),
"the gate must NOT have refused this: {err}"
);
}
diff --git a/tests/raw_coverage/notification_platform_e2e.rs b/tests/raw_coverage/notification_platform_e2e.rs
index 5efadcc536..67a0eca306 100644
--- a/tests/raw_coverage/notification_platform_e2e.rs
+++ b/tests/raw_coverage/notification_platform_e2e.rs
@@ -1,6 +1,6 @@
//! End-to-end coverage for the notification centre and the small platform namespaces that had no
//! e2e target at all: `notification` (7 uncovered), `health` (2), `doctor` (2), `service`'s
-//! daemon-host pair, `provider_surfaces` (2), `slack_memory` (2) and `announcements` (1).
+//! daemon-host pair, `provider_surfaces` (2) and `announcements` (1).
//!
//! Everything here goes over the real JSON-RPC surface (`build_core_http_router`) against an
//! in-process axum mock for the hosted backend. Nothing reaches the network.
@@ -1326,128 +1326,6 @@ async fn provider_surfaces_respond_queue_upserts_by_event_identity() {
h.stop();
}
-// ── slack_memory ─────────────────────────────────────────────────────────────
-
-/// `slack_memory_sync_status` filters the Composio connection list down to active Slack rows and
-/// reports the degraded detail fields at zero; `slack_memory_sync_trigger` refuses an id that is
-/// not in that set.
-///
-/// Covers: `openhuman.slack_memory_sync_status`, `openhuman.slack_memory_sync_trigger`.
-#[tokio::test]
-async fn slack_memory_sync_status_filters_to_active_slack_connections() {
- let _env_lock = platform_e2e_env_lock();
-
- // Three rows that between them exercise every branch of the filter: an active slack one, an
- // active connection for a *different* toolkit, and a slack one that is not active.
- let state = BackendState {
- announcement: AnnouncementMode::Present,
- connections: Arc::new(json!({
- "connections": [
- { "id": "conn-slack-live", "toolkit": " Slack ", "status": "ACTIVE" },
- { "id": "conn-gmail-live", "toolkit": "gmail", "status": "ACTIVE" },
- { "id": "conn-slack-pending", "toolkit": "slack", "status": "PENDING" }
- ]
- })),
- };
- let h = Harness::start(state).await;
- h.sign_in().await;
-
- let status = post_json_rpc(
- &h.rpc_base,
- 9601,
- "openhuman.slack_memory_sync_status",
- json!({}),
- )
- .await;
- let result = peel(assert_no_jsonrpc_error(&status, "slack_memory_sync_status"));
- let rows = result
- .get("connections")
- .and_then(Value::as_array)
- .unwrap_or_else(|| panic!("sync_status returns a connections array: {result}"));
- assert_eq!(
- rows.len(),
- 1,
- "only the active Slack connection is a sync candidate — the gmail row and the pending \
- slack row must both be filtered out: {result}"
- );
- let row = &rows[0];
- assert_eq!(
- row.get("connection_id").and_then(Value::as_str),
- Some("conn-slack-live"),
- "the toolkit match is case- and whitespace-insensitive (` Slack ` matched): {row}"
- );
- // The per-connection detail this endpoint used to report has no source since tinymemory
- // v1.13.4; the fields are kept on the wire at their zero value rather than removed. Pinning
- // that keeps a future "it started reporting real cursors again" from going unnoticed.
- assert_eq!(
- row.get("per_channel_cursors").and_then(Value::as_str),
- Some("{}"),
- "cursor detail is no longer available and is reported as an empty JSON object: {row}"
- );
- assert_eq!(row.get("synced_ids_count").and_then(Value::as_u64), Some(0));
- assert_eq!(
- row.get("requests_used_today").and_then(Value::as_u64),
- Some(0)
- );
- assert_eq!(
- row.get("daily_request_limit").and_then(Value::as_u64),
- Some(0)
- );
-
- // ── a trigger scoped to a connection that is not a candidate fails, naming the id.
- let unknown = post_json_rpc(
- &h.rpc_base,
- 9602,
- "openhuman.slack_memory_sync_trigger",
- json!({ "connection_id": "conn-slack-pending" }),
- )
- .await;
- let message = jsonrpc_error_message(&unknown, "sync_trigger for a non-active connection");
- assert!(
- message.contains("no active Slack connection with id=conn-slack-pending"),
- "the error must name the id it could not find, got: {message}"
- );
-
- // The gmail connection is active but the wrong toolkit — same refusal, which is what proves
- // the filter is on toolkit *and* status rather than either alone.
- let wrong_toolkit = post_json_rpc(
- &h.rpc_base,
- 9603,
- "openhuman.slack_memory_sync_trigger",
- json!({ "connection_id": "conn-gmail-live" }),
- )
- .await;
- assert!(
- jsonrpc_error_message(&wrong_toolkit, "sync_trigger for a gmail connection")
- .contains("no active Slack connection with id=conn-gmail-live")
- );
-
- h.stop();
-}
-
-/// Both `slack_memory` controllers refuse before the network hop when the user is signed out.
-#[tokio::test]
-async fn slack_memory_controllers_require_a_backend_session() {
- let _env_lock = platform_e2e_env_lock();
- let h = Harness::start(default_state()).await;
- // Deliberately no sign_in().
-
- for (id, method) in [
- (9701, "openhuman.slack_memory_sync_status"),
- (9702, "openhuman.slack_memory_sync_trigger"),
- ] {
- let response = post_json_rpc(&h.rpc_base, id, method, json!({})).await;
- let message = jsonrpc_error_message(&response, method);
- assert!(
- message.contains("[slack_ingest] list_connections")
- && message.contains("no backend session token"),
- "{method} must fail at the client factory with an actionable message, got: {message}"
- );
- }
-
- h.stop();
-}
-
// ── announcements ────────────────────────────────────────────────────────────
/// `announcements_get_latest` passes a backend announcement through verbatim, folds the backend's