Commit Graph

2 Commits

Author SHA1 Message Date
808d6b4f83 test(sveta): Write unit and pipeline tests for the research engine
Outcome: done
Changed: tests/test_research_engine.py:1-198 (new), tests/test_research_pipeline.py:1-276 (new), tests/test_research_scheduling.py:7,366-380, tests/test_research_integration.py:1-112
Verified by: make verify -> exit_code 0, "Ran 219 tests OK verification passed" (baseline 199); only pre-existing StarletteDeprecationWarning from fastapi/testclient.py:1, none introduced
Findings:
- tests/test_research_engine.py (5 tests, mocked FakeResearchClient, no network): single-round closure; two-round discovery-then-closure with web/images/chat/describe items and round-2 describe of round-1 URL; new-content-alone does not prevent closure (engine.py:196 closure = new_urls==0 and new_queries==0); report/round to_dict serialisable; empty-subject ValueError with zero client calls.
- tests/test_research_pipeline.py (13 tests): extract_response web/ai/deep/chat/describe (pipeline.py:69), apply_extraction counts (pipeline.py:133), per-kind cache probes (pipeline.py:170), chat cached=True marks outcome cache_hit, RsearchError 503 failure outcome with pool survival, all-four-content-types drained through one run().
- tests/test_research_scheduling.py: +2 cache-TTL expiry tests with mocked time.monotonic (post-TTL and exact-TTL boundary, cache.py:20-44).
- tests/test_research_integration.py: converted from live-rsearch probe to offline mocked transport (patched urllib.request.urlopen, canned fixture); all original assertions preserved (second run cache_hit=True with zero additional r

Typosaurus-Run: 4e2afb673c7f4578a12276d9181b982d
Typosaurus-Node: 6aefb4137b954477a4b31e00ca0e91f7
Typosaurus-Agent: @sveta
Refs: #31
2026-08-07 23:39:53 +00:00
32a17e3f5c feat(tanya): Execute four recursive verification rounds and compile final report
Outcome: done
Changed: none (read-only; rounds run via PYTHONPATH=src python3 heredocs)
Verified by: make verify -> exit_code 0 "Ran 219 tests in 0.968s OK verification passed"
Findings:
- R1 2026-08-07T23:31:17Z PASS engine-optimality: empty world closes round1 (lfp halt); chain4 -> 6 rounds/5 urls (no depth cap); dedup unique-only; S* size5 > F^2 size2.
- R2 2026-08-07T23:34:35Z PASS verifies R1: chain6 pool1 -> 8 rounds/7 urls, F^3=3 subset S*=7; content-only closes round2; fanout 2 urls/5 queries.
- R3 2026-08-07T23:35:02Z PASS verifies R2: pools 1/4/8 identical (8,7,14,1); cached 2nd run 0 network calls, identical report; pool_size==max_concurrency.
- R4 2026-08-07T23:36:26Z PASS verifies R3: stress 38 items=succ+fail, 4 content kinds, closed; ""/whitespace -> ValueError, zero calls; chain5 pool8 7 rounds/6 urls; slow client completes.
- Engine C1-C8 all PASS (sibling f7f10c64): rsearch-only, bound 8, one _request 4 content types, dedup 64->1, closure, annotations/logging/header, no TODO, verify green.
- Live probe (fde105db, "python asyncio"): 86 queries, 754 urls, 281 contents, 164 requests, $0.002075, 264.91s; no closure in 240s guard -> TimeoutError, 2835 enqueued.
- Rounds' initial failures were tester-expectation only (MIN_QUERY_LENGTH=2 frontier.py:13, description seeds, non-http tokens kept); engine correct; reflect() recorded.
Open: none for this node; PR creation deferred to run coordinator (deepresearch.md exists, sibling 7d91ddb)
Confidence: high - four round

Typosaurus-Run: 4e2afb673c7f4578a12276d9181b982d
Typosaurus-Node: 0cee401df29142ecb2bf3bca088d5953
Typosaurus-Agent: @tanya
Refs: #31
2026-08-07 23:37:59 +00:00