Repository navigation
Report repeated batch start failures once, with a count - #33
Merged
Merged
Conversation
A batch whose program isn't installed printed one identical red line per command, naming dispatcher internals the caller never touched. Now the first failure for a program and cause prints in full, and one line at the end counts the rest. Every command is still tried and still gets its own StartError. Repeats are matched on the file path and Windows' error code, not the message, because on PowerShell 7 the message for one failure differs by working directory. Start-PkProcess now keeps the original exception as the inner one. A bad TimeoutSeconds key on a dispatcher job no longer blames the JobStarter, which never ran. The dispatcher still reports each failed start, since custom starters can throw anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was wrong
A batch whose program isn't installed printed one identical red line per command, so 5,000 commands gave 5,000 lines. Each line named
ProcessDispatchandJobStarter, which batch users never touch. Separately, a badTimeoutSecondskey on a dispatcher job blamed theJobStarter, which never ran.What changed
Invoke-PkProcessBatch: 4 more commands couldn't start 'x' (The system cannot find the file specified).StartError, soResultsdoesn't change.Start-PkProcesskeeps the original exception as the inner one so the code can be read.-OnCompletethrows or an abort ends the batch.ProcessDispatch: a job couldn't start: ....StartFailureReportedis a new reserved job key.-OnCompletewon't reach the total if commands couldn't start.Behavior to note
Set-PkMessageHandlersees fewer. Count fromResultsinstead.Testing
Harness passes on Windows PowerShell 5.1 and PowerShell 7 (342 assertions, none skipped), run one after the other. 11 of the new assertions failed before the change.
🤖 Generated with Claude Code