Repository navigation
fix: live query entry mix-up with equal items, racy view tests, and README for 7.0 - #422
Merged
Merged
Conversation
- Sorted, grouped and throttled filtered fuzz tests waited only for the last item written, which can show while the view is still changing on its scheduler thread. - The dictionary index burst test ran the queue once, but the dictionary delivers a burst from a background reader. - Both now wait, within a timeout, until the view holds exactly what the source holds.
- Add the Queries namespace to the import lists and a table of what each namespace holds. - List the 7.0 breaking changes in the migration section. - Add sections for deferred notifications, versioned snapshots, source options and the view batch reset limit. - Correct the Reactive2DList description and extend the API overview.
- The README describes the library as it is today. - The upgrade steps, namespace table and breaking changes are in docs/migration-v6-to-v7.md. - Add CodeQL, SonarCloud quality gate, OpenSSF Scorecard and ReactiveList.Reactive package badges.
- The README is packed into the NuGet package, where a relative link does not resolve. - AGENTS.md named a slow-path method that does not exist.
- Removing one of two equal items that are different instances could drop the other one's entry from an unordered live query. - The query then missed an in-place change to the remaining item, so a SelectMany subscription stayed attached. - The projection now finds the entry that holds the same source item instance before it searches by value.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #422 +/- ##
===========================================
+ Coverage 99.98% 100.00% +0.01%
===========================================
Files 151 152 +1
Lines 7611 7619 +8
Branches 1478 1481 +3
===========================================
+ Hits 7610 7619 +9
+ Misses 1 0 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



What this does
Fixes two tests that failed in the Windows SonarCloud job on
main(run 46818962879), fixes a live query bug that a third test found on this PR, and brings the README up to date for 7.0.Live query bug: wrong entry removed among equal items
OrderedList_SubscriptionsBalanceAfterAnyMutationstimed out on macOS on this PR's first run. It uses random scripts, and one rare script hit a real fault.When a source held two items that were equal by value but were different instances, removing one could drop the other one's entry from an unordered live query. The query then tracked an item that was no longer in the source. An in-place change to the remaining item was not seen, so a
SelectManysubscription stayed attached after its item left the filter.The projection now looks for the entry that holds the same source item instance first, and falls back to the search by value. Value type sources are unchanged. New tests cover the case directly and the comparer on its own.
README
docs/migration-v6-to-v7.md, which also lists the 7.0 breaking changes: sealed classes, no quaternary base class,Reactive2DList<T>not deriving fromReactiveList<ReactiveList<T>>, filtered view order, and parameter names.ReactiveList.Reactivepackage, in the same style as the existing ones.Queriesnamespace to the import lists, with a table of what each namespace holds.BatchResetLimit.Reactive2DList<T>description and extends the API overview, thread safety and performance tables.SortedView_Throttled_ConvergesToSortedSourceThe test waited until the view held the last item written, then compared the view with the source. The view changes on its scheduler thread, and the last item sorts ahead of the others, so it can show before the rest of the items are in place. The failing run saw 3 of 6 items.
The test now waits until the view holds exactly the source items, then checks the order. The grouped and throttled filtered fuzz tests used the same wait, so they get the same change.
QueuedBurst_PreservesAllCurrentKeysAndValuesThe test waited for the first queued callback, ran the queue once, then asserted. The dictionary delivers a burst from a background reader, so the first callback can cover only part of the burst. The failing run saw the value from update 60 of 100.
QueuedViewSequencergainsRunUntilAsync, which runs the queue until a condition holds or a timeout passes. The test uses it to wait until the view matches the source.Verification
ReactiveList.Tests(2,488) andReactiveList.Reactive.Tests(2,518) pass on Linux.ReactiveList.Testspass three times in a row on Linux, and the sorted view tests pass with the failing seede4Yk7-44vIob.ReactiveListTestApp.Teststargets Windows only. It builds on Linux but cannot run there, so the Windows CI job is the check for that test.