Skip to content

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

test(voice): update reply speech tests for renamed error types

Steven Enamakela9041a517ab0
diff --git a/crates/openhuman-tinyhumans/src/voice/reply_speech_tests.rs b/crates/openhuman-tinyhumans/src/voice/reply_speech_tests.rs
index ba951c5f2e..e963fd8e8c 100644
--- a/crates/openhuman-tinyhumans/src/voice/reply_speech_tests.rs
+++ b/crates/openhuman-tinyhumans/src/voice/reply_speech_tests.rs
@@ -5,7 +5,7 @@ fn tts_unauthorized_flattens_to_session_expiry_not_hard_error() {
// `e.to_string()`, producing the raw "backend rejected session token …"
// Display string that matched none of the session-expiry classifiers and
// leaked to Sentry as a hard error. `synthesize_reply` now flattens the
- // typed `BackendApiError::Unauthorized` via `crate::backend::flatten_authed_error`
+ // typed `BackendApiError::Unauthorized` via `crate::client::flatten_authed_error`
// (the #3384 team/billing pattern), so it carries the SESSION_EXPIRED
// sentinel and is recognised + demoted by the JSON-RPC dispatcher.
//
@@ -13,8 +13,8 @@ fn tts_unauthorized_flattens_to_session_expiry_not_hard_error() {
// classifier: build the typed error → flatten → classify. If either the
// sentinel mapping or the classifier drifts, this fails instead of
// silently re-leaking the TTS 401.
- let flat = crate::backend::flatten_authed_error(anyhow::Error::new(
- crate::backend::BackendApiError::Unauthorized {
+ let flat = crate::client::flatten_authed_error(anyhow::Error::new(
+ crate::client::HostedApiError::Unauthorized {
method: "POST".to_string(),
path: "/openai/v1/audio/speech".to_string(),
},
@@ -29,7 +29,7 @@ fn tts_unauthorized_flattens_to_session_expiry_not_hard_error() {
"path preserved for logs: {flat}"
);
assert!(
- crate::core::observability::is_session_expired_message(&flat),
+ openhuman_embed::__host::core::observability::is_session_expired_message(&flat),
"flattened TTS Unauthorized must classify as session expiry (demoted, \
not a hard error): {flat}"
);
@@ -39,7 +39,7 @@ fn tts_unauthorized_flattens_to_session_expiry_not_hard_error() {
fn tts_non_auth_error_is_not_demoted_to_session_expiry() {
// A genuine TTS failure (timeout, 5xx, …) must keep its full anyhow chain
// and NOT be demoted — real backend/TTS breakage must still reach Sentry.
- let flat = crate::backend::flatten_authed_error(
+ let flat = crate::client::flatten_authed_error(
anyhow::anyhow!("connect timeout").context("backend request POST /openai/v1/audio/speech"),
);
@@ -52,7 +52,7 @@ fn tts_non_auth_error_is_not_demoted_to_session_expiry() {
"underlying cause preserved: {flat}"
);
assert!(
- !crate::core::observability::is_session_expired_message(&flat),
+ !openhuman_embed::__host::core::observability::is_session_expired_message(&flat),
"non-auth TTS error must NOT classify as session expiry: {flat}"
);
}