Dedupe duplicated conversation participants instead of quarantining the snapshot - #160
Merged
Merged
Conversation
…he snapshot Google conversation snapshots can list the same participant identity twice (observed live 2026-08-01: the account's own number appeared twice in three group rosters). refreshConversation treated that as a deterministic apply error, so the whole snapshot quarantined and those conversations' roster and title updates were silently dropped — recurring on every future revision of the same groups. Identical natural key means identical identity: keep the first entry, log a warning, and apply the snapshot. Regression test replays the duplicated-roster shape through the worker path harness. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per Sol's adversarial review: parse every occurrence's role up front; a duplicate that agrees on membership state (role + active) is benign — keep the first entry and OR-merge IsSelf (the live frames differ only there: Google lists the account once as the self entry and once as a plain member). A duplicate that disagrees on role/active is ambiguous and still refuses the snapshot. The warning is now one aggregated line per snapshot instead of one per duplicate. Tests: both entry orders pin IsSelf=true on the merged identity plus kept row role/active; a conflicting-duplicate case pins the quarantine classification via processRecordResult. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Addressed Sol's review (adversarial, gpt-5.6-sol ultra):
All 8 live frames (including the 3 quarantined) still apply under the revised rule; |
This was referenced Aug 16, 2026
mwhobrey
pushed a commit
to mwhobrey/om-tui
that referenced
this pull request
Aug 24, 2026
…he snapshot (MaxGhenis#160) * Dedupe duplicated conversation participants instead of quarantining the snapshot Google conversation snapshots can list the same participant identity twice (observed live 2026-08-01: the account's own number appeared twice in three group rosters). refreshConversation treated that as a deterministic apply error, so the whole snapshot quarantined and those conversations' roster and title updates were silently dropped — recurring on every future revision of the same groups. Identical natural key means identical identity: keep the first entry, log a warning, and apply the snapshot. Regression test replays the duplicated-roster shape through the worker path harness. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Address review: conflict-aware dedupe, IsSelf OR-merge, bounded warning Per Sol's adversarial review: parse every occurrence's role up front; a duplicate that agrees on membership state (role + active) is benign — keep the first entry and OR-merge IsSelf (the live frames differ only there: Google lists the account once as the self entry and once as a plain member). A duplicate that disagrees on role/active is ambiguous and still refuses the snapshot. The warning is now one aggregated line per snapshot instead of one per duplicate. Tests: both entry orders pin IsSelf=true on the merged identity plus kept row role/active; a conflicting-duplicate case pins the quarantine classification via processRecordResult. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 6c9399a)
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
Google conversation snapshots can list the same participant identity twice. Live occurrence 2026-08-01 ~04:54 ET: a burst of 8 conversation snapshots arrived on
google-primary; 3 of them (revisions of 3 group threads) carried the account's own number twice in the roster and were quarantined byrefreshConversation's duplicate-identity check. Their roster/title updates were silently dropped, and every future revision of those groups would quarantine the same way.Diagnosed by replaying the live inbox frames (from a read-only copy of the v2 store) through the real worker apply path: exact error
conversation participant identity "+1650…" is duplicatedon exactly the 3 quarantined frames; all 8 apply cleanly with this fix. No messages were involved — conversation metadata only.The fix
Identical natural key (kind + canonical) means identical identity, so the second entry can only be a duplicate — keep the first, log a warning, apply the snapshot. Quarantining the whole snapshot over a benign roster artifact permanently drops metadata the next revision won't restore.
Verification
TestWorkerConversationSnapshotDedupesDuplicateParticipantsreplays the duplicated-roster shape through the worker-path harness: snapshot applies, 2 participants after dedupe, first occurrence's display name kept.GOWORK=off go test ./...green.Notes
🤖 Generated with Claude Code