ruvector/docs/research/nightly
rUv 137a02ee9c
research(nightly): capability-gated-ann — per-vector read access control in ANN search (#604)
* research: add nightly survey for capability-gated-ann

Selects capability-gated ANN search as 2026-06-25 nightly topic.
Three research loop passes completed: Discover, Deepen, Critique.
Topic fills the missing per-vector read access control gap in RuVector
(ADR-227 already covers proof-gated writes; this adds gated reads).

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* feat: add capability-gated ANN Rust proof of concept

crates/ruvector-capgated: zero-dep Rust crate implementing three
capability-gated ANN search variants using 64-bit CapMask bitsets.

- CapMask: 64-bit bitset for capability requirements/holdings
- CapGatedIndex trait: unified API across all backends
- PostFilter: O(n) scan, 100% recall, baseline
- EagerMask: O(auth_frac*n*d), 100% recall, 7.9x speedup at 12.5% access
- CapGraph: k-NN graph walk with ef-bounded exploration, 90.6% recall
- Oracle: brute-force ground truth for recall measurement
- Deterministic LCG dataset generation (no external deps)

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* test: add 22 numeric acceptance tests for capability-gated-ann

Tests cover: CapMask satisfies semantics, dist_sq correctness,
recall computation, Oracle filtering/ordering, PostFilter
filtering/ordering/k-limit, EagerMask equivalence to Oracle,
EagerMask zero-access, CapGraph authorisation enforcement,
CapGraph k-limit, CapGraph empty index, CapGraph full-access,
dataset determinism, pick_caps count/range, LCG reproducibility.

All 22 tests pass with cargo test -p ruvector-capgated.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* docs: add ADR-268 for capability-gated ANN search

ADR-268-capability-gated-ann.md covers:
- Context: gap between proof-gated writes (ADR-227) and read access control
- Decision: CapGatedIndex trait, CapMask bitset, three variants
- Benchmark evidence: PostFilter 2,023 QPS, EagerMask 17,548 QPS (low-access),
  CapGraph 3,396 QPS / 0.869 recall
- Alternatives considered: post-hoc filter, per-group index, homomorphic encryption
- Failure modes and security considerations
- Migration path into ruvector-core

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* bench: capture capability-gated-ann benchmark results

Real cargo run --release numbers on x86_64 Linux, Rust 1.94.1:

High-access (37.5% authorised):
  PostFilter:  494 μs mean / 2,023 QPS / 1.000 recall
  EagerMask:   175 μs mean / 5,728 QPS / 1.000 recall  (2.8x speedup)
  CapGraph:    289 μs mean / 3,466 QPS / 0.906 recall

Low-access (12.5% authorised):
  PostFilter:  450 μs mean / 2,221 QPS / 1.000 recall
  EagerMask:    57 μs mean / 17,548 QPS / 1.000 recall  (7.9x speedup)
  CapGraph:    295 μs mean / 3,396 QPS / 0.869 recall

ACCEPTANCE RESULT: PASS -- all thresholds met.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* docs: add SEO gist for capability-gated-ann

docs/research/nightly/2026-06-25-capability-gated-ann/gist.md:
- Public-facing technical article with real benchmark numbers
- Comparison table vs Milvus, Qdrant, Weaviate, Pinecone, LanceDB,
  FAISS, pgvector, Chroma, Vespa
- 8 practical applications, 8 exotic applications
- Deep research notes with ACORN, filtered-ANN, Milvus citations
- Usage guide, optimization guide, roadmap
- SEO keywords and GitHub topic tags

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb

* fix(ruvector-capgated): clippy + rustfmt cleanup for clean CI

Resolve the clippy warnings that were red on #604: unused VecEntry import,
needless_range_loop (dataset.rs cap-mask build), useless_vec (eager_mask),
and unusual_byte_groupings (benchmark SEED literal). Apply rustfmt.

cargo clippy -p ruvector-capgated --all-targets -- -D warnings now clean;
22/22 tests pass.

Co-Authored-By: claude-flow <ruv@ruv.net>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: ruv <ruvnet@users.noreply.github.com>
2026-06-25 14:05:34 -04:00
..
2026-04-23-rabitq feat(rabitq): add RaBitQ rotation-based 1-bit quantization crate (ADR-154) 2026-04-23 07:56:23 +00:00
2026-04-26-acorn-filtered-hnsw research(nightly): ACORN — predicate-agnostic filtered HNSW (#391) 2026-04-27 00:29:37 -04:00
2026-05-12-rairs-ivf research(nightly): rairs-ivf — RAIRS IVF, ruvector's first Inverted File Index (ADR-193) (#459) 2026-05-12 09:47:19 -04:00
2026-05-21-gnn-rerank feat(gnn-rerank): productionize #479 — +10.4pp recall, CI-guarded, hardened, optimized (#582) 2026-06-17 20:18:45 -04:00
2026-05-24-proof-gated-writes feat(proof-gate): productionize #506 — tamper-evident vector writes (Merkle/hash-chain WAL) (#584) 2026-06-17 20:19:47 -04:00
2026-06-13-temporal-coherence-agent-memory research(nightly): temporal-coherence-agent-memory (#564) 2026-06-18 23:28:38 -04:00
2026-06-14-agent-memory-compaction docs: add nightly research README and SEO gist for agent-memory-compaction 2026-06-14 07:22:20 +00:00
2026-06-15-multi-vector-maxsim research: nightly 2026-06-15 — multi-vector MaxSim late interaction (#569) 2026-06-18 23:31:14 -04:00
2026-06-16-coherence-hnsw-search research: add nightly coherence-gated HNSW search PoC (#571) 2026-06-18 23:29:07 -04:00
2026-06-17-hybrid-sparse-dense research(nightly): hybrid sparse-dense search — BM25 + ANN with RRF and RSF (ADR-256) (#576) 2026-06-18 23:28:08 -04:00
2026-06-18-hnsw-delete-repair research: add nightly survey for hnsw-delete-repair 2026-06-18 07:21:39 +00:00
2026-06-19-lsm-ann feat: LSM-ANN write-optimised streaming vector index (ADR-264) (#591) 2026-06-21 18:55:51 -04:00
2026-06-20-pq-adc-search research: add nightly survey for pq-adc-search (#593) 2026-06-21 18:56:06 -04:00
2026-06-21-matryoshka-coarse-fine research(nightly): matryoshka coarse-to-fine ANN search (ADR-264) (#594) 2026-06-21 18:55:59 -04:00
2026-06-24-spann-partition-spill research(nightly): spann-partition-spill — boundary-safe ANN in Rust (#602) 2026-06-25 14:03:59 -04:00
2026-06-25-capability-gated-ann research(nightly): capability-gated-ann — per-vector read access control in ANN search (#604) 2026-06-25 14:05:34 -04:00