From bafb7949f8901e3c3b144e69d62ff956faf90c93 Mon Sep 17 00:00:00 2001 From: Alexandre Teixeira Date: Sat, 31 Oct 2026 22:11:25 +0000 Subject: [PATCH] fix(test): isolate web_fetch failure regression from contextual follow-up heuristics --- tests/test_tool_policy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_tool_policy.py b/tests/test_tool_policy.py index e2910c3ed..2da581c4e 100644 --- a/tests/test_tool_policy.py +++ b/tests/test_tool_policy.py @@ -1067,6 +1067,8 @@ def test_agent_loop_policy_blocks_disabled_web_tool_call_before_execution(monkey def test_web_fetch_js_failure_exposes_private_browser_next_round(monkeypatch): _patch_loop_basics(monkeypatch) + monkeypatch.setattr(al, "_looks_like_contextual_public_web_followup", lambda *a, **k: False, raising=False) + monkeypatch.setattr(al, "_contextual_public_web_topic_text", lambda *a, **k: "", raising=False) sent_tools = [] sent_messages = [] @@ -1106,6 +1108,7 @@ def test_web_fetch_js_failure_exposes_private_browser_next_round(monkeypatch): [{"role": "user", "content": "open the official SpaceX Starship launches page"}], max_rounds=2, relevant_tools={"web_search", "web_fetch"}, + forced_tools={"web_search", "web_fetch"}, ) )