Skip to content

chore(server): drop fixupMetadataError#40696

Open
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:chore-drop-fixup-metadata-error
Open

chore(server): drop fixupMetadataError#40696
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:chore-drop-fixup-metadata-error

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented May 7, 2026

Summary

  • Stop mutating progress.metadata.error from inside Frame.expect to fake an "Expect failed" entry for the library-mode case where expect returns a result.
  • Trace viewer and recorder now recognize the failure pattern themselves: when metadata.method === 'expect' and result.matches === params.isNot, treat it as an error. New helpers: actionErrorMessage in traceModel.ts and metadataError in recorderUtils.ts.
  • Adds pause.spec.ts › should populate log with expect failure covering the recorder path; the existing trace-viewer.spec.ts › should highlight expect failure covers the trace viewer path.

…stream

`Frame.expect` no longer mutates `progress.metadata.error` to synthesize an
"Expect failed" entry for the library-mode case where the expect returns a
result instead of throwing. Trace viewer and recorder now recognize the
failure pattern themselves: when `metadata.method === 'expect'` and
`result.matches === params.isNot`, treat it as an error.

- Trace viewer: new `actionErrorMessage` helper in `traceModel.ts`, used
  by `_errorDescriptorsFromActions` (Errors tab) and `actionList.isError`
  (red title).
- Recorder: matching `metadataError` helper in `recorderUtils.ts`, used by
  `metadataToCallLog` plus the in-flight retention and source-line color
  in `recorder.ts`.
- Adds `pause.spec.ts › should populate log with expect failure`
  exercising the recorder path during a paused script.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "MCP"

21 failed
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-windows-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:110 › should abort annotation when last screenshot is removed @mcp-windows-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:137 › should abort MCP annotation when last screenshot is removed @mcp-windows-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-windows-latest-chrome
❌ [firefox] › mcp/annotate.spec.ts:330 › should annotate when context has no fixed viewport @mcp-windows-latest-firefox
❌ [firefox] › mcp/annotate.spec.ts:367 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-firefox
❌ [firefox] › mcp/annotate.spec.ts:398 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-firefox
❌ [firefox] › mcp/annotate.spec.ts:427 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/annotate.spec.ts:476 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:231 › video-chapter @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-session.spec.ts:70 › delete-data @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-session.spec.ts:130 › workspace isolation - sessions in different workspaces are isolated @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:123 › daemon show: closing page exits the process @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:159 › save recording streams WebM bytes to the chosen file @mcp-windows-latest-firefox
❌ [msedge] › mcp/annotate.spec.ts:367 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-msedge
❌ [msedge] › mcp/annotate.spec.ts:398 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-msedge
❌ [msedge] › mcp/annotate.spec.ts:427 › should switch screencast to -s session on show --annotate @mcp-windows-latest-msedge
❌ [webkit] › mcp/config.ini.spec.ts:57 › ini config sets browser launch options @mcp-windows-latest-webkit
❌ [webkit] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-webkit
❌ [webkit] › mcp/http.spec.ts:142 › http transport browser sigint @mcp-windows-latest-webkit

6994 passed, 1058 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`

41659 passed, 851 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.

1 participant