fix(shell): raise PowerShell host probe timeout to 15s - #1949
Merged
Conversation
- Attempt 1 keeps the 15s budget; the retry escalates to 45s so a slow-but-finite cold start (Defender scan, loaded CI runner) can resolve instead of timing out twice. - Failed probes now carry ElapsedMs, surfaced in the resolver's exception message, so a future loaded-runner failure reports real timing data instead of a bare 'probe failed (Timeout)'. - TestShellEnvironment caches success only: a failed resolution is retried on the next consumer touch instead of being cached by the CLR as a TypeInitializationException for the process lifetime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes recurring Windows CI cascade where the PowerShell host probe times out under runner load.
Problem
On loaded GitHub-hosted Windows runners,
pwsh.exe/`powershell.exe` spawns can exceed the 5sProbeTimeout. BecauseTestShellEnvironment.Currentis a static, the CLR caches the resultingTypeInitializationException— one slow spawn converts into hundreds of test failures (observed: 252 tests failed in run 31787198785).Prior attempt
PR #1859 added retry-once +
powershell.exefallback + CI pre-warm. It held until sustained runner load exceeded 5s repeatedly; retry only doubled the wait and the static ctor still cached the failure.Fix
Raise
ProbeTimeoutfrom 5s to 15s inPowerShellHostProbe.cs. The probe runs once per process (test) or once at daemon startup — never per tool call — so happy-path latency is unaffected; only the bounded failure path gets slower and still fails loud with both hosts' details.Verification
Netclaw.Daemon.Testsprobe tests reference the constant and adapt automatically.Test-windows-latest(filterFullyQualifiedName~PowerShellHostProbeTests), then the full Windows leg.Closes the mass-failure class from overnight dev merges (shell policy clusters 1-3 already fixed by #1947; this targets the probe cascade).