Route delivery status through the store; delete the location index

ConversationStore maintains an exact messageID -> Set<ConversationID>
map at every mutation point (append/upsert/remove/migrate/trim/clear),
so delivery updates are ID-only lookups that fan out to mirrored
ephemeral/stable copies. ChatDeliveryCoordinator shrinks 327 -> 119
lines: the positional location index, its growth-detection/rebuild
machinery, and the duplicate no-downgrade check are deleted - the rule
now lives in exactly one place. The middle-insertion regression tests
are rewritten against the store since stale positional locations are
structurally impossible now.

delivery updates: 38k -> 262k/s (~6.9x); ingest pipelines unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jack
2026-06-11 13:26:00 +02:00
co-authored by Claude Fable 5
parent 99d1d1dccd
commit 7fb1f4a219
6 changed files with 546 additions and 404 deletions
+5 -3
View File
@@ -1,9 +1,11 @@
# Conversation Store: Single Source of Truth
**Status:** Steps 13 implemented (additive store, private cutover, public
cutover; `PublicTimelineStore` deleted). Baselines recorded in
**Status:** Steps 14 implemented (additive store, private cutover, public
cutover, delivery via store; `PublicTimelineStore` and
`ChatDeliveryCoordinator.messageLocationIndex` deleted). Baselines recorded in
`bitchatTests/Performance/PerformanceBaselineTests.swift` (`pipeline.privateIngest`,
`pipeline.publicIngest`, `store.append`).
`pipeline.publicIngest`, `store.append`, `delivery.incrementalUpdate`,
`delivery.storeUpdate`).
---