Skip to content

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

Re-anchor the composio scopes refusal on the message it now emits

M3gA-Mind2be4c25c1087
diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rs
index 5cd288f38d..8505fbbf87 100644
--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs
@@ -868,13 +868,43 @@ 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 used to assert "memory client not initialised", the refusal the
+ // in-process engine handle produced. `1bf2037a0` ("Stop booting the second
+ // in-process memory engine", openhuman#5725) removed that handle and moved
+ // the storage half onto the bound driver, so the string stopped existing
+ // anywhere in `src/` — and this assertion went on asserting it, failing every
+ // lane that runs raw_coverage. It survived review because the coverage lane
+ // is changed-modules-scoped and did not run this target.
+ //
+ // Re-anchored on the arm this path actually reaches. `save` refuses on three
+ // grounds and they are deliberately distinguishable: "memory driver
+ // unavailable" (nothing bound), "does not serve Graph" (bound, wrong family),
+ // and "kv_put failed" (bound, right family, the write itself failed). Here
+ // the module provider binds and does serve Graph, so it is the third — the
+ // module cdylib is never loaded in a test binary that runs no boot sequence.
+ //
+ // The tag and the arm are pinned; the reason after the colon is NOT. That
+ // text belongs to the module loader, not to this handler, and pinning
+ // another component's wording here is how the previous assertion became
+ // orphaned in the first place.
let memory_missing = composio_call(
set_scopes,
json!({ "toolkit": "gmail", "read": true, "write": true, "admin": false }),
)
.await
- .expect_err("memory client not initialised");
- assert!(memory_missing.contains("memory client not initialised"));
+ .expect_err("the backing write must fail with no module host policy published");
+ 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}"
+ );
+ assert!(
+ memory_missing.contains("kv_put failed"),
+ "set_user_scopes must fail CLOSED on the backing write rather than reporting \
+ a save it did not perform; got: {memory_missing}"
+ );
}
#[test]