Drop a patch that cannot detect what it guards

`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`.
This commit is contained in:
Yiorgis Gozadinos 2026-08-27 11:06:29 +03:00
parent 0e0ce8d3f0
commit dfa5f8027e
No known key found for this signature in database

View file

@ -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):