Conversation
Review Summary by QodoImprove message retry handling and remove time skew logic
WalkthroughsDescription• Remove NIP-17 time skew logic in favor of limit-based queries • Add retry queuing for failed invite message deliveries • Support legacy payload format deserialization in retry messages • Improve retry identity resolution with fallback strategies • Simplify contact publishing logic in WASM initialization Diagramflowchart LR
A["Failed Invite Delivery"] -->|"Queue for Retry"| B["Retry Message Queue"]
B -->|"Deserialize with Fallback"| C["EventEnvelope or Legacy Format"]
C -->|"Resolve Identity"| D["Send Retry Message"]
E["Remove Time Skew"] -->|"Use Limit Query"| F["Simplified Event Filtering"]
File Changes1. crates/bcr-ebill-api/src/constants.rs
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
This PR improves Nostr delivery reliability by queuing failed private invite/block notifications for retry, adjusts retry logic to resolve recipients more flexibly, and removes the prior NIP-17 DM time-slack approach in favor of limit-based DM subscriptions.
Changes:
- Queue failed private company/bill invite sends (and bill notifications) into the retry queue with a consistent
EventEnvelopepayload format. - Add retry support for legacy queued private payloads and expand retry recipient resolution to use Nostr contacts even without trust.
- Remove the Nostr event time-slack constant and simplify time filtering logic.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/bcr-ebill-wasm/src/lib.rs | Simplifies/changes contact publishing behavior during transport startup/reconnect. |
| crates/bcr-ebill-transport/src/transport_service.rs | Adds tests covering retry behavior (nostr contact without trust + legacy payload format). |
| crates/bcr-ebill-transport/src/nostr_transport.rs | Updates retry payload format to EventEnvelope, supports legacy decode, and adds resolve_retry_identity. |
| crates/bcr-ebill-transport/src/nostr.rs | Removes time-slack logic and simplifies valid_time filtering. |
| crates/bcr-ebill-transport/src/block_transport.rs | Queues failed private invite sends for retry (instead of failing the call). |
| crates/bcr-ebill-api/src/constants.rs | Removes NOSTR_EVENT_TIME_SLACK constant. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #836 +/- ##
==========================================
+ Coverage 70.39% 70.48% +0.08%
==========================================
Files 132 132
Lines 24836 24821 -15
==========================================
+ Hits 17484 17494 +10
+ Misses 7352 7327 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📝 Description
Fixes invite delivery when on chain create all messages are undelivered. Completely removed NIP-17 time skew in favor of a limit query. More error logging for retry sending. Ensure published contact are updated.
Relates to #621
✅ Checklist
Please ensure the following tasks are completed before requesting a review:
cargo fmt.cargo clippy.📋 Review Guidelines
Please focus on the following while reviewing: