The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(openhuman-session): handle superseded refresh in the stored-user path
Steven Enamakelbfd1ba8938ac
diff --git a/crates/openhuman-session/src/cache.rs b/crates/openhuman-session/src/cache.rsindex ef9e0330bc..7c0b39037a 100644--- a/crates/openhuman-session/src/cache.rs+++ b/crates/openhuman-session/src/cache.rs@@ -278,7 +278,7 @@ impl CurrentUserCache {// (including forced refreshes) wait for it, then reuse its result.// This avoids multiplying `/auth/me` requests during startup/polling.let waited_for_refresh = self.inner.inflight.try_lock().is_err();- let refresh_guard = self.inner.inflight.lock().await;+ let _refresh_guard = self.inner.inflight.lock().await;if waited_for_refresh {if let Some((user, _)) = self.cached(&key) {return Ok(self.with_result(&key, Some(user)));diff --git a/crates/openhuman-session/src/manager.rs b/crates/openhuman-session/src/manager.rsindex 730604b253..726805b81f 100644--- a/crates/openhuman-session/src/manager.rs+++ b/crates/openhuman-session/src/manager.rs@@ -256,13 +256,6 @@ impl<L: CoreLink> SessionManager<L> {);Err(SessionError::Rejected(reason))}- Err(FetchMeError::Superseded) => {- log::debug!(- "{LOG_PREFIX} current-user refresh was superseded; retrying with the current core credential"- );- let current = self.core_state().await?;- self.current_user_for(¤t, force).await- }Err(error) => {let reason = error.message().to_string();if jwt_is_live(&credential.secret, now).is_none() {@@ -521,6 +514,13 @@ impl<L: CoreLink> SessionManager<L> {self.clear_session_credential("auth/me").await;Err(SessionError::Rejected(reason))}+ Err(FetchMeError::Superseded) => {+ log::debug!(+ "{LOG_PREFIX} current-user refresh was superseded; retrying with the current core credential"+ );+ let current = self.core_state().await?;+ self.current_user_for(¤t, force).await+ }Err(error) => {log::debug!("{LOG_PREFIX} serving stored user; refresh failed: {error}");let mut fallback = stored();