From d297db0c70e2a4837a9eb52b4a4e706e64f275f7 Mon Sep 17 00:00:00 2001 From: ethernet Date: Wed, 23 Sep 2026 16:55:09 -0400 Subject: [PATCH] fix(providers): publish the plugin-stamp check time before auth sync re-enters _sync_auth_registry() calls list_providers(), which re-enters _refresh_home_layer. stamp_checked_at was set only after the sync, so the re-entry saw no check time and re-stat'ed the plugin dirs inside the TTL: two stats where the TTL cache promises one. --- providers/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/providers/__init__.py b/providers/__init__.py index 50392743f5..cdf18097a3 100644 --- a/providers/__init__.py +++ b/providers/__init__.py @@ -269,9 +269,11 @@ def _refresh_home_layer(layer: _HomeLayer, home: Path | None, key: str, *, force if stamps != layer.stamps: _scan_home_layer(layer, key) layer.stamps = stamps - # Publish the completed layer only after its stamp is current. Auth sync - # calls list_providers(), which re-enters this function; syncing from - # _scan_home_layer before this assignment recursively rescanned forever. + # Publish the completed layer -- stamps AND check time -- before auth + # sync: it calls list_providers(), which re-enters this function. An + # unpublished stamp rescanned forever; an unpublished check time + # re-stats the plugin dirs inside the TTL. + layer.stamp_checked_at = now if _discovered and not _discovering: _sync_auth_registry() layer.stamp_checked_at = now