Skip to content

CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.

cleanup(tracing): comment the redundant BaseProvider filter in _subscribe

xf gong36142e9dfedc
diff --git a/cubepi/tracing/recorder.py b/cubepi/tracing/recorder.py
index a16123a..90f4ae4 100644
--- a/cubepi/tracing/recorder.py
+++ b/cubepi/tracing/recorder.py
@@ -246,6 +246,11 @@ class Recorder:
provider_detachers: list[Callable[[], None]] = []
def _subscribe(p: Any) -> None:
+ # ``collect_agent_providers`` already filters to ``BaseProvider``,
+ # so this isinstance guard is redundant on the chain/legacy path.
+ # It stays as belt-and-suspenders for the middleware-extras loop
+ # below, which passes ``model.provider`` directly — a duck-typed
+ # Provider-protocol object could slip past static typing there.
if not isinstance(p, BaseProvider):
return
provider_detachers.append(p.subscribe_request(self._on_provider_request))