fix: harden browser automation pipeline#251
Merged
Conversation
- resolveTabId: validate URL even for explicit tabId, fall through to auto-resolve when tab is not debuggable or has been closed - handleNavigate: wait for URL change before checking 'complete' status to avoid race condition with stale about:blank - ensureAttached: pre-check tab URL, verify cached attach with probe, invalidate cache on URL change via onUpdated listener - daemon-client: recognize transient extension errors (disconnected, attach failed) as retryable with 1500ms delay; fresh command ID per attempt - pipeline executor: add per-step retry for browser steps (up to 2 retries on transient errors); cleanup automation window on pipeline failure - page.ts: selectTab/newTab/closeTab properly update/invalidate _tabId - daemon.ts: add WebSocket ping/pong heartbeat (15s interval, 2-miss disconnect) - Increase automation window idle timeout from 30s to 120s - Fix timeout param edge cases in BrowserBridge._ensureDaemon - Remove unused chalk import; fix trailing import placement Closes #249
This was referenced Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #249 —
Cannot access a chrome-extension:// URL of different extensionRoot Cause
resolveTabId()skipped URL validation when an explicittabIdwas provided. Extensions like "New Tab Override" could hijack tab URLs tochrome-extension://, causingchrome.debugger.attach()to fail.Changes (12 issues fixed)
P0 — Extension layer
resolveTabId: validate URL even for explicit tabIdhandleNavigate: wait for URL change before checking complete status (race condition fix)ensureAttached: pre-check tab URL, verify cached attach with probeP1 — Resilience
daemon-client: recognize transient extension errors as retryable (1.5s delay)P2 — Improvements
selectTab/newTab/closeTabproperly update/invalidate_tabIdTesting