Repository navigation
Conversation
Revisit known encrypted conversations after list publication and socket resume so missed handshake events do not leave device additions uncommitted. Coalesce membership catch-up workers and backfill messages after successful sync. Add a regression covering offline admission and document the required recorded app scenario. Verified that the regression fails with the original list-refresh code; the Tiny adapter suite passes with 246 tests passed and 9 ignored. Full recorded platform proof remains pending.
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.
What changed and why
An encrypted chat can remain stuck with a signed, uncommitted device addition when its existing member misses the live handshake event while offline. Returning online now starts background membership catch-up after the conversation list loads and after socket resume, allowing admission to finish without sending a message first.
Concurrent catch-up requests share one worker per device. Successful sync requests a message backfill so messages can become readable after the device joins.
Type
Platforms
Proof
Scenario: e2e/scenarios/encrypted-membership-reconnect
Lab run: Pending. The scenario documents the required real-app startup and socket-resume runs; platform UI drivers and base/branch recordings are not implemented yet. This PR remains draft and does not claim e2e-proof.
Validation completed locally:
cargo test --locked -p chatd --lib adapters::tiny::: 246 passed, 9 ignored.git diff --check: passed.Compatibility
No protocol changes or server deployment required. Existing membership APIs are reused, including bounded retries for older servers that batch changes. An existing member still needs to connect for an admission to complete.
Risk and rollback
Startup and reconnection cause additional membership reads and possible commits for known encrypted conversations. Workers are coalesced per device and retain the existing bounded retry schedule. Revert this commit to restore the previous event-driven behavior.
Release note
Finish pending encrypted-chat device additions automatically after startup or reconnection.