Consolidate Odysseus agent harness and tool contracts

This commit is contained in:
pewdiepie-archdaemon
2026-09-17 10:07:40 +00:00
parent 84aa9a91de
commit 218d762427
229 changed files with 28899 additions and 1551 deletions
+27
View File
@@ -141,3 +141,30 @@ def test_general_web_search_keeps_comprehensive_fetch(monkeypatch):
assert result["exit_code"] == 0
assert seen[0][0] == "best way to repair a bicycle tire"
assert "full fetched answer" in result["output"]
def test_general_web_search_degrades_to_metadata_when_content_fetch_times_out(monkeypatch):
monkeypatch.setattr(
search,
"comprehensive_web_search",
lambda *args, **kwargs: (_ for _ in ()).throw(asyncio.TimeoutError()),
)
monkeypatch.setattr(
search,
"searxng_search_results",
lambda query, count: [{
"title": "HTTP Semantics",
"url": "https://www.rfc-editor.org/rfc/rfc9110.html",
"snippet": "The Retry-After field indicates how long to wait.",
}],
)
result = asyncio.run(WebSearchTool().execute(
json.dumps({"query": "HTTP Retry-After semantics", "max_pages": 3}),
{},
))
assert result["exit_code"] == 0
assert result["evidence_status"] == "available"
assert result["degraded_mode"] == "metadata_after_content_timeout"
assert "https://www.rfc-editor.org/rfc/rfc9110.html" in result["output"]