Commit graph

4 commits

Author SHA1 Message Date
rUv
9d4e3ea716
fix(sql): rename access method hnsw → ruhnsw to match Rust source (#496)
All Rust source code (maintenance queries, scan functions, tenancy SQL)
references the access method as `ruhnsw`, but the SQL registration files
had it as `hnsw`, causing `CREATE INDEX USING ruhnsw` to fail with
"access method not found". Historical migration files left unchanged.

Closes #48

Co-authored-by: ruvnet <ruvnet@gmail.com>
2026-05-22 03:05:24 -04:00
rUv
e860b24b89 fix: HNSW index bugs, agent/SPARQL crashes, lru security (#152, #164, #167, #171, #148)
HNSW fixes:
- Extract vector dimensions from column atttypmod instead of hardcoding 128,
  which caused corrupted indexes for non-128-dim embeddings (#171, #164)
- Add page boundary checks in read_vector/read_neighbors to prevent
  segfaults on large tables with >100K rows (#164)
- Use BinaryHeap::into_sorted_vec() for deterministic result ordering
  instead of into_iter() which yields arbitrary order (#171)
- Handle non-kNN scans (COUNT, WHERE IS NOT NULL) gracefully by returning
  false from hnsw_gettuple when no ORDER BY operator is present (#152)

Agent/SPARQL fixes:
- Fix SQL type mismatch: ruvector_list_agents() and
  ruvector_find_agents_by_capability() now use RETURNS TABLE(...)
  matching the Rust TableIterator signatures instead of RETURNS SETOF jsonb (#167)
- Add empty query validation to ruvector_sparql() and
  ruvector_sparql_json() to prevent panics on invalid input (#167)
- Change workspace panic profile from "abort" to "unwind" so pgrx can
  convert Rust panics to PostgreSQL errors instead of killing the backend (#167)

Security:
- Bump lru dependency from 0.12 to 0.16 in ruvector-graph, ruvector-cli,
  and ruvLLM to resolve GHSA-xpfx-fvgv-hgqp Stacked Borrows violation (#148)

Version bumps: workspace 2.0.3, ruvector-postgres 2.0.2

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-02-15 06:15:00 +00:00
rUv
4d7166941d fix(ruvector-postgres): IVFFlat storage, HNSW query, SQL injection fixes
## Index Fixes
- IVFFlat: Implement write_inverted_list() for proper vector storage
- IVFFlat: Update build to write inverted lists with correct page refs
- IVFFlat: Add rewrite_centroids() for in-place centroid updates
- HNSW: Fix hnsw_rescan() to extract query vectors from datum
- HNSW: Implement build_index_from_heap() with proper heap scan

## Security Fixes (3 CRITICAL)
- CVE-PENDING-001: SQL injection in tenant isolation (isolation.rs)
- CVE-PENDING-002: SQL injection in audit logging (operations.rs)
- CVE-PENDING-003: SQL injection via drop partition (isolation.rs)

## New Files
- src/tenancy/validation.rs: Input validation for tenant IDs
- docs/SECURITY_AUDIT_REPORT.md: Full security audit documentation

## Verified
- IVFFlat index build:  Collects and stores vectors
- IVFFlat query:  Returns correct results
- HNSW index build:  Working
- HNSW query:  Returns correct results

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 04:05:58 +00:00
rUv
893c93ab3e feat(ruvector-postgres): Complete v2.0.0 with 148 SQL functions
## Summary
Complete RuVector-Postgres v2 implementation with all major features:
- 148 pg_extern SQL functions across 27 source files
- Docker Hub publication ready with multi-arch builds (PG14-17)
- Full pgvector drop-in compatibility verified

## New Features
- **Hybrid Search** (7 functions): BM25 + vector fusion with RRF/linear/learned
- **Multi-Tenancy** (17 functions): Tenant isolation, RLS, quotas
- **Self-Healing** (23 functions): Problem detection, remediation strategies
- **Integrity Control** (4 functions): Mincut gating, contracted graphs
- **Self-Learning** (10 functions): Query trajectory tracking, optimization

## Infrastructure
- GitHub Actions workflow for Docker Hub publication
- CI workflow for testing PG14-17
- Integration test Docker setup with baseline testing
- Benchmark suite for e2e, hybrid, integrity testing

## Files Changed
- New: src/healing/, src/hybrid/, src/integrity/, src/tenancy/, src/workers/
- New: sql/ruvector--2.0.0.sql (SQL migration)
- New: docker/publish-dockerhub.sh, docker-compose.integration.yml
- Updated: Dockerfile for PG17 default, multi-arch builds
- Updated: HNSW/IVFFlat index access methods with full pgrx AM support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:41:29 +00:00