Preserve candidates for non-streaming vector TOP queries #51167
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 235 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.327
Real PR Conversation Timeline
1 comments
"Review active on #51167"
general
weight: 0.35
arnabnandy7
Description
Fixes #51133.
The streaming
ORDER BYpage-size heuristic also ran for non-streaming vector queries, where the initial page size caps the number of candidates retained per physical range. ForTOP 60across six ranges, the heuristic reduced that cap to 50. If all 60 nearest vectors were in one range, the SDK discarded 10 of them before the global merge.Restrict the heuristic to streaming
ORDER BYqueries. Non-streaming queries now retain candidates using the existingTOPorLIMIT + OFFSETbound.The patched Cosmos SDK built successfully. Local integration test setup failed because the Cosmos endpoint was unreachable, so the vector query tests were skipped. The Cosmos live Query job can run the existing vector tests against a CI-managed account. The exact six-range regression remains unverified.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines