Skip to content

RELOPS-2248: Suppress focus-stealing notifications on win11-64-24h2#1084

Open
jwmossmoz wants to merge 3 commits intomasterfrom
bug-2002658-suppress-focus-stealers
Open

RELOPS-2248: Suppress focus-stealing notifications on win11-64-24h2#1084
jwmossmoz wants to merge 3 commits intomasterfrom
bug-2002658-suppress-focus-stealers

Conversation

@jwmossmoz
Copy link
Contributor

@jwmossmoz jwmossmoz commented Mar 2, 2026

RELOPS-2248 / Bug 2002658

Summary

  • Fix WER registry key path that was writing DontShowUI to a phantom key (Windows\Error\Reporting instead of Windows Error Reporting)
  • Disable the Windows notification center and suppress toast notifications via Group Policy
  • Remove SecurityHealthSystray from startup (triggers "device at risk" toasts from WscDataProtection COM errors)
  • Disable RecoverabilityToastTask and WhesvcToast scheduled tasks

These are the focus-stealing sources identified on live win11-64-24h2 workers that cause test_autoplay_policy_key_blacklist.html and other focus-sensitive tests to hang indefinitely.

Context

Bug 2002658 tracks intermittent hangs in synthesizeKeyAndWait() across multiple autoplay tests on win11-64-24h2. Investigation on a live worker found:

  1. SecurityHealthSystray.exe is in the Run key and WscDataProtection COM errors fire every minute (Event 10016), triggering toast notifications
  2. Toast notifications are globally enabled with no suppression at any level
  3. WER DontShowUI was written to the wrong registry path (three separate subkeys instead of the single "Windows Error Reporting" key)
  4. RecoverabilityToastTask and WhesvcToast scheduled tasks can show focus-stealing toasts

No new profiles or role changes needed. disable_notifications and error_reporting are already included in win11-64-24h2 roles, and disable.ps1 already runs for Azure workers.

Test plan

  • Build a new win11-64-24h2 image from this branch
  • Verify on a live worker: reg query "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI returns 1
  • Verify: reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v DisableNotificationCenter returns 1
  • Verify: reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SecurityHealth returns not found
  • Verify: Get-ScheduledTask RecoverabilityToastTask shows Disabled
  • Run try push with autoplay tests on the new image

Fix WER registry key path (was writing DontShowUI to wrong key),
disable toast notifications via Group Policy, remove SecurityHealthSystray
from startup, and disable RecoverabilityToastTask/WhesvcToast scheduled tasks.
@jwmossmoz jwmossmoz changed the title Bug 2002658: Suppress focus-stealing notifications on win11-64-24h2 RELOPS-2248: Suppress focus-stealing notifications on win11-64-24h2 Mar 2, 2026
Moves ensure => absent before key in SecurityHealth registry value.
registry::value (defined type) doesn't support ensure => absent.
Use the native registry_value type with full key path instead,
matching the pattern in disable_defender_smartscreen.pp.
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