Fix plugin CI root causes

PI
5mo ago
+372-73

Summary

  • make archivedotorg deterministic by using a configurable endpoint and pytest-httpserver tests
  • fix favicon total timeout handling and RSS parser behavior for ordinary HTML vs unsafe feed XML
  • tighten Chrome/SingleFile/MHTML fixtures around real delayed pages, HTTPS fallback, derived runtime paths, and OOPIF capture

Verification

  • uv run pytest -q abx_plugins/plugins/archivedotorg/tests/test_archivedotorg.py abx_plugins/plugins/favicon/tests/test_favicon.py abx_plugins/plugins/parse_rss_urls/tests/test_parse_rss_urls.py abx_plugins/plugins/chrome/tests/test_chrome_test_helpers.py::test_chrome_test_urls_slow_route_honors_delay abx_plugins/plugins/chrome/tests/test_chrome_test_helpers.py::test_https_fallback_is_added_when_upstream_urls_lack_https
  • uv run ruff check touched Python files
  • git diff --check

Summary by cubic

Stabilizes plugin CI by making external calls deterministic and fixing timeout/edge cases across Archive.org, favicon, RSS parsing, and Chrome-based plugins. Adds a configurable Wayback endpoint and hardens tests for HTTPS and OOPIF scenarios.

  • Bug Fixes

    • archivedotorg: adds ARCHIVEDOTORG_ENDPOINT with safe URL encoding; handles HTTP 429 as "noresults" without writing output; deterministic tests via local server.
    • favicon: enforces a single deadline across all fetch attempts; on timeout returns "No favicon found" instead of error.
    • parse_rss_urls: treats ordinary HTML as "noresults"; only fails on feed-shaped XML with unsafe declarations; keeps normal feedparser behavior.
  • Refactors

    • Chrome test helpers: slow route honors ?delay; auto-adds a real HTTPS test server when upstream lacks HTTPS.
    • Chrome MHTML tests: deterministic OOPIF capture using delayed iframe load, host mapping, and --site-per-process; waits for child frame before extraction.
    • SingleFile tests: prefer LIB_DIR and a downloads dir; simplify env wiring to reduce flakiness.