fix(chunk-context): address PR #767 round-3 review — gate readability + legacy-fallback comment
- search/context.py: rename triple-negation gate condition to `skip_offset_lookup` named boolean for readability; convert new logger.warning to lazy %-style per repo convention. - api/visualization.py, auth/viz_routes.py: add comment on the offset-only Qdrant scroll branch noting it is a legacy path for pre-astrolabe#75 clients and degrades gracefully on Qdrant Cloud strict mode. Reviewer item #2 (extracting the duplicated scroll block into a shared helper) deferred to a follow-up issue per the reviewer's "not blocking" framing. 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
058463ee87
commit
47b0b737b6
@@ -601,6 +601,12 @@ async def get_chunk_context(request: Request) -> JSONResponse:
|
||||
with_payload=["chunk_bbox", "page_number"],
|
||||
)
|
||||
else:
|
||||
# Legacy fallback for clients that don't send chunk_index
|
||||
# (pre-cbcoutinho/astrolabe#75). chunk_start/end_offset
|
||||
# aren't indexed in Qdrant Cloud strict mode, so this
|
||||
# call may fail with HTTP 400 there; the outer except
|
||||
# logs a warning and the response degrades gracefully
|
||||
# (no chunk_bbox).
|
||||
points_response = await qdrant_client.scroll(
|
||||
collection_name=settings.get_collection_name(),
|
||||
scroll_filter=Filter(
|
||||
|
||||
Reference in New Issue
Block a user