Skip to content

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

test(inference): disable the runtime before the hosted-STT assertion

M3gA-Mindb86b015e2ed4
diff --git a/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs b/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
index a17f7ed301..2c4629c080 100644
--- a/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
@@ -438,6 +438,16 @@ async fn inference_transcribe_controllers_cover_params_trimming_and_local_reject
// is hosted now, so gating it on the local runtime would be a regression
// (the same assertion `inference_local_ops_piper_...:190` makes for the op,
// held here at the controller boundary).
+ //
+ // The runtime is turned OFF first, and that is what gives the assertion
+ // teeth: with it enabled, "local ai is disabled" could not appear whether
+ // or not the gate existed, so the check passed vacuously. Disabled, a
+ // regression that gated hosted STT on the local runtime WOULD produce that
+ // string and this would catch it.
+ let mut hosted_config = temp_config(&tmp);
+ hosted_config.local_ai.runtime_enabled = false;
+ hosted_config.save().await.expect("save config");
+
let hosted = call(
transcribe_bytes,
json!({ "audio_bytes": [1_u8, 2, 3], "extension": ".WEBM" }),