Settle an rx generator operation whose stream ends without yielding - #1192
Open
philippjfr wants to merge 2 commits into
Open
Settle an rx generator operation whose stream ends without yielding#1192philippjfr wants to merge 2 commits into
philippjfr wants to merge 2 commits into
Conversation
_resolve_async only reconciled the generations inside the async for body, so a stream that ends without yielding for the current inputs left the node in flight forever even though nothing was running. Claim the generation when the loop completes without having produced a value and mark the node skipped, matching an operation that raises Skip and the reference-fed route, which already settles.
philippjfr
commented
Sep 11, 2026
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.
An
rxnode whose operation is a generator stays "in flight" forever when the stream ends without yielding a value for the current inputs.This PR adds ensures that when the loop completes without having produced a value it marks the node skipped so the value it computed from earlier inputs is not propagated as if it were current. That is the same outcome as an operation raising
Skip: the pipeline responded to the current inputs by declining to produce a value, and the previous value standsThe stuck flag is observable through
.rx.awaiting, and it also wedges anything built on the same generation machinery, so a consumer polling for an expression to settle waits forever instead of learning that no value is coming.AI Disclosure
Tool & Model: Kilo Code + Claude Opus
Usage: Diagnosed the stuck generation from the observable
awaitingbehavior, wrote the fix and the tests, and confirmed the tests fail without the fix.Checklist