Skip to content

Fix plugin CI root causes#35

Open
pirate wants to merge 1 commit into
mainfrom
fix-plugin-ci-root-causes
Open

Fix plugin CI root causes#35
pirate wants to merge 1 commit into
mainfrom
fix-plugin-ci-root-causes

Conversation

@pirate

@pirate pirate commented Jun 11, 2026

Copy link
Copy Markdown
Member

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.

Written for commit ffc7042. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="abx_plugins/plugins/archivedotorg/on_Snapshot__08_archivedotorg.finite.bg.py">

<violation number="1" location="abx_plugins/plugins/archivedotorg/on_Snapshot__08_archivedotorg.finite.bg.py:76">
P2: URL encoding uses path-safe chars regardless of placeholder position; query-position `{url}` templates (e.g. `?url={url}`) produce malformed outer URLs because inner `?`, `&`, `#` are left unencoded.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic



def build_archivedotorg_submit_url(endpoint_template: str, url: str) -> str:
escaped_url = quote(url, safe=URL_PATH_SAFE_CHARS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: URL encoding uses path-safe chars regardless of placeholder position; query-position {url} templates (e.g. ?url={url}) produce malformed outer URLs because inner ?, &, # are left unencoded.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At abx_plugins/plugins/archivedotorg/on_Snapshot__08_archivedotorg.finite.bg.py, line 76:

<comment>URL encoding uses path-safe chars regardless of placeholder position; query-position `{url}` templates (e.g. `?url={url}`) produce malformed outer URLs because inner `?`, `&`, `#` are left unencoded.</comment>

<file context>
@@ -71,6 +72,15 @@ def should_skip_archivedotorg_url(url: str) -> str:
 
 
+def build_archivedotorg_submit_url(endpoint_template: str, url: str) -> str:
+    escaped_url = quote(url, safe=URL_PATH_SAFE_CHARS)
+    if "{url}" in endpoint_template:
+        return endpoint_template.format(url=escaped_url)
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant