Skip to content

Enforce MinHash construction compatibility - #326

Open
dipeshbabu wants to merge 4 commits into
ekzhu:masterfrom
dipeshbabu:agent/enforce-minhash-compatibility
Open

dipeshbabu wants to merge 4 commits into
ekzhu:masterfrom
dipeshbabu:agent/enforce-minhash-compatibility

Conversation

@dipeshbabu

@dipeshbabu dipeshbabu commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

MinHash sketches can share a seed, length, and scheme while using different permutation matrices or hash functions. Track construction metadata and reject incompatible comparisons, merges, and LSH operations instead of returning invalid similarity results.

The callable fingerprint includes partial arguments, bound-instance state, defaults, closures, and callable state. Source filenames and line locations do not affect compatibility, so persisted indexes can be used after relocating an installation. WeightedMinHash remains exempt, and legacy scheme-only metadata remains readable.

Validation

  • Targeted MinHash/LSH tests and the persisted-index subprocess regression passed.
  • Ruff and Pyright passed.
  • All 13 upstream GitHub checks passed for 0c98104, including Python 3.9–3.13 and backend integration jobs.

@codecov-commenter

codecov-commenter commented Jul 19, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@ee60290). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #326   +/-   ##
=========================================
  Coverage          ?   71.96%           
=========================================
  Files             ?       21           
  Lines             ?     2857           
  Branches          ?        0           
=========================================
  Hits              ?     2056           
  Misses            ?      801           
  Partials          ?        0           
Flag Coverage Δ
unittests 71.96% <100.00%> (?)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@dipeshbabu
dipeshbabu force-pushed the agent/enforce-minhash-compatibility branch 3 times, most recently from 5174eb4 to ace3414 Compare July 22, 2026 05:48
@dipeshbabu dipeshbabu closed this Jul 22, 2026
@dipeshbabu dipeshbabu reopened this Jul 22, 2026
@dipeshbabu
dipeshbabu force-pushed the agent/enforce-minhash-compatibility branch from ace3414 to cdd3632 Compare August 20, 2026 17:51
@dipeshbabu

Copy link
Copy Markdown
Contributor Author

The red job failed in the unchanged HNSW removal test. I reran it with the MinHash and LSH tests: all 169 passed. I don't have permission to rerun upstream CI; could you rerun the failed jobs?

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.

2 participants