fix: harden panic recovery before 0.7.0 - #258
Merged
Merged
Conversation
Semaphore release marks a batch of waiters ready before invoking their wakers. If one callback panicked, the old batch loop dropped the remaining wakers without notifying them, so executors could leave already-granted acquisitions parked forever. Reuse the panic-preserving fan-out helper for semaphore batches and notify-all paths so every waiter gets a wake attempt before the first panic resumes. Signed-off-by: tison <wander4096@gmail.com>
Receiver::recv marked a version seen before invoking T::clone. A panicking Clone therefore made a value disappear from that receiver even though recv never returned. Separate waiting from observation and commit the seen version only after cloning succeeds so callers can recover and retry. Signed-off-by: tison <wander4096@gmail.com>
The existing fan-out entry did not make the semaphore consequence clear, and the watch retry guarantee was absent. Describe both observable fixes so users evaluating the 0.7 upgrade can understand the recovered behavior. Signed-off-by: tison <wander4096@gmail.com>
The private future represents one pending channel change; WaitForChange repeats the waiting action already expressed by its Future role. Rename it to Change so the implementation reads more directly without affecting behavior or public API. Signed-off-by: tison <wander4096@gmail.com>
The watch API is new in 0.7.0, so its pre-release clone-panic behavior was never part of a published contract. Keep the regression test and implementation fix, but omit the development-cycle correction from user-facing release notes. Signed-off-by: tison <wander4096@gmail.com>
The repository had no agent guidance distinguishing release notes from development history. Require comparison with the latest release tag and explicit proof that a bug shipped before adding a bug-fix entry, so unreleased corrections do not leak into the changelog. Signed-off-by: tison <wander4096@gmail.com>
tisonkun
marked this pull request as ready for review
August 31, 2026 17:22
tisonkun
enabled auto-merge (squash)
August 31, 2026 17:22
tisonkun
disabled auto-merge
August 31, 2026 17:22
tisonkun
enabled auto-merge (squash)
August 31, 2026 17:23
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
Design Notes
The changes are limited to two reproduced failure modes and do not add or alter public API surface. The shared fan-out helper remains in
internal::waitset; its conditional compilation now covers semaphore-backed single-feature builds. The watch correction is intentionally omitted from the changelog because watch has not shipped yet. Repository guidance now makes that release-baseline distinction explicit.Validation
cargo x lintcargo x checkcargo x test --no-captureRUSTUP_TOOLCHAIN=1.86.0 cargo x test --no-capturecargo x semver --release-version 0.7.0 --acknowledge-breaking-changescargo publish --package asyncband --locked --dry-runcargo x miri