Repository navigation
Fix lost interruption and typed failure leaks when skipping handlers - #8652
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 5f78c3b The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Merged
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.
When a fiber is interrupted while suspended in an uninterruptible region that later fails, the runtime skips surrounding recovery handlers but can leak the typed failure and lose the pending interruption. Preserve the interruption and defects, and strip typed failures when skipping those handlers, including when unwinding reaches an outer uninterruptible handler.
Keep recorded failures when no recovery handler is skipped, preserving existing concurrent traversal and child cleanup behavior. Move the existing cause-combining helper into the core module to avoid a circular runtime import.
Adds three regression tests: a skipped handler drops typed failures but keeps defects and the interruption; an uninterruptible handler past the skipped region observes an interrupt-only cause; and a handler inside the uninterruptible region still recovers. Also adds an
effectpatch changeset, and updates the existing subscription interruption assertion to expect an interrupt-only exit instead of a leaked typed completion signal.Validation:
pnpm test --run packages/effect/test/Effect.test.ts packages/effect/test/SubscriptionRef.test.tspassed (299 tests).pnpm checkpassed.pnpm lint-fixpassed.Fixes #8650.
Closes EFF-1634