marchwarden/tests
Jeff Smith a5bc93e275 M1.1: Search and fetch tools with tests
- tavily_search(): Tavily API wrapper returning SearchResult dataclasses
  with content hashing (raw_content preferred, falls back to summary)
- fetch_url(): async URL fetch with HTML text extraction, content hashing,
  and graceful error handling (timeout, HTTP errors, connection errors)
- _extract_text(): simple HTML → clean text (strip scripts/styles/tags,
  decode entities, collapse whitespace)
- _sha256(): SHA-256 content hashing with 'sha256:' prefix for traces

18 tests: hashing, HTML extraction, mocked Tavily search, mocked async
fetch (success, timeout, HTTP error, hash consistency).

Refs: archeious/marchwarden#1

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-08 14:17:18 -06:00
..
__init__.py M0.3: Implement contract v1 Pydantic models with tests 2026-04-08 14:00:45 -06:00
test_models.py M0.3: Implement contract v1 Pydantic models with tests 2026-04-08 14:00:45 -06:00
test_tools.py M1.1: Search and fetch tools with tests 2026-04-08 14:17:18 -06:00