Summary
TestLoadProviderCommandTimeout consistently takes about 10.2 seconds on Windows even though LoadProviderCommand has a 5-second timeout. The test allows up to 9 seconds on Windows, so it fails.
Reproduction
go test ./internal/config -run '^TestLoadProviderCommandTimeout$' -count=1 -v
Observed repeatedly:
timeout returned after 10.2s, want roughly 5s
Environment: Go 1.26.5, Windows amd64. Observed at upstream commit 6fc1220.
Relevant code
internal/config/command.go: the timer fires after five seconds, calls terminateCommandProcess(cmd), then blocks on <-done.
internal/config/process_windows.go: termination invokes taskkill /T /F and then cmd.Process.Kill().
internal/config/command_test.go: the fixture launches a ten-second PowerShell Start-Sleep child and expects completion within nine seconds on Windows.
Expected behavior
The provider command and its descendants should be terminated promptly after the five-second timeout, and the call should return within the Windows allowance.
Actual behavior
The call returns around the fixture's natural ten-second completion, suggesting the process-tree termination or wait path is not promptly releasing the command.
Suggested fix
Make Windows provider-command termination reliably kill the complete process tree without waiting for the sleeping child to exit naturally. Add a regression assertion that the timeout returns close to five seconds and leaves no child process behind.
Summary
TestLoadProviderCommandTimeoutconsistently takes about 10.2 seconds on Windows even thoughLoadProviderCommandhas a 5-second timeout. The test allows up to 9 seconds on Windows, so it fails.Reproduction
Observed repeatedly:
Environment: Go 1.26.5, Windows amd64. Observed at upstream commit
6fc1220.Relevant code
internal/config/command.go: the timer fires after five seconds, callsterminateCommandProcess(cmd), then blocks on<-done.internal/config/process_windows.go: termination invokestaskkill /T /Fand thencmd.Process.Kill().internal/config/command_test.go: the fixture launches a ten-second PowerShellStart-Sleepchild and expects completion within nine seconds on Windows.Expected behavior
The provider command and its descendants should be terminated promptly after the five-second timeout, and the call should return within the Windows allowance.
Actual behavior
The call returns around the fixture's natural ten-second completion, suggesting the process-tree termination or wait path is not promptly releasing the command.
Suggested fix
Make Windows provider-command termination reliably kill the complete process tree without waiting for the sleeping child to exit naturally. Add a regression assertion that the timeout returns close to five seconds and leaves no child process behind.