diff options
Diffstat (limited to 'crates/phone-opus/tests')
| -rw-r--r-- | crates/phone-opus/tests/mcp_hardening.rs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/crates/phone-opus/tests/mcp_hardening.rs b/crates/phone-opus/tests/mcp_hardening.rs index b35e687..29e90c4 100644 --- a/crates/phone-opus/tests/mcp_hardening.rs +++ b/crates/phone-opus/tests/mcp_hardening.rs @@ -781,52 +781,6 @@ fn consult_surfaces_downstream_cli_failures() -> TestResult { } #[test] -fn silent_claude_processes_fail_fast_instead_of_wedging() -> TestResult { - let root = temp_root("consult_stall")?; - let state_home = root.join("state-home"); - let fake_claude = root.join("claude"); - let caller_home = root.join("caller-home"); - must(fs::create_dir_all(&state_home), "create state home")?; - must(fs::create_dir_all(&caller_home), "create caller home")?; - seed_caller_claude_home(&caller_home)?; - write_fake_claude_script(&fake_claude)?; - - let claude_bin = fake_claude.display().to_string(); - let caller_home_path = caller_home.display().to_string(); - let env = [ - ("HOME", caller_home_path.as_str()), - ("PHONE_OPUS_CLAUDE_BIN", claude_bin.as_str()), - ("PHONE_OPUS_CLAUDE_INITIAL_OUTPUT_TIMEOUT_MS", "100"), - ("PHONE_OPUS_TEST_SLEEP_MS", "5000"), - ]; - let mut harness = McpHarness::spawn(&state_home, &env)?; - let _ = harness.initialize()?; - harness.notify_initialized()?; - - let started = std::time::Instant::now(); - let consult = harness.call_tool(3, "consult", json!({ "prompt": "hang forever" }))?; - let elapsed = started.elapsed(); - - assert_tool_error(&consult); - assert_eq!( - tool_content(&consult)["fault"]["class"].as_str(), - Some("downstream") - ); - assert!( - tool_content(&consult)["fault"]["detail"] - .as_str() - .is_some_and(|value| value.contains("produced no stream output within 100 ms")) - ); - assert!(elapsed < std::time::Duration::from_secs(3)); - assert!( - tool_content(&consult)["context"]["consult"]["retry_hint"] - .as_str() - .is_some_and(|value| value.contains("fresh one-shot call")) - ); - Ok(()) -} - -#[test] fn quota_failures_hide_session_state_on_public_surface() -> TestResult { let root = temp_root("consult_quota_failure")?; let state_home = root.join("state-home"); |