[repo-assist] tests: add coverage for side-effect re-execution with independent cancellation tokens - #464
Merged
dsyme merged 1 commit intoAug 29, 2026
Conversation
…cellation tokens Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
marked this pull request as ready for review
August 29, 2026 13:23
dsyme
approved these changes
Aug 29, 2026
dsyme
deleted the
repo-assist/improve-cancellation-test-coverage-95cc9a62f209c4b1
branch
August 29, 2026 13:47
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
注册 for free
to join this conversation on GitHub.
Already have an account?
登录 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
Adds a
SideEffectsmodule toTaskSeq.CancellationToken.Tests.fscovering a gap identified while reviewing test coverage: what happens to ataskSeq's side effects when it is enumerated multiple times with independentCancellationTokens (including one that was cancelled and disposed). This complements the existing cancellation-propagation tests in the same file, which only check that cancellation throws — not whether re-enumeration state and side effects behave correctly afterwards.Two new tests:
taskSeqwith a new, non-cancelled token; the body re-runs from scratch and side effects accumulate as expected.CancellationToken.Noneafter a first pass with an explicit token re-executes the generator body independently (eachGetAsyncEnumeratorcall is a fresh run).No production code was changed — this is a test-only addition.
Test Status
dotnet fantomas . --check: passesdotnet test -c Release --filter FullyQualifiedName~CancellationToken: 19 passed, 0 failedAI disclosure
This PR was created by Repo Assist, an automated AI assistant, as part of routine testing improvements (Task 5: Coding Improvements / test coverage). A human maintainer should review before merging.
Add this agentic workflow to your repo
To install this agentic workflow, run