Skip to content

v2.1.0 — Coverage gate raised to 75%; storage and resilience test suites

Choose a tag to compare

@StarlightDaemon StarlightDaemon released this 04 Jun 07:25
· 37 commits to main since this release

What's New

Test Coverage: 40% → 77%

Coverage gate raised from 40% to 75% (currently passing at 77%). Enforced in both CI and local pytest runs.

tests/test_storage_extended.py — 27 real-SQLite tests via tmp_path (no mocks):

  • Schema verification (magnets + scrape_runs tables)
  • add_magnet: insert, count, duplicate idempotency
  • has_hash: true/false/case-insensitive
  • recent(limit=N): count and ordering
  • search(): FTS match and empty-string passthrough
  • stats(): today, last_7_days, last_30_days keys
  • record_scrape_run: row insertion and value correctness
  • WAL probe: succeeds on local filesystem path

tests/test_resilience_extended.py:

  • retry.py: _parse_retry_after with valid/invalid/absent header; 429 uses header wait time
  • migrate.py: _parse_line valid/invalid; migrate() no-files, single file, deduplication, wrong filename pattern, multi-file
  • security.py: log_security_event write path and OSError suppression; _rotate_log_if_needed trim logic; _migrate_credentials v1→v2 upgrade; get_base_dir branch

Result

273 tests passing. 77% coverage. mypy clean. ruff clean.

What's Next

  • T5: Codecov integration (requires Codecov account setup — see .raiden/local/prompts/v2-completion/T5-codecov.md)