Repository navigation
Don't call -JobAbortCleanup for a job whose -JobFinalize threw - #48
Merged
Merged
Conversation
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: when
-JobFinalizethrew, the job it was finalizing was still in the running list, so the teardown treated it like a job it had killed and called-JobAbortCleanupon it. That callback is documented for a job an abort killed or kept from starting ("remove its partial output"), so a cleanup that deletes output files could delete a finished job's real output.What changed: the dispatcher remembers which job
-JobFinalizeis working on (in all three finalize passes). If the callback throws, the teardown skips-JobAbortCleanupfor that job but still gives back its slot and disposes its process. Jobs the teardown kills get the cleanup as before.Tested: new harness assertion, failing before the fix on 5.1 and 7. A finished job's
-JobFinalizethrows while acmd /c pingjob runs, with a shared 2-slot budget. Before the fix the cleanup ran for both jobs (run,done); after, only for the killed one (run). Nothing was left running and both slots came back. Full harness passes on Windows PowerShell 5.1 and PowerShell 7.🤖 Generated with Claude Code