test(integration): address round-1 review — unify searchability helper

- Extract the duplicated `_document_is_searchable`/`_note_is_searchable`
  helpers into a shared, Playwright-free `tests/integration/_search_helpers.py`
  (`document_is_searchable`), used by both the plotly and sampling tests.
- Resolve the sampling Medium finding: `wait_for_vector_sync` now triggers the
  searchability path on `search_term` alone (matching the plotly variant)
  instead of requiring both `search_term` and `note_id`, removing the silent
  fall-through to the unreliable gauge-delta path.
- Tighten `_get_with_retry`'s `last_exc` annotation to `httpx.TransportError`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-17 22:49:16 +02:00
co-authored by Claude Opus 4.8
parent 3e8ec2fccd
commit eefa326c09
4 changed files with 56 additions and 60 deletions
@@ -47,7 +47,7 @@ async def _get_with_retry(
client: httpx.AsyncClient, url: str, *, retries: int = 2, **kwargs
) -> httpx.Response:
"""GET with retries on transient transport errors (timeouts/conn resets)."""
last_exc: Exception | None = None
last_exc: httpx.TransportError | None = None
for attempt in range(retries + 1):
try:
return await client.get(url, **kwargs)