Skip to content

feat(trace): attribute requests to service workers and api request contexts - #42328

Merged
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:trace-request-owner-refs
Aug 21, 2026
Merged

feat(trace): attribute requests to service workers and api request contexts#42328
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:trace-request-owner-refs

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • Har entries now reference their originator: new _serviceWorkerRef and _apiRequestRef fields replace the _apiRequest boolean.
  • Network tab Source column shows service-worker#N / api#N for requests that do not belong to a page.
  • Trace format bumped to v9, with a modernizer step converting _apiRequest into _apiRequestRef.

…ntexts
Har entries now reference their originator: new `_serviceWorkerRef` and
`_apiRequestRef` fields replace the `_apiRequest` boolean, and the network
tab shows `service-worker#N` / `api#N` in the Source column for requests
that do not belong to a page. Trace format is bumped to v9 with a
modernizer step converting `_apiRequest` to `_apiRequestRef`.
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chrome] › mcp/config.spec.ts:203 › chromiumSandbox › --sandbox enables the sandbox @mcp-ubuntu-latest-chrome

8122 passed, 1341 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

19 flaky⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:160 › should work with Shift-clicking `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/browsercontext-reuse.spec.ts:361 › reuse launch › should work with routeWebSocket `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@frozen-time-library-chromium-linux`
⚠️ [chromium-page] › page/page-add-init-script-callback.spec.ts:50 › should pass arguments to the callback `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/global-fetch.spec.ts:293 › should return security details from response `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/har.spec.ts:639 › should have security details `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/global-fetch.spec.ts:293 › should return security details from response `@webkit-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/har.spec.ts:639 › should have security details `@webkit-ubuntu-22.04-node20`

51222 passed, 1236 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the failing CI.

🟢 The one failure is a pre-existing flake — this PR is clear

The only red is [chrome] › mcp/config.spec.ts:203 › chromiumSandbox › --sandbox enables the sandbox, and it's a known flake unrelated to this change. This PR only touches trace/HAR request attribution; it doesn't go near MCP sandbox launching.

Details

Overall: 1 failed, 8122 passed. The single failure doesn't overlap with anything this PR modifies (traceModel.ts, traceModernizer.ts, harTracer.ts, trace-viewer network/console tabs, HAR/trace types). The changed code path — attributing requests to service workers and API request contexts in traces — has nothing to do with spawning a sandboxed Chrome in the MCP config test.

Pre-existing flake / infra

  • [chrome] › mcp/config.spec.ts:203 › chromiumSandbox › --sandbox enables the sandbox — flake. Across the test-results DB this test flips constantly: 38 runs, 6 failed, 32 passed, and 25 of those passes were only rescued by a retry (failed→passed within the same run). It has failed on SHAs this PR can't be responsible for, e.g. PR fix(chromium): stop disabling BoundaryEventDispatchTracksNodeRemoval #42294 at sha 4aa9163c91. That's the same test failing/flaking elsewhere, so the red here is noise, not a regression.

Triaged by the Playwright bot - agent run

@dgozman
Dmitry Gozman (dgozman) merged commit 9642f57 into microsoft:mainAug 21, 2026
44 of 45 checks passed
Sign up for freeto 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.

2 participants

@dgozman@pavelfeldman