test(integration): address round-3 review — harden RAG fixture & retry naming
- indexed_manual_pdf fixture: also require status == "idle" (alongside the existing indexed > 0 and pending == 0) so it doesn't break during a transient pending==0 window mid re-scan churn. Keeps the indexed > 0 guard — a pure status==idle check would break prematurely on the initial empty state. - _get_with_retry: rename `retries` -> `max_attempts` (3 total) and 1-index the loop so the param and "attempt N/M" log read self-evidently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
909f36613d
commit
367afa0402
@@ -174,16 +174,22 @@ async def indexed_manual_pdf(nc_client, nc_mcp_client):
|
||||
content = json.loads(result.content[0].text) if result.content else {}
|
||||
indexed = content.get("indexed_count", 0)
|
||||
pending = content.get("pending_count", 1)
|
||||
status = content.get("status")
|
||||
|
||||
logger.info(
|
||||
"Attempt %s/%s: indexed=%s, pending=%s",
|
||||
"Attempt %s/%s: indexed=%s, pending=%s, status=%s",
|
||||
attempt,
|
||||
max_attempts,
|
||||
indexed,
|
||||
pending,
|
||||
status,
|
||||
)
|
||||
|
||||
if indexed > 0 and pending == 0:
|
||||
# Require indexed > 0 (the manual must actually be indexed —
|
||||
# idle/pending==0 is also the *initial* empty state) AND a
|
||||
# settled idle scan so we don't break during a transient
|
||||
# pending==0 window mid re-scan churn.
|
||||
if indexed > 0 and pending == 0 and status == "idle":
|
||||
logger.info(
|
||||
"Vector indexing complete: %s documents indexed", indexed
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user