[Bug]: RemoveKey loses entry identity for equal values and produces invalid list indexes
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The payload names regression test cases but not their file paths. Start by locating those tests and the index-free RemoveKey().Filter() implementation, then reproduce the failing equal-value and shared-reference cases. Done means each logical key updates or removes only its own entry, indexed positions remain valid, and the listed regression checks pass; PR #1192 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Please note we can't commit to any timeline.
Describe the bug 🐞
Index-free list changes cannot distinguish different cache keys whose values compare equal, or keys sharing the same object. The new filter fallback selects the first equality match. Refreshing another key can retain an excluded item or update the wrong position. Unindexed update/remove paths also fail list validation/filtering.
Step to reproduce
Create two distinct cache keys with comparer-equal values. Include only the second value in source.Connect().RemoveKey().Filter(predicate), exclude that value, and refresh its key. Also exercise shared references, custom-equal structs, updates, removals and indexed moves.
Regression tests/checks:
EqualValuesAreRefreshed_FilterRemovesTheChangedKey; SharedReferenceIsRefreshed_FilterTracksEachKeySeparately; EqualValueTypesAreRefreshed_FilterRemovesTheChangedKey; EqualValuesAreUpdated_OnlyTheChangedKeyIsReplaced; EqualValuesAreRemoved_OnlyTheChangedKeyIsRemoved; IndexedMovesAndUpdates_KeepEqualValuesAtTheirKeyedPositions
Reproduction repository
https://github.com/reactivemarbles/DynamicData/tree/85ee49cfd54d8782c36ed137886d318e942345c4
Regression tests and fixes:
https://github.com/reactivemarbles/DynamicData/tree/u/dacullop/main/pr-1165-review
Expected behavior
Discarding keys must retain enough positional identity for each logical entry to be changed independently. No excluded entry, unrelated replacement, invalid index, or error should remain.
Screenshots 🖼️
N/A.
IDE
N/A; command-line reproduction.
Operating system
Windows.
Version
.NET SDK 10.0.401; net9.0 test target.
Device
N/A.
DynamicData Version
Main 10.0-preview at 85ee49cfd54d8782c36ed137886d318e942345c4. The related 9.5 candidate is PR #1165 at 3d76872ead1351e423eefb16b5c15e1d1c6c0aa2.
Additional information ℹ️
Repository tests retain excluded entries, select the wrong key, reject negative replacement indexes, or report ArgumentOutOfRangeException on updates/removals. Related to #1119, but the equality fallback additionally turns an exception into silent wrong results.
- Ngôn ngữ chính
- C#
- Star
- 1.9k
- Fork
- 194
- Merge trung bình
- 12 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của reactivemarbles/DynamicData
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
reactivemarbles/DynamicData#1229 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
reactivemarbles/DynamicData#1089 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: ChangeAwareList merges an insert one slot before a pending AddRange, corrupting list order downstreamCó thể đã có người làm @dwcullop đã nhận 9 ngày trước. Đang mởbug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 63/100
reactivemarbles/DynamicData#1225 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Make Avg, StdDev, Maximum and Minimum refresh-aware, consistent with SumCó thể đã có người làm @dwcullop đã nhận 14 ngày trước. Đang mởbreaking change enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
reactivemarbles/DynamicData#1214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
reactivemarbles/DynamicData#1196 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của reactivemarbles/DynamicData
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
immichFrame/ImmichFrame#735 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dimitar-radenkov/Pointframe#318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DotHarness/dotcraft#546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a-corriger bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
christian-raj/S-Aloha#303 · 1 bình luận ·
-
Input editor says "Apply Changes" even when no changes have been made.Có thể đã có người làm @hcooper đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
MobiFlight/MobiFlight-Connector#3526 ·
Maintainer thường phản hồi trong vòng 1 ngày