← Back to Pull requests

[ci] Add PR versus base vector index benchmarks #95

Closed
unknown closed this pull request without merging on Nov 06, 2026 06:21 UTC
View on GitHub
unknown unknown commented on Sep 07, 2026 15:15 UTC
Author

Closes #96

PRs currently have no automated comparison of vector index performance against their base revision. This adds an informational benchmark check with a compact Recall/QPS report for IVF-FLAT, IVF-SQ, IVF-PQ, IVF-RQ and DiskANN.

Both revisions build the same candidate-provided benchmark driver with Rust stable on the same runner. The fixed synthetic workload uses 10,000 64D vectors, 2,048 queries and two Rayon threads. Six fresh-process samples per version/index alternate execution order; warm sequential and batch timing each run for at least one second. The report compares medians and flags QPS drops above 10%/20% or recall drops above 1/3 percentage points. Performance changes are advisory, not merge gates.

The existing benchmark gains optional warm timing and CSV fields, plus a fix for retained ground-truth allocations. Original first-pass Recall/I/O metrics are preserved. The comparison script validates samples, enforces a shared 20-minute budget, and retains raw data and failure logs.

Results are published in the Actions summary and through a separate workflow_run publisher, including external fork PRs. The publisher runs from the default branch, downloads only the triggering run/attempt's report artifact, verifies its PR against GitHub's source repository/branch/head data, and skips changed head/base revisions. It reads artifacts as text and never checks out PR code, restores PR caches or executes artifact contents.

The publisher must first exist on the target repository's default branch. This introducing PR therefore continues to expose its report through the Actions summary until merged; subsequent benchmark runs can publish comments automatically. No additional token is required.

Validation:

  • Full CI passed, including Rust, C/C++, JNI and Python checks.

  • Benchmark passed, followed automatically by the workflow_run publisher. The existing comment was updated without duplication. This live test used the fork repository with the publisher installed on its default branch; external-fork routing is additionally covered by publisher tests.

  • Example report in the fork PR. Identical library inputs are repeatability calibration, not evidence of an index performance improvement.

  • Publisher tests cover fork routing, create/update, missing reports and stale/unrelated runs.

  • Eight Python tests cover calculations, advisory thresholds, invalid/incomplete samples and timeout handling.
  • This is a small warm-cache regression check, not a large-scale or object-storage benchmark. Production index algorithms are unchanged.

    Diff: 364 lines (+273 / -91) across 4 files Reviewer: wangzhigang1999 Review duration: 85866m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 364 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #95"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%