Skip to content

[repo-assist] tests: add coverage for side-effect re-execution with independent cancellation tokens - #464

Merged
dsyme merged 1 commit into
mainfrom
repo-assist/improve-cancellation-test-coverage-95cc9a62f209c4b1
Aug 29, 2026
Merged

[repo-assist] tests: add coverage for side-effect re-execution with independent cancellation tokens#464
dsyme merged 1 commit into
mainfrom
repo-assist/improve-cancellation-test-coverage-95cc9a62f209c4b1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a SideEffects module to TaskSeq.CancellationToken.Tests.fs covering a gap identified while reviewing test coverage: what happens to a taskSeq's side effects when it is enumerated multiple times with independent CancellationTokens (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:

  • Cancelling and disposing one enumerator does not corrupt or block a fresh enumeration of the same taskSeq with a new, non-cancelled token; the body re-runs from scratch and side effects accumulate as expected.
  • Re-iterating with CancellationToken.None after a first pass with an explicit token re-executes the generator body independently (each GetAsyncEnumerator call is a fresh run).

No production code was changed — this is a test-only addition.

Test Status

  • dotnet fantomas . --check: passes
  • dotnet test -c Release --filter FullyQualifiedName~CancellationToken: 19 passed, 0 failed
  • Full build succeeds

AI 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.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38

…cellation tokens

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme
dsyme marked this pull request as ready for review August 29, 2026 13:23
@dsyme
dsyme merged commit 51c5309 into main Aug 29, 2026
12 checks passed
@dsyme
dsyme deleted the repo-assist/improve-cancellation-test-coverage-95cc9a62f209c4b1 branch August 29, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant