From c0e44238eaa46869ee7d4675f3a0786eaa7a9663 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 10 Sep 2026 17:41:46 -0700 Subject: [PATCH] docs(runtime): bound what the handle-gap sweep's evidence actually proves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raised in review by nwparker/adv2-concurrency-fixes. The env-scoping rationale establishes that the recording environment has A published row, not that it has finished republishing, so partial re-publication within one environment can still cost a sibling pane its verdict. Conservative in the same direction as the case it replaced — drop, re-park, hold longer, never resume early — so it is recorded rather than fixed. The note exists so the inference is not widened later on the assumption it is airtight. --- src/renderer/src/lib/host-mirror-handle-gap-wait.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/src/lib/host-mirror-handle-gap-wait.ts b/src/renderer/src/lib/host-mirror-handle-gap-wait.ts index 95e71a911a5..493cdb3d601 100644 --- a/src/renderer/src/lib/host-mirror-handle-gap-wait.ts +++ b/src/renderer/src/lib/host-mirror-handle-gap-wait.ts @@ -74,6 +74,11 @@ function recordExpiredWait(environmentId: string, key: string): void { // already makes. That evidence covers only this environment. Sweeping others would drop a // verdict belonging to an environment that is merely mid-rehydration, and its pane would // re-park on a fresh full budget. Removed environments are left to teardown, not to this. + // + // Do not widen this on the assumption the inference is airtight: it establishes that this + // environment has A published row, not that it has finished republishing. A host that has + // published p1 and not yet p2 can still cost p2 its verdict here. That residual is + // conservative in the same direction — drop, re-park, hold longer, never resume early. const prefix = `${environmentId}\0` const liveTabs = liveTabIds() for (const [staleKey, staleGeneration] of expiredGenerationByPane) {