Repository navigation
fix(ci): test runner stops the pytest tree when taskkill writes to stderr - #110
Merged
Merged
Conversation
…o stderr Under Windows PowerShell 5.1 with $ErrorActionPreference = 'Stop', `2>&1` on a native command turns its stderr into a terminating NativeCommandError. A graceful `taskkill /T` that cannot close a windowless console child reports it on stderr, so the wrapper aborted with exit 1 before the forced kill and before reporting the budget code (tests/ci/test_packlab_test_runner_behavior.py: 4 failures on main). Stop-PytestTree now uses a local 'Continue' preference; the forced kill path runs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sekiph82
added a commit
that referenced
this pull request
Dec 3, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Root cause of the 4 failures in
tests/ci/test_packlab_test_runner_behavior.pyon main (owner machine).tools/dev/run_packlab_tests.ps1sets$ErrorActionPreference = "Stop". Under Windows PowerShell 5.1,2>&1on a native command turns its stderr into a terminatingNativeCommandError.Stop-PytestTreefirst runs a gracefultaskkill /PID <pytest> /T. For a windowless console child, taskkill cannot close it gracefully and prints "could not be terminated" on stderr. The wrapper then aborted with exit 1 before the forced/Fkill and before reporting the budget exit code (42/43/44).$ErrorActionPreference = "Continue"inStop-PytestTree, so the forced kill path runs. taskkill lines are still written to the log, as plain strings.Evidence: before,
pytest tests/ci/test_packlab_test_runner_behavior.pygave 1 failed and 2 passed with-x(4 fail without-x), withassert 1 == 42and the NativeCommandError at line 230. After: 6 passed. No leftover contract processes or temp under %TEMP%\PackLab\runner-contract.🤖 Generated with Claude Code