Skip to content

fix(cooperation): recover frame coverage during synchronization - #549

Merged
iuyo5678 merged 3 commits into
mainfrom
fix/cooperation-frame-observability
Nov 2, 2026
Merged

iuyo5678 merged 3 commits into
mainfrom
fix/cooperation-frame-observability

Conversation

@iuyo5678

@iuyo5678 iuyo5678 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Pages with failed child iframes could never complete cooperate sync because a missing content-script receiver aborted collection for the entire tab. Skip failed child frames and inactive documents, report them in frame_gaps, and repair missing collectors immediately using the existing capture script. Active frames still require coverage; a failed main page remains an error.

Frame diagnostics retain only HTTP(S) origins and paths; other URLs show only their scheme. Malformed URLs use a placeholder without interrupting collection. Repair attempts are shared per current document and removed when the document leaves the tab. The existing WXT entrypoint disposes previous collectors when reinjected; the browser regression now tests that shipped entrypoint, including delayed declared-script startup and extension reload.

Return frame_unobservable and page_load_failed for diagnosed collection failures. When a bounded wait reports temporary unavailability, --settle continues its remaining sync attempts and returns the last real sync error if all three fail. It neither invents a permanent frame failure nor recommends reloading for a temporary wait timeout. Human control retains not_ready, including explicit holds during navigation, and status/wait reports control_policy: null until policy negotiation succeeds.

Validation:

  • Extension and CLI unit tests, TypeScript checks, frontend formatting, Rust fmt/clippy, skill validation and production builds passed.
  • Real Chrome regressions cover failed child frames under strict and target policies, DOM clicks, evaluate, failed main-page exit codes, delayed declared scripts after repair, and extension reload without refreshing the page. Human input still revokes control after repair.
  • The failed-frame regression runs in CI. The reload test waits for the new worker to initialize before querying Chrome APIs.

Fixes #545.

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

Labels

None yet

Projects

None yet

2 participants