-
Notifications
You must be signed in to change notification settings - Fork 74
ordering proptests #2802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ordering proptests #2802
Conversation
|
This PR is part of a stack of 11 bookmarks:
Created with jj-stack |
|
Claude finished @insipx's task —— View job Code Review CompleteReview Date: November 19, 2025, 00:52 UTC SummaryThis PR adds comprehensive property-based tests for ordering with dependency resolution, renames Issues Found1. Logic Bug in The filter logic appears inverted in xmtp_api_d14n/src/protocol/order.rs:84. You're checking if The logic should check if any of the envelope's dependencies (from 2. Missing Coverage for Edge Case in In common/src/retry.rs:189-196, the 3. Proptest Edge Case (Low) In order.rs:221, the test skips envelopes that Positive Observations
Recommendation: Address the critical logic bug in order.rs:84 before merging. The other issues are lower priority but worth considering. |
Align protocol ordering proptests and rename
|
b9af3fe to
3ae81ca
Compare
ef324fa to
77ac644
Compare
3ae81ca to
917b543
Compare
77ac644 to
afeb8c3
Compare
xmtp_api_d14n/src/protocol/order.rs
Outdated
| let mut to_remove = HashSet::new(); | ||
| for (i, m) in missing.iter().enumerate() { | ||
| if unresolved.contains(&m.cursor()?) { | ||
| if !unresolved.contains(&m.cursor()?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter is inverted and uses the wrong cursor. unresolved contains dependency cursors, but we compare each envelope’s cursor(), which retains unresolved entries. Suggest: compare unresolved to each envelope’s missing dependency cursors and drop only envelopes still unresolved; keep those with deps fully resolved.
| if !unresolved.contains(&m.cursor()?) { | |
| if unresolved.contains(&m.cursor()?) { |
🚀 Reply to ask Macroscope to explain or update this suggestion.
👍 Helpful? React to give us feedback.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2802 +/- ##
==========================================
+ Coverage 74.52% 74.62% +0.09%
==========================================
Files 383 384 +1
Lines 49299 49592 +293
==========================================
+ Hits 36740 37007 +267
- Misses 12559 12585 +26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
afeb8c3 to
6f0b52c
Compare
2f6885e to
b293d24
Compare
6f0b52c to
9c1f2f3
Compare
9c1f2f3 to
caab442
Compare
caab442 to
41d2537
Compare
41d2537 to
9f5e2f8
Compare
#2789