Skip to content

Deliver source errors through parallel SubscribeMany and the specialised aggregators - #51

Merged
ViktorJannicke merged 5 commits into
mainfrom
fix/error-forwarding-1208-1209
Nov 19, 2026
Merged

ViktorJannicke merged 5 commits into
mainfrom
fix/error-forwarding-1208-1209

Conversation

@ViktorJannicke

Copy link
Copy Markdown

Fixes #47
Fixes #48

Ports ahead of a sync (docs/maintenance.md, "Urgent fixes"). Both upstream PRs are open, so each is cited in an adapted commit rather than cherry-picked, with its regression translated to TUnit.

Commits

  1. Parallel SubscribeMany rethrows source errors instead of delivering them #47 ← upstream Fix that parallel SubscribeMany throws source errors instead of delivering them reactivemarbles/DynamicData#1208 (47694543): PSubscribeMany subscribed its internal Transform(...).DisposeMany() with a bare Subscribe(), so a source error was rethrown to the producer and never reached the subscriber. It now ignores terminal events, as DD-027 does for GroupOn/TreeBuilder. Regression: SubscribeManyFixture.ParallelisedSubscribeManyFailsWhenTheSourceFails. This is a behaviour change: the error arrives as OnError instead of being thrown.
  2. Sorted, paged and distinct AsAggregator rethrow source errors instead of recording them #48 ← upstream Fix that the specialised aggregators throw source errors instead of recording them reactivemarbles/DynamicData#1209 (8b1a975d): the sorted, paged and distinct AsAggregator helpers now use one subscription for messages and the error, and their summary ignores terminal events, matching ChangeSetAggregator and the virtual aggregator. Regression: new Cache/AsAggregatorFixture (4 tests). Public API unchanged.
  3. Register: DD-047 and DD-048 in docs/fork-differences.md ("ported ahead of a sync; compare at the next sync"), plus Adopted rows in docs/upstream/README.md.

I left the experimental Watcher's bare Subscribe() alone: its source is an internal cache that never errors.

Validation

  • The new tests fail on main in both flavours: 3 aggregator cases (virtual already passed) and the parallel SubscribeMany case. They pass with the change.
  • Full matrix from the maintenance guide (runic-sdk shell; SDK 10.0.403 via a temporary, uncommitted global.json override, see Pin SDK 10.0.403 and install it into a job-owned root #50):
Primitives DynamicData.Tests DynamicData.Reactive.Tests
8.4.0 4250/4250 4247/4247
9.0.0 4250/4250 4247/4247

dotnet pack succeeds.

Overlap with #49

docs/upstream/README.md is also changed by #49: it moves #47/#48 into "Open gaps", and this PR adds Adopted rows. After #49 merges I'll merge main in and remove the two Open-gaps rows. docs/fork-differences.md changes in both, but in different rows (DD-030 vs new DD-047/048 at the end).

🤖 Generated with Claude Code

ViktorJannicke and others added 5 commits November 19, 2026 11:30
Port of upstream reactivemarbles#1208 (4769454, open), cited
rather than cherry-picked because the fork's file differs.

The ParallelisationOptions overloads of cache SubscribeMany subscribed
their internal Transform(...).DisposeMany() pipeline with a bare
Subscribe(). That subscription is made before the subscriber's, so a
source error was rethrown on the producer's thread and the subscriber
never received OnError. It now ignores terminal events, as DD-027 does for
the internal DisposeMany subscriptions in GroupOn and TreeBuilder, and the
subscriber's own subscription carries them.

ParallelisedSubscribeManyFailsWhenTheSourceFails, translated to TUnit,
fails on main in both flavours and passes with the change.

Fixes #47

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of upstream reactivemarbles#1209 (8b1a975, open), cited
rather than cherry-picked because the fork's files differ.

The sorted, paged and distinct changeset aggregators recorded the error in
one subscription but also subscribed the messages and the
CollectUpdateStats() summary with only an OnNext handler. A source error
was rethrown out of those to whatever raised it, so asserting on Error got
an exception instead. They now match ChangeSetAggregator and the virtual
aggregator: one subscription records messages and the error, and the
summary ignores terminal events. Public API unchanged.

AsAggregatorFixture (new, TUnit) covers all four aggregators. The sorted,
paged and distinct cases fail on main in both flavours and pass with the
change; the virtual case already passed.

Fixes #48

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add DD-047 (parallel SubscribeMany, reactivemarbles#1208) and DD-048 (specialised
AsAggregator helpers, reactivemarbles#1209) as ports ahead of a sync, and map both
upstream PRs to them under Adopted in the upstream summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ViktorJannicke
ViktorJannicke merged commit c1e2832 into main Nov 19, 2026
7 checks passed
@ViktorJannicke
ViktorJannicke deleted the fix/error-forwarding-1208-1209 branch November 19, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant