Build-up-only caches in incremental sync miss bootstrap
Debugging stale data in an incremental delta-based sync loop
Caches that are mutated only by deltas (Matrix /sync, Kafka changelogs, websocket subscriptions) silently freeze whatever they saw on the first observation of a key. If the upstream state was incomplete at that moment, no subsequent delta will fix it because the field never changes again. The fix is a cheap refetch path: when the cache for a key looks suspicious (size 1, missing field) AND the current delta has a fresh signal for that key (a message event), fetch the authoritative snapshot once and merge. Remember confirmed-empty answers in a separate set so you do not re-query DMs without names on every iteration.
When a cache is hydrated only from incremental events, write down what the bootstrap moment looks like and ask: can the source-of-truth be partial at that instant?