From 62693667a8da2daab5065b26eb50eec5c06ec6ab Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Mon, 13 Jul 2026 17:46:16 +0200 Subject: [PATCH] =?UTF-8?q?chore(data):=20provisionRetry=20=E2=86=92=20poi?= =?UTF-8?q?nterGuard=20(r=C3=A9solution=20de=20compte=20barri=C3=A8re-auto?= =?UTF-8?q?ritative)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le polyfill ne fait plus de retry sur la résolution des comptes (désormais gated sur la barrière first-State du doc-shim). L'app n'injecte plus qu'un micro-garde borné (pointerGuard) sur la seule lecture du pointeur écrit-une-fois. Aucune mitigation de fork/retry côté app — cette responsabilité vit entièrement dans le SDK. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/shared/utils/storeRegistry.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/shared/utils/storeRegistry.ts b/src/shared/utils/storeRegistry.ts index 53775ac..13d909c 100644 --- a/src/shared/utils/storeRegistry.ts +++ b/src/shared/utils/storeRegistry.ts @@ -53,13 +53,13 @@ configureStoreRegistry({ }, // The app maps its identifier handle to the identity id the lib keys on. normalizeId: normalizeIdentifier, - // Anti-fork bounded retry (real broker): on a fresh page over the persistent - // wallet (reconnection under the SAME identity) the shim may not be synced when - // the first read fires → 0 rows. Without this, the registry would provision a - // NEW account (a fork), so the fresh page reads its own data as empty. The - // bounded backoff waits the sync-lag window out before concluding "genuinely - // new". Bounded (never an open-ended broker poll). - provisionRetry: { attempts: 8, baseMs: 150, maxStepMs: 2000 }, + // Pointer micro-guard (real broker): the account records now live in a + // subscribable doc-shim reached through a well-known write-once pointer triple in + // the store-root. The account read is barrier-authoritative (no account retry). + // The only residual store-root sync-lag is the pointer read itself — this bounded + // guard re-reads JUST that one triple a few times on a cold reconnect. It can never + // provision or fork an account. Bounded (never an open-ended broker poll). + pointerGuard: { attempts: 8, baseMs: 150, maxStepMs: 2000 }, }); // --- Re-export the lib's account record + registry surface (unchanged API) ---