Skip to content

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

test: serialize doctor e2e tests and assert telegram sender id

Steven Enamakel39b3fec880cd
diff --git a/.config/nextest.toml b/.config/nextest.toml
index e1c39852f6..8848dd78ea 100644
--- a/.config/nextest.toml
+++ b/.config/nextest.toml
@@ -30,6 +30,7 @@ final-status-level = "slow"
agent-harness-e2e = { max-threads = 1 }
json-rpc-e2e = { max-threads = 1 }
mcp-registry = { max-threads = 1 }
+doctor-e2e = { max-threads = 1 }
[[profile.ci.overrides]]
filter = 'binary(/^agent_harness_e2e$/)'
@@ -44,3 +45,15 @@ test-group = 'json-rpc-e2e'
[[profile.ci.overrides]]
filter = 'binary(/^mcp_registry_multi_server$/)'
test-group = 'mcp-registry'
+
+# doctor_e2e shares one mock backend when the lane supplies BACKEND_URL
+# (scripts/test-rust-with-mock.sh), and every case resets that mock's state and
+# asserts on its request log. Run in separate processes in parallel they reset
+# each other mid-test, so keep the binary serial.
+[[profile.ci.overrides]]
+filter = 'binary(/^doctor_e2e$/)'
+test-group = 'doctor-e2e'
+
+[[profile.default.overrides]]
+filter = 'binary(/^doctor_e2e$/)'
+test-group = 'doctor-e2e'
diff --git a/crates/openhuman-embed/tests/channel_agents.rs b/crates/openhuman-embed/tests/channel_agents.rs
index a8d0a59dd1..3b123958ee 100644
--- a/crates/openhuman-embed/tests/channel_agents.rs
+++ b/crates/openhuman-embed/tests/channel_agents.rs
@@ -245,8 +245,11 @@ fn a_telegram_message_is_answered_by_the_bound_runtime_agent() {
assert!(
matches!(
origins.as_slice(),
- [Some(AgentTurnOrigin::ExternalChannel { channel, sender: Some(sender), .. })]
- if channel == "telegram" && sender == "alice"
+ [Some(AgentTurnOrigin::ExternalChannel { channel, sender: Some(sender), sender_name, .. })]
+ // The origin carries the stable Telegram user id (the
+ // envelope's `sender.id`), with the username as its name.
+ if channel == "telegram" && sender == "99"
+ && sender_name.as_deref() == Some("alice")
),
"{origins:?}"
);