omi icon indicating copy to clipboard operation
omi copied to clipboard

People stats count Dream duplicate captures

Open apoorvdarshan opened this issue 1 month ago • 1 comments

Symptom

People stats count both captures of a conversation Dream merged. The duplicate capture stays in the stats even though every other product read hides it.

Evidence

On origin/main 31a07230bb, people_stats_scan (backend/database/conversation_scan.py) reads conversations through the PEOPLE_STATS_FIELD_PATHS field mask and then hides rows with is_visible_conversation. Dream's merge cleanup writes only dream_duplicate_of on the redundant capture, leaving discarded false, so the indexed filter still returns it and only dream_duplicate_of hides it. The mask never selects that field. A field a mask drops comes back absent, and the predicate reads an absent hide flag as visible.

#22419 fixed the same omission for the MCP and Developer API card reads (MCP_CONVERSATION_CARD_FIELD_PATHS) and did not touch this scan.

Expected

People stats count a Dream-merged conversation once.

apoorvdarshan avatar Oct 20 '26 06:10 apoorvdarshan

I have fixed this issue in PR #23319 (https://github.com/BasedHardware/omi/pull/23319).

Summary of Fix:

  • Added dream_duplicate_of to PEOPLE_STATS_FIELD_PATHS in backend/database/conversation_scan.py.
  • Now Firestore projected snapshots retain dream_duplicate_of, allowing is_visible_conversation(raw) to properly identify and filter out duplicate captures merged by Dream.
  • Added comprehensive unit tests in test_people_stats_dream_duplicates.py (100% pass rate).

Payout Wallet: 0xC345C07229307d4f1c7935aD2cAe48e390215808 (USDC)

Dimank92 avatar Oct 22 '26 15:10 Dimank92