Fix asynchronous Retry via Relay fallback - #149
Merged
Conversation
Contributor
Greptile SummaryThe PR adds one-shot asynchronous propagation fallback for opportunistic sends while preserving the canonical message identity and delivery metadata.
Confidence Score: 5/5The PR appears safe to merge based on the eligible follow-up review scope. No blocking failure remains in the available follow-up review record. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as MessagingViewModel
participant Backend as PythonRNSBackend
participant Bridge as PythonBridge
participant LXMF as rns_bridge.py / LXMRouter
participant Repo as MessageRepository
UI->>Backend: send opportunistic + propagated fallback policy
Backend->>Bridge: sendOpportunistic(...)
Bridge->>LXMF: send_opportunistic(...)
LXMF-->>UI: queued(canonical hash)
alt Opportunistic attempt fails asynchronously
LXMF->>LXMF: repack same LXMessage for propagation
LXMF->>LXMF: enqueue propagated attempt
LXMF-->>Repo: sent(method: propagated)
LXMF-->>Repo: delivered or failed
else Recipient proof arrives first
LXMF-->>Repo: delivered(method: effective transport)
LXMF->>LXMF: cancel deferred fallback
end
Repo-->>UI: persist monotonic state and refresh alias/detail
Reviews (2): Last reviewed commit: "test: fix native delivery proof compilat..." | Re-trigger Greptile |
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.
Summary
LXMessageonce as propagated, preserving its canonical hash and structured payloadsent) from recipient delivery (delivered), persist the propagated method, and emit terminal failure when propagation is unavailable or failsdeliveredcallback with no observed intermediatesent, and keep an already-open detail page synchronizedFixes #146.
Verification
propagation_packedremained absent, 7 passedsentsuppressed recipient proof, deferred fallback ignored authoritative delivery, and canonical detail aliasing was absentfailedsuppressed later recipient proof and buffered proofs lost effective transport metadatad1a30ad7app source compiled with zero compiler errors; the low-space outer-signing failure was completed with the generated entitlements, then exact bridge equality, strict signature verification, installation, launch, and process readback passedTests.static.test_async_propagation_fallback; exact-head native integration test execution remains pending hosted CI because local task-volume storage prevented the device test bundle from reaching test compilationsentand 2deliveredevents, reproducing the missing-method path without exposing message content or identitiesRemaining manual check
Risk and rollback
The change is limited to the shipping Python LXMF send path and its Swift policy/event-persistence seam. The retry is one-shot, hash-guarded, and fails closed when no propagation node is configured, repacking fails, the hash changes, enqueue fails, or the propagated attempt later fails. Rollback is to revert this PR.