refactor(search): address PR #750 round 8 review feedback
- Rename `verified_count` → `verified_chunk_count` to make the count granularity explicit at the field name (chunks vs unique docs). - News verifier now fails open *per-item* on non-numeric stored doc_ids (matches notes/files/deck shape); a single bad id no longer rescues definitively-missing siblings from eviction. - Update note-verifier integration test to use string doc_ids end-to-end to match production storage (scanner.py:241 stringifies note ids). - Add regression test for the closed-task-group race guard in `verify_search_results` so the RuntimeError swallow is locked in. - Convert remaining f-string logger calls in `server/semantic.py` to lazy %-style formatting (per repo convention). - Document `evict_on_missing` as a developer/test flag (no env var) and flag the `get_file_info` 404→raise contract change in its docstring. - Add a TODO(ADR-019) breadcrumb for the hardcoded 2× over-fetch so future tuning has a clear hook. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3e981e647a
commit
8a2626da6c
@@ -1301,6 +1301,15 @@ class WebDAVClient(BaseNextcloudClient):
|
||||
async def get_file_info(self, path: str) -> dict[str, Any] | None:
|
||||
"""Get file info including file ID via WebDAV PROPFIND.
|
||||
|
||||
.. note::
|
||||
**Behavior change (ADR-019):** previously this method returned
|
||||
``None`` for HTTP 404. It now raises ``HTTPStatusError`` for any
|
||||
non-2xx status, including 404. ``None`` is reserved for the
|
||||
ambiguous *malformed PROPFIND* case (server returned 2xx with a
|
||||
response body missing required XML elements). External callers
|
||||
updating from the old contract must catch ``HTTPStatusError``
|
||||
and inspect ``e.response.status_code`` to handle 404 explicitly.
|
||||
|
||||
Args:
|
||||
path: Path to the file (relative to user's files directory)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user