Repository navigation
Conversation
This was referenced Oct 19, 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.
Summary
Keep startup and resumption failures connected to the public
runAsync()promise.Iterator construction currently happens before the promise executor, so an iterator factory can throw directly from
runAsync(). During execution, the existing catches cover only twoiterator.next()calls. Default-handler invocation, continuation registration throughonComplete, and interrupt-time iterator advancement can throw outside those catches. After an asynchronous boundary, that throw can reject a discarded continuation promise while leaving the public promise pending.Move iterator construction into the promise executor and use one catch around each complete call to
iterate. The synchronous-effect loop remains iterative.Regression coverage
Effected.allchild factory throwingrunSync()throws and error identity preserved on rejectionAssertions await the public promise and compare its rejection reason with the original error. The baseline also records the independent unhandled rejections created by the escaped continuation throws.
Validation
Node v24.19.0, Vitest 3.0.9, TypeScript 5.8.2.
test/effected.spec.ts: 129/129 passed.The repository-wide runtime suite was not part of this candidate check.
Scope
runSync()is unchanged. This fix rejects the public promise when execution fails; iteratorthrow/returnpropagation and generator cleanup need their own protocol decisions.Related drafts
The default-termination repair in #4 touches the same runner. The local combined settlement candidate passes all 137 tests in
test/effected.spec.ts; preserve its termination checks when combining the drafts.CI
CI run 39260511275 passed for
0a9458d62793c971be74ae534dd8645c931806f2: lint, typecheck, and type-proof/runtime tests on Node 18, 20, and 22.