From 27096b17be4ad63fdb259b00c487cabc86c74954 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 8 Apr 2026 18:11:37 -0400 Subject: [PATCH] a --- patches/omp-fix-auth.patch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/patches/omp-fix-auth.patch b/patches/omp-fix-auth.patch index d6b2472..0864a4d 100644 --- a/patches/omp-fix-auth.patch +++ b/patches/omp-fix-auth.patch @@ -1,4 +1,4 @@ -commit 31d537735d3c5e25a2b620d63ebbfea4cf84f57e +commit 02b80dd74e2f962fffc9b0076bb7966eea4e45ff Author: Simon Gardling Date: Wed Apr 8 13:05:09 2026 -0400 @@ -20,10 +20,10 @@ index 3f50b7bd4..248dacbff 100644 ### Fixed diff --git a/packages/ai/src/auth-storage.ts b/packages/ai/src/auth-storage.ts -index 9fdb4473b..fac936dad 100644 +index 9fdb4473b..fc81a6f3b 100644 --- a/packages/ai/src/auth-storage.ts +++ b/packages/ai/src/auth-storage.ts -@@ -1865,7 +1865,30 @@ export class AuthStorage { +@@ -1865,7 +1865,35 @@ export class AuthStorage { }); if (isDefinitiveFailure) { @@ -44,6 +44,11 @@ index 9fdb4473b..fac936dad 100644 + ) { + // DB has a newer refresh token — another instance refreshed. + // Update in-memory state and retry with the fresh credential. ++ logger.warn("Concurrent refresh detected, syncing from DB and retrying", { ++ provider, ++ index: selection.index, ++ rowId: entry.id, ++ }); + const updated = [...entries]; + updated[selection.index] = { id: entry.id, credential: dbEntry.credential }; + this.#setStoredCredentials(provider, updated);