Skip to content

issueReporter: fix branded-build media and repository tests - #343343

Merged
Giuseppe Cianci (Giuspepe) merged 1 commit into
mainfrom
agents/fix-issue-reporter-ci-media
Oct 21, 2026
Merged

Giuseppe Cianci (Giuspepe) merged 1 commit into
mainfrom
agents/fix-issue-reporter-ci-media

Conversation

@Giuspepe

@Giuspepe Giuseppe Cianci (Giuspepe) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Fixes https://github.com/microsoft/vscode-engineering/issues/4294

The tests assumed the OSS product URL's lowercase owner and WebM playback availability. Branded builds use Microsoft/vscode, and encoder support alone does not establish that recorded video can be played back.

Fix

  • Derive product-dependent expectations from the configured destination and retain explicit mixed-case routing/deduplication coverage.
  • Require both encoder and decoder support when selecting recording formats, with fallback from an unusable preference.
  • Keep real codec tests enabled. Supported formats must decode; unsupported fixtures must explicitly reject. Isolate the missing-duration import test from codec availability.

No tests are disabled. Production repository display casing and media-resource access rules remain unchanged.

Validation

  • npm run build-fast -- --client-only: passed.
  • npm run typecheck-client: passed.
  • Targeted ESLint on all seven changed files and git diff --check: passed.
  • The implementation run passed 204 tests across the six affected suites. Independent official Electron runs passed 114 media/import/recording tests and 11 affected form/overlay/capitalization checks, with no failures or skips.

Validation used macOS OSS Electron. The exact Microsoft Electron download was blocked by package-feed ReadPackages access. Branded Windows, macOS, and Linux CI must confirm recovery; this PR does not claim that build 487717 is fixed before that run.

Respect configured product repository casing and distinguish codec encoding from playback support. Keep real codec tests active and select usable recording formats without assuming OSS runtime capabilities.

Addresses microsoft/vscode-engineering#4294.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open issues
What changed in this PR

Fixes issue reporter failures in branded builds by aligning repository-casing expectations with configured product URLs and improving media recording/decoding test reliability across environments.

Changes:

  • Make recording format selection require both MediaRecorder encoder support and HTML video decoder support, with fallback when a preferred format is unusable.
  • Update issue reporter repository tests to preserve configured casing while deduplicating case-insensitively.
  • Adjust media import/decoding tests to be less sensitive to platform codec availability and provide clearer decode failure diagnostics.
File Description
src/​vs/​workbench/​contrib/​issue/​electron-browser/​nativeRecordingService.ts Filters supported recording formats by both recording and playback capability; adjusts isSupported/startRecording logic accordingly.
src/​vs/​workbench/​contrib/​issue/​test/​electron-browser/​nativeRecordingService.test.ts Adds test coverage for decode-capable format filtering; strengthens round-trip assertions and error diagnostics.
src/​vs/​workbench/​contrib/​issue/​test/​electron-browser/​issueReporterMediaImport.test.ts Stubs video decoding for a specific import case to avoid codec/environment dependency.
src/​vs/​workbench/​contrib/​issue/​test/​common/​issueReporterTarget.test.ts Adds coverage for preserving configured product repository casing while deduplicating repositories case-insensitively.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueReporterOverlay.test.ts Derives displayed repository text from resolved target to handle branded casing consistently.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueReporterMedia.test.ts Distinguishes unsupported container/codec; guards duration-metadata test based on decode capability.
src/​vs/​workbench/​contrib/​issue/​test/​browser/​issueFormService.test.ts Derives expected upload repository from product configuration instead of hardcoding OSS casing.

Review effort: Lite

readonly _serviceBrand: undefined;
get isSupported(): boolean {
return !!this.getMediaRecorderConstructor() && !!this.getMediaDevices()?.getDisplayMedia;
return !!this.getMediaDevices()?.getDisplayMedia && this.getSupportedFormats().length > 0;
Comment on lines +83 to +84
protected canPlayType(mimeType: string): boolean {
return mainWindow.document.createElement('video').canPlayType(mimeType) !== '';
Comment on lines +107 to 108
} else if (this.isFormatSupported(MediaRecorder, 'video/webm')) {
formats.push({ mimeType: 'video/webm', label: 'WebM', extension: 'webm' });
const durationTag = bytes.findIndex((value, index) => value === 0x44 && bytes[index + 1] === 0x89 && bytes[index + 2] === 0x88);
bytes[durationTag] = 0xEC;
pane.videoDecoder = (_resource, token) => readIssueReporterVideo(`data:video/webm;base64,${encodeBase64(VSBuffer.wrap(bytes))}`, token);
pane.videoDecoder = async () => ({ width: 48, height: 32, durationMs: 500, thumbnailDataUrl: issueReporterImageFixture });
@bryanchen-d

Copy link
Copy Markdown
Collaborator

Giuseppe Cianci (@Giuspepe) thanks for the quick fix. I validated it under product-build conditions (ADO def 111, CI mode, publish off) on this PR's head in 487783. All 10 casing tests pass now. 3 WebM tests still fail on Linux, Windows and macOS:

  • Issue reporter media decoding › decodes real webm or explicitly rejects an unsupported container or codec…: The video could not be decoded
  • Issue reporter media decoding › does not invent a duration for a WebM recording without duration metadata: same error
  • NativeRecordingService › only advertises and round-trips playable video/webm without OS capture: PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open context failed

On the shipped feed Electron, the demuxer can't open WebM at all, while MediaRecorder.isTypeSupported and canPlayType still report support. To keep tonight's insider green, I opened #343360, which skips only those 3 tests and links #343345. Please approve it, or push an equivalent if you'd rather handle it differently (for example, accept "explicitly rejects" for WebM and gate the round-trip on actually decoding a known WebM clip).

Co-authored with Copilot

Bryan Chen (bryanchen-d) added a commit that referenced this pull request Oct 21, 2026
Product builds test on the Electron from the `vscode-electron-prebuilt`
feed. There, Chromium can't open any WebM container
(`PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open
context failed`), including a clip MediaRecorder just produced. After
#343343, three tests still require WebM to decode and keep main red on
every OS (def 111 run 487783). Skip only those, linking #343345.

Also make the recording test's `.timeout` safe when it's skipped:
`test.skip` returns nothing in this runner.

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Oct 21, 2026
Product builds test on the Electron from the `vscode-electron-prebuilt`
feed. There, Chromium can't open any WebM container
(`PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open
context failed`), including a clip MediaRecorder just produced. After
#343343, three tests still require WebM to decode and keep main red on
every OS (def 111 run 487783). Skip only those, linking #343345.

Also make the recording test's `.timeout` safe when it's skipped:
`test.skip` returns nothing in this runner.

Co-authored-by: Copilot <[email protected]>
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.

4 participants