[repo-assist] Investigate #452: add regression tests for dynamic-path scheduler bug - #458
Merged
dsyme merged 1 commit intoAug 25, 2026
Conversation
…item bug
Adds TaskSeq.Issue452.Tests.fs with two tests that wrap an externally
produced IAsyncEnumerable<'T> (via TaskSeq.map and via a
taskSeq { for .. in .. do yield .. } combinator) while running on a
custom single-threaded TaskScheduler, mirroring the shape of the
reported Orleans scenario in #452.
Both tests currently pass -- despite several deliberate attempts
(custom TaskScheduler, custom SynchronizationContext, artificial async
delays) the reported duplicated-final-item behaviour could not be
reproduced outside of Orleans' own per-activation scheduler. The tests
are kept as a regression guard and a documented investigation trail.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
marked this pull request as ready for review
August 24, 2026 21:19
dsyme
deleted the
repo-assist/investigate-issue-452-dynamic-scheduler-bug-c2625a32af993f79
branch
August 25, 2026 00:33
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Investigates the "dynamic implementation" bug reported in #452 (final item duplicated when consuming an externally-produced
IAsyncEnumerable<'T>wrapped intaskSeq/TaskSeq.map, observed inside Orleans grain activations running on a customTaskScheduler).Investigation performed
global.jsonroll-forward) and SDK 10.0.400 — no reproduction of the reportedNotImplementedException/ forced-dynamic-path compiler regression in this repo's own test project under either SDK.taskSeqyield/consume — correct.IAsyncEnumerablewrapped bytaskSeq, consumed normally — correct.TaskScheduler(mimicking Orleans' per-activation scheduler) — correct.SynchronizationContextwith artificial async delays inMoveNextAsync— correct.What this PR adds
TaskSeq.Issue452.Tests.fs— two regression tests that wrap a hand-written externalIAsyncEnumerable<int>(withMoveNextAsynccompleting viaTask.Run, similar in shape to Orleans' grain extension) usingTaskSeq.mapand using ataskSeq { for .. in .. do yield .. }combinator, while running on a custom single-threadedTaskScheduler. Both tests currently pass (no duplication observed), so they are not marked skipped — they serve as a documented regression guard and investigation trail, capturing the closest offline approximation of the reported scenario.Trade-offs / limitations
NotImplementedException" report also did not reproduce in this repo and, per a maintainer's (majocha) earlier comment on the issue, is more likely an F# compiler regression that should be reported todotnet/fsharprather than fixed here.Test Status
dotnet build src/FSharp.Control.TaskSeq.sln -c Release— succeeded, 0 warnings/errors.dotnet fantomas . --check— clean.dotnet test src/FSharp.Control.TaskSeq.Test/FSharp.Control.TaskSeq.Test.fsproj -c Release— 5432 passed, 2 skipped (pre-existing), 0 failed.Related: #452
Add this agentic workflow to your repo
To install this agentic workflow, run