Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion crates/tui/src/mcp/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,17 @@ mod tests {
listener,
"HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length: 2\r\n\r\nok".to_string(),
));
let configured = client(url, false);
// This path proves proxy routing, not a two-second scheduling bound.
let configured = McpHttpClient::new(
url,
false,
false,
false,
None,
Duration::from_secs(5),
Duration::from_secs(10),
)
.unwrap();
assert_eq!(
configured
.send(configured.get(url))
Expand Down
10 changes: 7 additions & 3 deletions crates/tui/src/plugins/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,6 @@ fn malformed_managed_policy_fails_closed() {

#[test]
fn managed_policy_path_env_override_is_honored() {
let _lock = crate::test_support::lock_test_env();
let tmp = tempfile::tempdir().unwrap();
let config = config(tmp.path());
write_plugin(&config, "");
Expand All @@ -1904,8 +1903,13 @@ fn managed_policy_path_env_override_is_honored() {
"the default sibling must stay absent so the override is proven"
);

let _guard = crate::test_support::EnvVarGuard::set(MANAGED_POLICY_PATH_ENV, &custom);
let mut registry = discover_with_config(&config);
let environment = super::context::HostEnvironment::from_entries([(
std::ffi::OsString::from(MANAGED_POLICY_PATH_ENV),
custom.as_os_str().to_os_string(),
)]);
let context =
super::context::PluginDiscoveryContext::from_config_and_environment(&config, environment);
let mut registry = super::discovery::discover_with_context(&config, context);
assert_eq!(
registry.managed_policy_path(),
Some(custom.as_path()),
Expand Down
3 changes: 3 additions & 0 deletions crates/tui/src/route_budget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ mod tests {
/// conservative compatibility ceiling, with an attributable source.
#[test]
fn uncatalogued_remote_model_keeps_a_conservative_ceiling() {
let _lock = crate::test_support::lock_test_env();
let _canonical = crate::test_support::EnvVarGuard::remove("CODEWHALE_MAX_OUTPUT_TOKENS");
let _legacy = crate::test_support::EnvVarGuard::remove("DEEPSEEK_MAX_OUTPUT_TOKENS");
let source = output_ceiling_source(ApiProvider::Openai, "totally-unknown-alias-v9");
assert_eq!(
source,
Expand Down
3 changes: 3 additions & 0 deletions crates/tui/src/runtime_threads/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13996,6 +13996,9 @@ async fn terminal_turn_cancels_pending_dynamic_tool_exactly_once() -> Result<()>
/// reads as a live claim that the (already answered) call is still waiting.
#[tokio::test]
async fn approval_wait_heartbeat_is_never_sequenced_after_the_decision() -> Result<()> {
// The timeout test changes a process-wide override to 25 ms. This case
// checks heartbeat ordering while a decision is still pending.
let _timeout_guard = test_approval_timeout_ms(0);
let manager = test_manager(test_runtime_dir())?;
let thread = manager
.create_thread(CreateThreadRequest::default())
Expand Down
Loading