Skip to content

feat(tracing): add resourcesDir option to Tracing.startHar#40488

Merged
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:feat-tracing-resources-dir
Apr 29, 2026
Merged

feat(tracing): add resourcesDir option to Tracing.startHar#40488
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:feat-tracing-resources-dir

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented Apr 29, 2026

Summary

  • Add resourcesDir option to Tracing.startHar to redirect attached response bodies to a user-chosen directory; defaults to the HAR file's directory. Throws when combined with a .zip HAR path.
  • Refactor HAR export to a mode-based protocol (entries/archive), mirroring tracing.stopChunk so resources can be written directly to user paths in-process and the existing harUnzip flow is used remotely.
  • Switch HarRecorder to SerializedFS.

When `content: 'attach'` is used with a non-zip HAR path, response
bodies are now placed alongside the HAR file by default, and can be
redirected to an explicit `resourcesDir` instead. Throws when combined
with a `.zip` path.

Refactors HAR export to a mode-based protocol matching tracing.stopChunk
(`entries` for in-process, `archive` for remote), so resources can be
written directly to user-provided paths in-process and reuse the
existing harUnzip flow remotely. HarRecorder now uses SerializedFS.
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/video.spec.ts:275 › screencast › should capture navigation `@webkit-ubuntu-22.04-node20`

41489 passed, 847 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

7 failed
❌ [firefox] › mcp/cli-core.spec.ts:31 › close @mcp-windows-latest
❌ [firefox] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest
❌ [firefox] › mcp/cli-devtools.spec.ts:231 › video-chapter @mcp-windows-latest
❌ [firefox] › mcp/cli-session.spec.ts:86 › delete-data @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:231 › should switch screencast to -s session on show --annotate @mcp-windows-latest
❌ [webkit] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-macos-latest

6814 passed, 927 skipped


Merge workflow run.

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.

2 participants