Repository navigation
#337 - StopTask: a process stopped on purpose ends as stopped, not as failed - #338
Merged
Merged
Conversation
…ask stops its state with a ProcessStoppedException, so that the process manager throws a ProcessFailedException (fail event, non-zero exit code, failure of the parent process_executor task). Update documentation and tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rocess is not a failure Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… failed: stopped history, "Process <code> stopped" log at the success level, ProcessEvent::isProcessStopped() on the end event Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 23, 2026
Closed
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.
Description
Fixes #337.
A process stopped by the
stoptask is stopped on purpose, not failed: it still ends normally (tasks finalized,cleverage_process.endevent, exit code 0, parent process going on), and is now clearly identified as stopped.ProcessHistory: newSTATE_STOPPEDstate,setStopped()andisStopped().StopTaskflags the history as stopped instead of failed.ProcessManager:Process <code> stoppedlog at thesuccess_level(wasProcess <code> failedat thefailed_level); a process failing after a stop still ends as failed.ProcessEvent::isProcessStopped(): set on thecleverage_process.endevent of a stopped process (only this process, not its parent). Used by cleverage/ui-process-bundle to record the execution as Stopped.stop_task.md(stop vs failure, example on a missing source file),04-advanced_workflow.md(events),01-process_definition.md(log levels).StopTaskTest,ProcessManagerEndLogTest,ProcessManagerProcessHistoryTest(stopped sub-process).The first commit of this PR (making the process fail) is reverted.
Requirements
Breaking changes
Behaviour change, to be mentioned in the
UPGRADE.mdsection of the release: after astoptask,ProcessHistory::getState()returnsstoppedinstead offailed, and the end log isProcess <code> stoppedat thesuccess_levelinstead ofProcess <code> failedat thefailed_level.🤖 Generated with Claude Code