You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(android): original conversations remain after merged conversation appears #20603
Featurebase report “Conversation Merge Does Not Complete Correctly” (Marcio Vieira; Android, one requester): merging two or more recorded conversations stays in the “Merging…” state while the app remains open. After force-closing and reopening, the merged conversation appears, but the original separate conversations also remain in the list.
The stuck in-session state overlaps #19247, which tracks merge completion being dependent on a push reaching the running app. This issue tracks the distinct post-restart symptom: both the merged result and its source conversations remain visible. Do not assume whether this is server-side incomplete deletion or client-side stale listing without checking the records.
Expected
When a merge succeeds, the merged conversation appears and its source conversations no longer appear separately. The list should settle without restarting the app.
Investigation
Reproduce on a current Android build; test merge completion while app stays foreground, while backgrounded, and with notification delivery unavailable.
Compare server state and a fresh conversation-list API response against the app's visible list after restart.
Verify that source deletion completed before merge completion was reported, and that partial failures do not leave a misleading completed merged row.
Check cache/pagination refresh and event reconciliation; ensure retries are idempotent and preserve transcript/audio integrity.
Android and Omi app versions, approximate merge date/time and timezone, whether a pull-to-refresh changes the list, and conversation IDs sent privately to support. Avoid sharing transcript or audio content in public comments.
I found a reproducible code-level false-success path relevant to this investigation. This is not confirmation of the reporter's root cause.
On main f652ccbefc8ee7968464a9e7a544f6e34d433fba, the final document-deletion exception handler logs the failure and returns normally. The merge caller can consequently continue to manual_merge and the success notification even though a source document was not deleted.
I tested the exact helper extracted from that revision, with all database/storage/memory effects mocked. Injecting RuntimeError("synthetic database unavailable") into the final delete produces AssertionError: RuntimeError not raised for both purge_sync_sources=True and False. No account data or live services were accessed, and I have not reproduced the Android report end to end. I also checked the overlapping open #15953 and #19978; their current patches do not propagate this final deletion failure.
Would you approve a $25 USD bounty for a focused fix and regression coverage of this false-success path? Proposed scope: propagate authoritative source-document deletion failure, prevent the success notification/outcome in that case, and verify the existing failure-phase rule preserves the merged target once destructive source cleanup has begun. Best-effort artifact cleanup would keep its current policy. Full historical-record repair, durable retry design, and confirmation of the reporter's recovery remain separate work; this change alone should not close #20603.
This is an AI-assisted proposal, not a completed PR or an approved reward. PayPal or my existing GitHub Sponsors listing can receive an agreed payout. Please confirm the scope and reward before implementation.
The new tests execute the actual merge worker and cleanup helpers with mocked I/O. Removing the fix gives 4 failed, 5 passed; restoring it gives 9 passed. They cover both deletion branches, failure on either source, preserving the merged target after cleanup starts, withholding success, and the existing best-effort artifact policy. Three adjacent test files also pass: 48 + 8 + 29 cases. The patch applies cleanly to the stated base.
This remains a prototype, not a completed PR or confirmation of the Android reporter's root cause. Full repository checks and real endpoint testing remain unfinished; the offline harness currently needs Java, Redis-server and Typesense prerequisites. The Gist lists those limits. This change alone should not close #20603.
Could you confirm whether this focused fix is an eligible $25 USD paid task, with PayPal payout, before I finish the remaining contribution checks? No reward or assignment is assumed.
I have submitted the complete fix and hermetic regression test suite in PR #21525 (#21525).
Summary of Changes:
Root Cause: _delete_conversation_and_related_data in backend/utils/conversations/merge_conversations.py caught and logged exceptions during conversation document deletion without re-raising. The merge worker continued to record_capture_outcome('manual_merge') and send_merge_completed_message, leaving undeleted source conversations active alongside the merged target.
Propagate Authoritative Deletion Failure: Re-raised exceptions from conversation document deletion so the merge worker enters _handle_merge_failure.
Safe Failure Semantics:
Merged target is preserved (MergeFailurePhase.SOURCE_DELETION_STARTED) to prevent data loss after source cleanup has begun.
manual_merge outcome recording and FCM completion notifications are strictly withheld.
Source conversation statuses are reset back to completed.
Closing the technical issue as completed on main by #21417, merged in 2ea1cf8.
The landed fix covers completion without push, restart recovery, durable same-target cleanup retry, and list/search/pagination/cache reconciliation. Concurrent completions now preserve both targets across offline reopening, with unrelated Undo rows and account/backend fences preserved. Authoritative source-deletion failure already propagates on main and withholds false merge success; #21525 is not required to supply that guard.
The verified PR head f66450e is an ancestor of current main. Required CI passed, including 7,640 Dart tests (four skipped), backend shards and seeded journeys; focused local and Firestore-emulator recovery coverage is recorded in #21417. The main merge/cache/journal implementation retains that verified behavior.
Backend deployment and mobile-release availability have not been verified in this closure. Those rollout checks and any historical-account recovery/customer confirmation remain tracked separately in Featurebase/Support. This closes the engineering defect without claiming that the customer's released build or historical records have already been repaired.
Activity
featurebase-for-github commentedon Oct 4, 2026
This issue is linked to our feedback platform. For feedback and updates, please visit this link.
sprintstate commentedon Oct 4, 2026
I found a reproducible code-level false-success path relevant to this investigation. This is not confirmation of the reporter's root cause.
On main
f652ccbefc8ee7968464a9e7a544f6e34d433fba, the final document-deletion exception handler logs the failure and returns normally. The merge caller can consequently continue tomanual_mergeand the success notification even though a source document was not deleted.I tested the exact helper extracted from that revision, with all database/storage/memory effects mocked. Injecting
RuntimeError("synthetic database unavailable")into the final delete producesAssertionError: RuntimeError not raisedfor bothpurge_sync_sources=TrueandFalse. No account data or live services were accessed, and I have not reproduced the Android report end to end. I also checked the overlapping open #15953 and #19978; their current patches do not propagate this final deletion failure.Would you approve a $25 USD bounty for a focused fix and regression coverage of this false-success path? Proposed scope: propagate authoritative source-document deletion failure, prevent the success notification/outcome in that case, and verify the existing failure-phase rule preserves the merged target once destructive source cleanup has begun. Best-effort artifact cleanup would keep its current policy. Full historical-record repair, durable retry design, and confirmation of the reporter's recovery remain separate work; this change alone should not close #20603.
This is an AI-assisted proposal, not a completed PR or an approved reward. PayPal or my existing GitHub Sponsors listing can receive an agreed payout. Please confirm the scope and reward before implementation.
sprintstate commentedon Oct 5, 2026
@josancamon19 Following my earlier bounty proposal, I now have a reviewable local prototype and regression tests for the specific source-deletion false-success path, based on
9a078331b421b23394af6781f44b983920f68d18.The new tests execute the actual merge worker and cleanup helpers with mocked I/O. Removing the fix gives 4 failed, 5 passed; restoring it gives 9 passed. They cover both deletion branches, failure on either source, preserving the merged target after cleanup starts, withholding success, and the existing best-effort artifact policy. Three adjacent test files also pass: 48 + 8 + 29 cases. The patch applies cleanly to the stated base.
This remains a prototype, not a completed PR or confirmation of the Android reporter's root cause. Full repository checks and real endpoint testing remain unfinished; the offline harness currently needs Java, Redis-server and Typesense prerequisites. The Gist lists those limits. This change alone should not close #20603.
Could you confirm whether this focused fix is an eligible $25 USD paid task, with PayPal payout, before I finish the remaining contribution checks? No reward or assignment is assumed.
fix(merge): propagate source deletion failure in merge worker (BasedH…
test(merge): verify source deletion propagation and failure withholdi…
Dragonire9 commentedon Oct 14, 2026
I have submitted the complete fix and hermetic regression test suite in PR #21525 (#21525).
Summary of Changes:
_delete_conversation_and_related_datainbackend/utils/conversations/merge_conversations.pycaught and logged exceptions during conversation document deletion without re-raising. The merge worker continued torecord_capture_outcome('manual_merge')andsend_merge_completed_message, leaving undeleted source conversations active alongside the merged target._handle_merge_failure.MergeFailurePhase.SOURCE_DELETION_STARTED) to prevent data loss after source cleanup has begun.manual_mergeoutcome recording and FCM completion notifications are strictly withheld.completed.backend/tests/unit/test_merge_source_delete_failure.pycovering deletion propagation, target preservation, withholding of completion notification/outcome, sequential deletion requirements, and best-effort artifact handling.Payout Details:
[email protected]/https://paypal.me/Dragonire9fix(conversations): settle merges and reconcile cached originals with…
aryanorastar commentedon Oct 26, 2026
Closing the technical issue as completed on main by #21417, merged in 2ea1cf8.
The landed fix covers completion without push, restart recovery, durable same-target cleanup retry, and list/search/pagination/cache reconciliation. Concurrent completions now preserve both targets across offline reopening, with unrelated Undo rows and account/backend fences preserved. Authoritative source-deletion failure already propagates on main and withholds false merge success; #21525 is not required to supply that guard.
The verified PR head f66450e is an ancestor of current main. Required CI passed, including 7,640 Dart tests (four skipped), backend shards and seeded journeys; focused local and Firestore-emulator recovery coverage is recorded in #21417. The main merge/cache/journal implementation retains that verified behavior.
Backend deployment and mobile-release availability have not been verified in this closure. Those rollout checks and any historical-account recovery/customer confirmation remain tracked separately in Featurebase/Support. This closes the engineering defect without claiming that the customer's released build or historical records have already been repaired.