Capture iframe and worker telemetry with shared target tracking - #371
Open
rgarcia wants to merge 5 commits into
Open
Capture iframe and worker telemetry with shared target tracking#371rgarcia wants to merge 5 commits into
rgarcia wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7314252. Configure here.
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
browsersurfacefor telemetry target/session discovery while retaining separate CDP connections and tracker instances for telemetry and WebMCP.iframeandworkerin the event target-type schema and regenerate the Go OpenAPI output.Validation
-race: top-level, same-origin, cross-origin and nested cross-origin; default/isolated contexts; sent/aborted POSTs; frames created before/after monitor startup.-race; the entirecdpmonitorsuite with real-browser tests enabled also passed. Chromium 151.0.7922.169 on Linux. The dedicated CDP telemetry browser-regression step now runs in CI.go vet ./...and the complete non-e2e race suite passed on the latest commit. An earlier run hit a pre-existing Chromium temporary-directory cleanup flake inlib/devtoolsproxy; its retry and the final full run both passed. Focused race tests forcdpmonitor,browsersurface,cdpclient,webmcpclient,oapi, and the API handlers also passed.Run from
server/:KERNEL_CDPMONITOR_CHROME_E2E=1 go test -race ./lib/cdpmonitor -count=1Scope and generated output
These tests cover settled targets, not requests racing domain initialization. Discovery intentionally covers page, iframe, dedicated/shared/service worker, and background-page targets; worklet/webview/other target capture is not part of this change. Default location-tracked iframe sessions retain their existing independent initialization/lifetime behavior. No production deployment was performed; Docker end-to-end tests run in CI.
The latest commit passes the CDP browser-regression step, unit tests, image builds, and BugBot. Docker end-to-end remains red on the pre-existing
TestReplayRecordingIncludesAudioTrackaudio-duration assertion, including an unchanged retry: audio duration 8.094458s versus a required minimum of 8.121387s (formatDuration - 2). No audio implementation or audio-test assertions changed in this PR.The earlier Docker failure was
TestReplayRecordingIncludesAudioTrackexceeding the unchanged five-second Playwright daemon-startup deadline. An unchanged rerun passed; the same startup failure also appears in earlier branches without these changes. The test does not enable the telemetry collector.A subsequent CI run hit the existing Chrome fixture's 20-second startup limit before creating the monitor. The fixture now allows up to 60 seconds (capped by its parent deadline), enforces a real pipe-read deadline, drains stderr after readiness, and reaps the command on cleanup. Capture assertion deadlines are unchanged. Startup deadline/partial-read/EOF tests passed 10 race-enabled repetitions; the connection-ownership browser test passed five repetitions.
OpenAPI regeneration also synchronizes pre-existing embedded-spec drift for WebMCP's
awaiting_submissionstatus. The source schema and generated Go status types already used that value; this change does not edit the WebMCP source definition. The generated output was produced using the existing down-conversion/codegen/SSE-patch pipeline, not hand-edited.