From dfa5f8027ea9ea1323c96f373d97be7f9c9c605f Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Thu, 27 Aug 2026 11:06:29 +0300 Subject: [PATCH] Drop a patch that cannot detect what it guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `database_lines` reports through the connection the client already holds and never calls `connect_lancedb`, so patching it detects nothing; `asked == [connection]` is what proves the reuse. It was not merely dead. The patch was installed by name, and the next `monkeypatch.setattr` triggered the first import of `haiku.rag.store.info`, whose module body binds `connect_lancedb` — capturing the fake into a namespace teardown does not restore, failing four `test_info` tests under `-n0`. --- tests/test_inspector.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/test_inspector.py b/tests/test_inspector.py index 02947a48..5b18995d 100644 --- a/tests/test_inspector.py +++ b/tests/test_inspector.py @@ -381,11 +381,6 @@ class TestReportingReusesTheConnection: from haiku.rag.inspector.widgets.info_modal import database_lines from haiku.rag.store.engine import ConnectionMode - def explode(*args, **kwargs): - raise AssertionError("opened a second connection to report statistics") - - monkeypatch.setattr("haiku.rag.store.engine.connect_lancedb", explode) - asked: list[object] = [] async def fake_stats(db):