Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors internal async/event-stream plumbing and adds a small utility to prevent unobserved task exceptions from “detached” background work, particularly around event-stream cancellation scenarios.
Changes:
- Added
TaskExtensions.ObserveException()to explicitly observe faults from tasks that may be abandoned after cancellation. - Refactored pull/push event stream implementations to reduce detached-task/unobserved-exception risk and simplify flow.
- Renamed
Channel<T>members for clearer semantics and updated affected call sites; adjusted related docs/comments and added a non-parallel test collection for global-state observation.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Readme.md | Minor punctuation tweak in documentation (i.e.,). |
| CliWrap/Utils/Extensions/TaskExtensions.cs | New helper to observe task exceptions via a fault-only continuation. |
| CliWrap/Utils/Channel.cs | Renames channel API/fields (Publish→Transmit, ReportCompletion→Close) for clearer intent. |
| CliWrap/EventStream/PushEventStreamCommandExtensions.cs | Refactors push-based event stream completion/error signaling and observes detached faults. |
| CliWrap/EventStream/PullEventStreamCommandExtensions.cs | Refactors pull-based event stream to close channel reliably and await command completion to avoid unobserved exceptions. |
| CliWrap/CommandResult.cs | Minor punctuation tweak in XML docs (i.e.,). |
| CliWrap/Command.Execution.cs | Improves stdin piping cancellation path to avoid unobserved exceptions after early cancellation. |
| CliWrap/Buffered/BufferedCommandExtensions.cs | Small refactor/cleanup of buffered execution pipeline wiring. |
| CliWrap.Tests/TestCollections.cs | Adds a non-parallel xUnit collection for tests observing global state. |
| CliWrap.Tests/CancellationSpecs.cs | Updates the race-condition regression test for unobserved task exceptions and disables parallelism for the suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 27, 2026
tom-wolfe
pushed a commit
to nschema-org/NSchema.Build
that referenced
this pull request
Jul 30, 2026
Updated [CliWrap](https://github.com/Tyrrrz/CliWrap) from 3.10.2 to 3.10.3. <details> <summary>Release notes</summary> _Sourced from [CliWrap's releases](https://github.com/Tyrrrz/CliWrap/releases)._ ## 3.10.3 <!-- Release notes generated using configuration in .github/release.yml at 3.10.3 --> ## What's Changed ### Bugs * Fix a race condition inside PullEventStream by @kvpt in Tyrrrz/CliWrap#337 * Fix issues with runaway tasks and broken iterators by @Tyrrrz in Tyrrrz/CliWrap#338 ## New Contributors * @kvpt made their first contribution in Tyrrrz/CliWrap#337 **Full Changelog**: Tyrrrz/CliWrap@3.10.2...3.10.3 Commits viewable in [compare view](Tyrrrz/CliWrap@3.10.2...3.10.3). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Jul 30, 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.
General description
This PR improves reliability around command cancellation and event streaming.
It ensures that commands behave predictably when event consumers stop listening, avoids unobserved background failures, makes pull- and push-based event streams more consistent, and clarifies the dummy text generator’s output semantics.
Behaviors that changed