fix(llm): preserve pre-aborted signals in local provider health checks (#2110) - #2590
Open
turkonthelurk wants to merge 3 commits into
Open
turkonthelurk wants to merge 3 commits into
turkonthelurk wants to merge 3 commits into
Conversation
AbortSignal does not replay an earlier abort to a later listener, so the shared Ollama/LM Studio health wrapper could start provider work after the caller had already cancelled. Check the caller signal before starting the timer or operation, abort the derived controller with the same reason, and keep listener cleanup for later aborts. Co-authored-by: turk <turkonthelurk@users.noreply.github.com>
This was referenced Sep 18, 2026
Parameterize pre-abort and setup-race coverage through one helper so SonarCloud new-code duplication stays under the quality gate. Co-authored-by: turk <turkonthelurk@users.noreply.github.com>
Share the in-flight and live-signal assertions through one helper and stop cloning the token-accounting abort-reason construction so Sonar new-code duplication stays under the quality gate. Co-authored-by: turk <turkonthelurk@users.noreply.github.com>
|
turkonthelurk
marked this pull request as ready for review
September 18, 2026 10:48
This branch has not been deployed
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 #2110
Draft for review only. Not to be merged by automation; a maintainer decides when and whether it lands. Opened from fork
turkonthelurk/agenc-core. Nothing pushed tomainon either repo. Based on upstreammainonly. Independent of #2109 and #2112.Problem
The shared local-provider health wrapper listened for later aborts but never checked a signal that was already aborted.
AbortSignaldoes not replay an earlier abort to a later listener, so Ollama/LM Studio operations could begin and complete after cancellation when the signal was aborted before entry.Verified still present on upstream
mainat6a2a92dbefore changing anything.Change
runLocalProviderHealthSidecarnow:params.signal.abortedparams.signal.reasonTests
Hermetic
tests/llm/providers/shared/local-health.test.ts: 11/11 passed (red-green: pre-abort and setup-race cases failed onmainwrapper). Related Ollama/LM Studio provider tests: 38/38 passed.This does not merge.
Opened from fork
turkonthelurk/agenc-core. Companion fork PR (to close): turkonthelurk#29