storm: #24 - Global stopRequested flag is never reset between runs#34
Merged
casperpanduro merged 2 commits intomainfrom Mar 16, 2026
Conversation
Contributor
Author
Storm Agent Summary
|
Contributor
Author
|
Fix merge conflicts |
Contributor
Author
Storm Continue Summary
|
Contributor
Author
Storm Continue Summary
|
Contributor
Author
Storm Continue Summary
|
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.
Closes #24
Summary
Global stopRequested flag is never reset between runs
Problem
In
src/core/loop.ts,stopRequestedis a module-level mutable boolean:Once
requestStop()is called it is never reset tofalse. In a single-process run that handles multiple issues sequentially (the default mode), if a stop is requested during issue #1, all subsequent issues (#2, #3, …) will immediately hit theif (stopRequested) breakguard at the start of their first iteration and skip their work entirely — silently producing no output.Suggested fix
Reset
stopRequestedat the beginning of eachprocessIssue/processIssueInDircall, or change the architecture to pass a cancellation signal (e.g.AbortSignal) into the functions instead of relying on module-level state. The latter also makes the code easier to test.Changes
src/commands/continue.tssrc/commands/run.tssrc/core/loop.test.tssrc/core/loop.ts4 files changed, 219 insertions(+), 21 deletions(-)
Considerations
Test Plan
Automatically generated by storm-agent on branch
storm/issue-24-global-stoprequested-flag-is-never-reset-between-r.