From abd7458e77aa99840f2ac456a2acf0ca330ddb95 Mon Sep 17 00:00:00 2001 From: Harry Yep Date: Tue, 30 Jun 2026 17:50:53 +0800 Subject: [PATCH] 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. --- apps/desktop/src/lib/incremental-external-store-runtime.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/desktop/src/lib/incremental-external-store-runtime.ts b/apps/desktop/src/lib/incremental-external-store-runtime.ts index e8d2033c4dbd..48c0c424dfd2 100644 --- a/apps/desktop/src/lib/incremental-external-store-runtime.ts +++ b/apps/desktop/src/lib/incremental-external-store-runtime.ts @@ -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(