Skip to content

Allow Chrome to support remote browser providers and one-chrome-per-snapshot mode#12

Merged
pirate merged 37 commits intomainfrom
chrome-remote-providers
Mar 19, 2026
Merged

Allow Chrome to support remote browser providers and one-chrome-per-snapshot mode#12
pirate merged 37 commits intomainfrom
chrome-remote-providers

Conversation

@pirate
Copy link
Member

@pirate pirate commented Mar 18, 2026


Open with Devin

Summary by cubic

Adds remote Chrome adoption via CHROME_CDP_URL and an optional per‑snapshot isolation mode, with a CDP‑verified readiness contract and thin foreground wait barriers. Standardizes session markers and hook execution, centralizes CDP session setup, and strengthens teardown, stale‑session recovery, and CI logs.

  • New Features

    • Remote adoption: CHROME_CDP_URL (ws(s)/http(s)), CHROME_IS_LOCAL=false to omit chrome.pid, optional CHROME_KEEPALIVE=true.
    • Isolation: CHROME_ISOLATION=snapshot adds per‑snapshot lifecycle via on_Snapshot__09_chrome_launch.daemon.bg.js; crawl mode remains default.
    • Readiness/contract: connectToPage returns browser/page/cdpSession and can waitForNavigationComplete with postLoadDelayMs; waitForChromeSessionState (supports requireExtensionsLoaded); connectToBrowserEndpoint; auto‑attach; stronger stale‑session recovery; keepalive‑aware teardown; on_Crawl__91 and on_Snapshot__11 are thin foreground barriers.
    • Markers: stop using port.txt, final_url.txt, page_loaded.txt; use cdp_url.txt and navigation.json.
    • Hooks/tests: run all hooks via their shebang (no explicit node/python); helper updated to execute scripts directly; downstream extractors (e.g., accessibility, dom, infiniscroll, consolelog, dns, headers, outlinks) now use connectToPage and waitForNavigationComplete.
    • CI/tests: tee subprocess output (ABX_PYTEST_TEE_SUBPROCESS_OUTPUT=1), show full pytest results (-rA), expand Chrome tests for remote adoption and snapshot isolation.
  • Migration

    • Remote browser: set CHROME_CDP_URL, CHROME_IS_LOCAL=false, optionally CHROME_KEEPALIVE=true.
    • Per‑snapshot mode: set CHROME_ISOLATION=snapshot; snapshot launch hook starts/cleans the browser; crawl hooks skip launching.
    • Helpers: use connectToPage/connectToBrowserEndpoint; use waitForChromeSessionState; waitForPageLoaded is now waitForNavigationComplete.
    • Replace legacy markers with cdp_url.txt and navigation.json.
    • Ensure hooks are executable and invoked via shebang; import env helpers from ../base/utils.js.

Written for commit 2d38e91. Summary will update on new commits.

cubic-dev-ai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

pirate and others added 3 commits March 18, 2026 16:20
…g.js

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

pirate and others added 2 commits March 18, 2026 16:34
…g.js

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

pirate and others added 6 commits March 18, 2026 23:27
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
cubic-dev-ai[bot]

This comment was marked as resolved.

@pirate pirate merged commit 0d4f16f into main Mar 19, 2026
68 checks passed
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