docs(desktop): note the load-bearing isOptimistic invariant on the optimistic placeholder

a reader of this subclass can't recover from hermes code alone that the metadata.isOptimistic flag drives core's off-branch eviction and export() omission, so a future core change to it would silently break placeholder cleanup. flagged in the upgrade review.
This commit is contained in:
Harry Yep 2026-06-30 17:50:53 +08:00 committed by Brooklyn Nicholson
parent b50b83fbd8
commit abd7458e77

View file

@ -136,6 +136,8 @@ class IncrementalExternalStoreThreadRuntimeCore extends ExternalStoreThreadRunti
self._notifyEventSubscribers(store.isRunning ? 'runStart' : 'runEnd', {})
}
// metadata.isOptimistic keeps this placeholder ephemeral: core evicts
// off-branch optimistic messages on head moves and omits them from export().
if (hasUpcomingMessage(isRunning, messages)) {
const optimisticId = generateId()
this.repository.addOrUpdateMessage(