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.
fix/verification-admin-route-recovery
Harry Yep 2026-06-30 17:50:53 +08:00 committed by Brooklyn Nicholson
parent b50b83fbd8
commit abd7458e77
1 changed files with 2 additions and 0 deletions

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(