You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit tests built on QuickFiler.Test/TestSupport/WinFormsPumpHost.cs start a real WinForms message pump (Application.Run) on a dedicated STA thread and construct real WinForms controls. They fail nondeterministically when the machine is under heavy CPU load, and they display a visible window during an otherwise headless test run.
Environment
OS/version: Windows 11 Pro 10.0.26200
Runtime: .NET Framework 4.8.1, MSTest via vstest.console.exe (VS18 test platform)
Command/flags used: ./scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot . (full-suite run with coverage)
Data source or fixture: QuickFiler.Test/TestSupport/WinFormsPumpHost.cs; affected suites include QfcItemController_InitializationTests (the *ThroughThePumpHost* cases) and WpfDispatcherYieldTests
Steps to Reproduce
Drive the machine to sustained high CPU utilization (observed at approximately 96%).
Run the full MSTest suite with coverage using the command above.
Repeat several times and observe both the pass/fail outcome and the desktop.
Expected Behavior
Unit tests are deterministic and headless. Per .claude/rules/general-unit-test.md, tests must produce the same result given the same inputs and must not depend on real wall-clock timing. No unit test should create a visible window on the developer's desktop.
Actual Behavior
The affected tests failed nondeterministically under load. During baseline capture for issue Bug: quickfiler-search-keystroke-focus-steal #438 on 2026-08-08, six attempts were required to obtain a clean full-suite baseline; the failures were confined to these suites and did not reproduce once the machine was idle.
A visible window appeared during the run, because the host constructs a real WinForms control and pumps a real message loop.
Logs / Screenshots
Attached minimal logs or screenshot
Snippet: no captured failure log is retained; the observation is recorded in the issue Bug: quickfiler-search-keystroke-focus-steal #438 execution report and in .claude/agent-memory/atomic-executor/project_winformspumphost_tests_load_flaky.md. A fresh capture under induced load should accompany the fix.
Impact / Severity
Blocker
High
Medium
Low
Nondeterministic tests are corrosive to an autonomous development workflow: they force repeated full-suite reruns (six were needed for one baseline), and they train reviewers and agents to retry a red suite rather than investigate it, which is exactly the habit that lets a real regression through. The visible window also makes the suite unsuitable for unattended or headless CI execution.
Summary
Unit tests built on
QuickFiler.Test/TestSupport/WinFormsPumpHost.csstart a real WinForms message pump (Application.Run) on a dedicated STA thread and construct real WinForms controls. They fail nondeterministically when the machine is under heavy CPU load, and they display a visible window during an otherwise headless test run.Environment
vstest.console.exe(VS18 test platform)./scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot .(full-suite run with coverage)QuickFiler.Test/TestSupport/WinFormsPumpHost.cs; affected suites includeQfcItemController_InitializationTests(the*ThroughThePumpHost*cases) andWpfDispatcherYieldTestsSteps to Reproduce
Expected Behavior
Unit tests are deterministic and headless. Per
.claude/rules/general-unit-test.md, tests must produce the same result given the same inputs and must not depend on real wall-clock timing. No unit test should create a visible window on the developer's desktop.Actual Behavior
Logs / Screenshots
.claude/agent-memory/atomic-executor/project_winformspumphost_tests_load_flaky.md. A fresh capture under induced load should accompany the fix.Impact / Severity
Nondeterministic tests are corrosive to an autonomous development workflow: they force repeated full-suite reruns (six were needed for one baseline), and they train reviewers and agents to retry a red suite rather than investigate it, which is exactly the habit that lets a real regression through. The visible window also makes the suite unsuitable for unattended or headless CI execution.
Source
From: docs/features/potential/2026-08-08-winformspumphost-tests-load-flaky-visible-window.md