Skip to content

Cleaning up test work and changing the get_degree_stats signature.#998

Open
JordanMaples wants to merge 6 commits intomainfrom
jordanmaples/cleanup_test_work
Open

Cleaning up test work and changing the get_degree_stats signature.#998
JordanMaples wants to merge 6 commits intomainfrom
jordanmaples/cleanup_test_work

Conversation

@JordanMaples
Copy link
Copy Markdown
Contributor

This is a quick cleanup PR for some of the changes that went in the other day.

In test/cases/index.rs there were a bunch of paged_search tests that on the whole are lower signal than the baseline-related paged_search tests added in a different PR, so those are being removed.

tests for the QueryLabelProvider were moved to the trait defn location for additional documentation purposes on how we intend the trait to be used.

In the initial test authoring, I added an IntoIterator trait implementation to the test provider in the goals of testing get_degree_stats. After syncing with Mark, we agreed that the better approach was to change the way that get_degree_stats behaves, now it accepts an iterator to the ids that you want the degree stats for rather than forcing the provider to implement IntoIterator.

There are still some areas that I'm cleaning up. In particular: helpers.rs, while it does help to set up some tests, naming is not the best and there are still some layers of boilerplate that can be eliminated by spending a bit more time handcrafting a solution.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 88.39286% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.47%. Comparing base (d2ec7d0) to head (0e1bdf6).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
diskann/src/graph/index.rs 76.00% 6 Missing ⚠️
diskann-providers/src/index/wrapped_async.rs 0.00% 4 Missing ⚠️
diskann/src/graph/test/provider.rs 87.50% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (88.39%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #998      +/-   ##
==========================================
- Coverage   90.69%   89.47%   -1.22%     
==========================================
  Files         459      460       +1     
  Lines       85030    85327     +297     
==========================================
- Hits        77115    76344     -771     
- Misses       7915     8983    +1068     
Flag Coverage Δ
miri 89.47% <88.39%> (-1.22%) ⬇️
unittests 89.31% <88.39%> (-1.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann-providers/src/index/diskann_async.rs 96.01% <100.00%> (+0.02%) ⬆️
diskann/src/graph/test/cases/consolidate.rs 97.65% <100.00%> (ø)
diskann/src/graph/test/cases/helpers.rs 97.64% <100.00%> (-0.09%) ⬇️
diskann/src/graph/test/cases/index.rs 98.03% <100.00%> (-0.69%) ⬇️
diskann/src/graph/test/cases/inplace_delete.rs 95.76% <100.00%> (ø)
diskann/src/graph/test/provider.rs 94.16% <87.50%> (-0.25%) ⬇️
diskann-providers/src/index/wrapped_async.rs 45.88% <0.00%> (-0.14%) ⬇️
diskann/src/graph/index.rs 95.45% <76.00%> (-0.83%) ⬇️

... and 65 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread diskann/src/graph/test/cases/index.rs Outdated
Comment thread diskann/src/graph/index.rs Outdated
@JordanMaples JordanMaples marked this pull request as ready for review April 30, 2026 20:10
@JordanMaples JordanMaples requested review from a team and Copilot April 30, 2026 20:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Cleans up and reorganizes test utilities while changing get_degree_stats to accept an explicit iterator of IDs (instead of requiring providers to implement IntoIterator).

Changes:

  • Updated get_degree_stats (and sync wrapper) to take an IntoIterator of IDs to compute degree stats for.
  • Removed/relocated lower-signal tests and improved test assertions for DegreeStats.
  • Simplified 2D-square test setup helpers and refactored neighbor access in the test provider.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
diskann/src/graph/test/provider.rs Adds ID iterators + refactors neighbor retrieval; removes IntoIterator impl.
diskann/src/graph/test/cases/inplace_delete.rs Adapts tests to new setup_2d_square helper signature.
diskann/src/graph/test/cases/index.rs Removes paged-search tests; updates degree-stats tests for new API.
diskann/src/graph/test/cases/helpers.rs Simplifies helper by internalizing vector generation (removes Matrix param).
diskann/src/graph/test/cases/consolidate.rs Adapts consolidation tests to new helper signature.
diskann/src/graph/index.rs Changes get_degree_stats signature; moves QueryLabelProvider test here; adds verbose-eq for DegreeStats.
diskann-providers/src/index/wrapped_async.rs Updates sync wrapper to pass ID iterator through to async API.
diskann-providers/src/index/diskann_async.rs Updates provider-side tests to pass iterators into get_degree_stats.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread diskann-providers/src/index/diskann_async.rs Outdated
Comment thread diskann/src/graph/index.rs
Comment thread diskann/src/graph/index.rs
Comment thread diskann/src/graph/index.rs
Comment thread diskann/src/graph/test/provider.rs
Comment thread diskann/src/graph/test/provider.rs
@JordanMaples JordanMaples force-pushed the jordanmaples/cleanup_test_work branch from cb1b8c5 to a302b66 Compare May 4, 2026 17:01
@JordanMaples JordanMaples force-pushed the jordanmaples/cleanup_test_work branch from a302b66 to 16a1d16 Compare May 4, 2026 17:03
Copy link
Copy Markdown
Contributor

@hildebrandmw hildebrandmw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small couple requests - otherwise looks good. Thanks!

Comment thread diskann/src/graph/test/cases/index.rs Outdated
Comment thread diskann/src/graph/test/cases/index.rs Outdated
@JordanMaples JordanMaples enabled auto-merge (squash) May 5, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants