fix: cancel chat runs when deleting conversations (#90)#92
Open
aiis2 wants to merge 6 commits into
Open
Conversation
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.
Why
Deleting a streaming conversation removed its UI/DB row but left the agent controller and
ask_userresolver alive. Deleted runs could continue tools, remain stuck awaiting input, and leave global streaming state with no visible Stop target. A second race allowed a run deleted during message persistence to start later, after its conversation was already gone.What changed
ask_userwith__ABORT__and aborts only its controller.isStreaming, and clear target-owned question/turn state.abortedand owns cleanup.ask_user, and the pre-start deletion race.Issue
Closes #90
Mainline
Implementation branch created from authoritative
origin/master@fdc1cc3after Spec PR #91 merged. The repository has noorigin/main.TDD evidence
ask_userdid not settle).runReactAgentstill started after deletion during persistence).Verification
node --test tests/*.test.cjs(162 pass)npx tsc --noEmitnpx tsc -p src/main/tsconfig.json --noEmitnpx vite build(2346 modules)node scripts/smoke-report-preview-isolation.cjs --expect-isolatednode scripts/smoke-export-origin-isolation.cjs --expect-isolatednode scripts/smoke-export-runtime-compatibility.cjs --expect-isolatedgit diff --check origin/master...HEAD