refactor(search): address PR #750 round 10 review feedback

- Tighten verify_search_results signature: client: Any → NextcloudClientProtocol
- Collapse 3 copy-pasted lock-justification comments to a single-line pointer
- Add logger.debug timing around the verify_search_results call site
- Add logger.debug timing around the unbounded news.get_items fetch
- Rename SemanticSearchResponse.dropped_count → dropped_document_count to make
  the chunks-vs-documents unit asymmetry explicit at the API boundary
- Drop unreachable duplicate 409 branch in WebDAVClient.move_resource

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-05-01 22:44:57 +02:00
co-authored by Claude Opus 4.7
parent 852ffa3678
commit 15ffeca312
4 changed files with 27 additions and 31 deletions
+6 -6
View File
@@ -86,18 +86,18 @@ class SemanticSearchResponse(BaseResponse):
"Number of search result chunks that passed verify-on-read "
"access checks (ADR-019). Equals len(verified_results) before "
"trimming to limit. Sized in chunks (result rows), NOT in "
"unique documents — pair with dropped_count carefully: "
"dropped_count is sized in unique (doc_id, doc_type) pairs."
"unique documents — see dropped_document_count for the "
"per-document counterpart."
),
)
dropped_count: int = Field(
dropped_document_count: int = Field(
default=0,
description=(
"Number of unique (doc_id, doc_type) pairs dropped as ghost "
"records during verify-on-read (ADR-019). A short result page "
"(len(results) < limit) combined with a non-zero dropped_count "
"indicates ghost density rather than scarcity of relevant "
"content."
"(len(results) < limit) combined with a non-zero "
"dropped_document_count indicates ghost density rather than "
"scarcity of relevant content."
),
)