Skip to content

[Repo Assist] test: add SideEffects and ImmTaskSeq variant tests for chunkBy/chunkByAsync#396

Merged
dsyme merged 3 commits intomainfrom
repo-assist/test-chunkby-sideeffects-20260420-7b06bb767b100bf2
Apr 20, 2026
Merged

[Repo Assist] test: add SideEffects and ImmTaskSeq variant tests for chunkBy/chunkByAsync#396
dsyme merged 3 commits intomainfrom
repo-assist/test-chunkby-sideeffects-20260420-7b06bb767b100bf2

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist, an AI assistant.

Summary

TaskSeq.ChunkBy.Tests.fs previously had only 11 test scenarios (all in EmptySeq and Functionality modules). This PR adds a SideEffects module and two additional TestImmTaskSeq variant tests, matching the coverage pattern used by other test files like TaskSeq.SplitAt.Tests.fs and TaskSeq.DistinctUntilChanged.Tests.fs.

New tests added

SideEffects module (6 new scenarios):

  • TestSideEffectTaskSeq variant: chunkBy groups all side-effect-seq elements into one chunk under a constant key
  • TestSideEffectTaskSeq variant: chunkByAsync groups all side-effect-seq elements into one chunk
  • TestSideEffectTaskSeq variant: chunkBy id produces 10 singleton chunks from the side-effect seq
  • Projection is called exactly once per element (chunkBy)
  • Projection is called exactly once per element (chunkByAsync)
  • Source is not evaluated before the pipeline is consumed (laziness)

Additional Functionality tests (3 new scenarios × variants):

  • TestImmTaskSeq: each element in its own chunk (via id projection)
  • TestImmTaskSeq: chunkByAsync groups all elements under one key

Test growth

Before After
~11 xUnit scenarios ~22 scenarios
~11 test runs ~170 test runs (including variants)

Test Status

  • Build: ✅ dotnet build -c Release — succeeded (0 warnings, 0 errors)
  • Tests: ✅ dotnet test -c Release — 5223 passed, 2 skipped (pre-existing infrastructure skips)
  • Format: ✅ dotnet fantomas . --check — passed

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

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

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

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

…yAsync

- Add SideEffects module to TaskSeq.ChunkBy.Tests.fs with TestSideEffectTaskSeq
  variant tests for chunkBy and chunkByAsync
- Test that each projection is called exactly once per element
- Test that the source is not evaluated before enumeration
- Add two more TestImmTaskSeq variant tests (each-element-own-chunk, chunkByAsync)

Total new test cases: +121 (grows from ~11 scenarios to 170 xUnit test runs with variants)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review April 20, 2026 02:30
@dsyme dsyme merged commit 645b556 into main Apr 20, 2026
5 checks passed
@dsyme dsyme deleted the repo-assist/test-chunkby-sideeffects-20260420-7b06bb767b100bf2 branch April 20, 2026 02:36
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