Three new test files covering modules the audit flagged as having zero
direct coverage:
- test_openrouter_transport.py (18 tests): provider chain selection,
endpoint resolution, _call_provider parse path (including the
reasoning-field fallback and token-based cost estimation), and
call_llm's cross-provider failover. Uses httpx.MockTransport so no
network. Patches _call_provider for failover tests to bypass
tenacity's retry delays.
- test_auth_session.py (7 tests): sign/verify round-trip, tampered
cookie rejection, expired cookie rejection (via TTL monkeypatch),
garbage input handling, salt isolation between session and pending
serializers, and rejection of cookies signed with a different secret.
- test_cadence_policy.py (16 tests): is_active_window weekday/weekend
+ half-open interval boundaries, min_gap_hours across bands,
should_run gating for first-run / active / off-hours / weekend
/ naive-datetime cases, and the NEWS_POLICY 20-minute / 3-hour
variations.
Suite goes from 291 to 336 passing.