All checks were successful
ci/woodpecker/push/unit Pipeline was successful
Extend test_client.py with async stats/usage/metrics + async events stream, SSE edge cases (multi-line data, keepalive-only, incomplete trailing frame, full payload round trip, 4xx → typed error), default arg paths that omit query params, string/partial date variants, and 404/401 error paths. Verify __version__ == "0.3.0" and that the new models (Actor, CapsuleMetrics, CapsuleStats, MetricPoint, Resource, SSEEvent, UsageResponse) are exported from wrenn.models. Add live integration tests in test_integration.py: TestStatsUsageMetrics (stats default/range, usage no-args/date-range, metrics on a running capsule, metrics range=2h, metrics on a destroyed capsule → 404) and TestEventsStream (spawn reader thread, create capsule, assert its lifecycle event arrives). Add direct unit tests in test_code_runner_unit.py for the bare _protocol helpers (pick_kernel_id, validate_language, build_ws_url, apply_kernel_message) covering parent filtering, stdout/stderr routing, execute_result vs display_data main flag, error emit, and idle/busy status return. Fix EventsResource.stream() and AsyncEventsResource.stream(): calling _raise_for_status on a streaming httpx.Response without first reading the body raised httpx.ResponseNotRead on any 4xx/5xx. Now read the body (resp.read() / await resp.aread()) before status parsing when status >= 400. Bypass TestCodeRunnerMimeTypes._run in test_requests_status_code so the in-capsule SSL/network failure skips the test instead of tripping the helper's "unexpected error" pre-assertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>