Repository navigation
fix: a cancelCancellableTasks() in beforeQueue cancels the own tasks queued next - #1884
Merged
Merged
Conversation
…queued next queueOwnTasks() creates a new task status, so a cancelCancellableTasks() called in beforeQueue, before it, was lost and every own task ran. The cancel is applied to the own tasks once queued; the tasks that are not cancellable and the generators composed in beforeQueue still run. 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.
Summary
queueOwnTasks()creates a new task status, so acancelCancellableTasks()called inbeforeQueue, before it, was lost: every own task ran.The use: a generator that, in
beforeQueue, composes other generators (and depends on them) but must not run its own cancellable tasks, like an application generator delegating an application type to a blueprint.queueTasks()creates the task status beforebeforeQueue. WhenbeforeQueuecancels it, the cancel is applied to the own tasks once_queueTasks()queued them.before:queueOwnTasksandqueueOwnTaskslisteners run as before: of the tasks they queue, only the cancellable ones are cancelled.beforeQueuestill run.beforeQueuenothing changes;startOver()is unchanged.Test plan
eslint,prettier,buildvitest: a cancel inbeforeQueuewith a generator composed and a task that is not cancellable (they run, the own cancellable task does not; fails without the fix), and the own tasks without a cancel🤖 Generated with Claude Code