-
Notifications
You must be signed in to change notification settings - Fork 74
bytes & OrphanedEnvelope extractor, add delegate_visitor macro
#2868
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
Conversation
|
This PR is part of a stack of 12 bookmarks:
Created with jj-stack |
|
Claude finished @insipx's task —— View job Code ReviewReview Date: December 11, 2025, 03:30 UTC Key Findings1. Missing
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2868 +/- ##
==========================================
- Coverage 73.98% 73.80% -0.19%
==========================================
Files 398 401 +3
Lines 50905 51274 +369
==========================================
+ Hits 37661 37841 +180
- Misses 13244 13433 +189 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
71ae3cb to
d0c6474
Compare
5895dcb to
40377cf
Compare
d0c6474 to
2a525e0
Compare
40377cf to
25263b8
Compare
2a525e0 to
4aa9e3f
Compare
40bd8fd to
4937bec
Compare
25263b8 to
0c31f49
Compare
4937bec to
87e1f12
Compare
0c31f49 to
fb4c2e6
Compare
87e1f12 to
820c628
Compare
fb4c2e6 to
58800c8
Compare
820c628 to
4a0203c
Compare
fbd3486 to
9076a06
Compare
f13537d to
5814a9d
Compare
74f8e3d to
411c071
Compare
191eb3a to
9164a3f
Compare
411c071 to
7673dfb
Compare
9164a3f to
e9ce2c6
Compare
7673dfb to
0160848
Compare
e9ce2c6 to
370f70d
Compare
17e7833 to
058f33b
Compare
370f70d to
6bea462
Compare
058f33b to
e05e925
Compare
6bea462 to
9521de6
Compare
…2868) <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will post its summary as a comment. --> ### Add `BytesExtractor`, `OrphanExtractor`, and `delegate_envelope_visitor!` to enable `Envelope::bytes()` and `Envelope::orphan()` across protocol and collection types Introduce new extractors and a delegating macro, extend the `Envelope` and `EnvelopeCollection` traits with `bytes()` and `orphans()`, and wire `orphans()` through subscribe types; update DB icebox queries to handle multiple cursors with idempotent inserts. #### 📍Where to Start Start with the new trait methods in `Envelope` and `EnvelopeCollection` in [xmtp_api_d14n/src/protocol/traits/envelopes.rs](https://github.com/xmtp/libxmtp/pull/2868/files#diff-974a5b6ad5cd0c15ff488b73bf921d7c4b255f5ff3d4f053ab99f1a7bc477ef5) and [xmtp_api_d14n/src/protocol/traits/envelope_collection.rs](https://github.com/xmtp/libxmtp/pull/2868/files#diff-0af39c7627e651b4a4f836c6082762ca4cb70e8992b62695adcd4cb2fa8bd512), then review the extractors in [xmtp_api_d14n/src/protocol/extractors/bytes.rs](https://github.com/xmtp/libxmtp/pull/2868/files#diff-a6cbfd5d967e5d7345d86635f7f820d05712ea8b41434f1179f1f4ad35e0341d) and [xmtp_api_d14n/src/protocol/extractors/orphaned_envelope.rs](https://github.com/xmtp/libxmtp/pull/2868/files#diff-a15a2ff96d5029829ea707ef220be104b97cdc4c2f7a12f085ff7e1d2c5ea3d4), and finally the delegating macro in [xmtp_api_d14n/src/protocol/macros.rs](https://github.com/xmtp/libxmtp/pull/2868/files#diff-b253d53f5aff5a0ddee62ddccdeda11f5959d4f1c3f7ed130e4f047fecf0c91a). ---- <!-- Macroscope's review summary starts here --> <a href="https://app.macroscope.com">Macroscope</a> summarized e05e925. <!-- Macroscope's review summary ends here --> <!-- macroscope-ui-refresh --> <!-- Macroscope's pull request summary ends here -->
Add
BytesExtractor,OrphanExtractor, anddelegate_envelope_visitor!to enableEnvelope::bytes()andEnvelope::orphan()across protocol and collection typesIntroduce new extractors and a delegating macro, extend the
EnvelopeandEnvelopeCollectiontraits withbytes()andorphans(), and wireorphans()through subscribe types; update DB icebox queries to handle multiple cursors with idempotent inserts.📍Where to Start
Start with the new trait methods in
EnvelopeandEnvelopeCollectionin xmtp_api_d14n/src/protocol/traits/envelopes.rs and xmtp_api_d14n/src/protocol/traits/envelope_collection.rs, then review the extractors in xmtp_api_d14n/src/protocol/extractors/bytes.rs and xmtp_api_d14n/src/protocol/extractors/orphaned_envelope.rs, and finally the delegating macro in xmtp_api_d14n/src/protocol/macros.rs.Macroscope summarized e05e925.