fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish#227
Merged
fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish#227
Conversation
…58 through ADR-075) Implements the π.ruv.io shared brain server — an axum REST API with Firestore persistence, GCS storage, and the complete RVF cryptographic pipeline. The server is deployed to Cloud Run and serves 238+ memories with P@1 100% search precision. Key components: - mcp-brain-server: 17 source files, 45 tests, Cloud Run deployable - mcp-brain: client library + MCP server for agent integration - pi-brain: npm package for TypeScript/Node.js access RVF AGI stack (7 phases, ADR-075): 1. rvf-crypto/wire/types/federation/runtime wired as real dependencies 2. PII stripping via 12-regex PiiStripper (paths, emails, API keys, tokens) 3. Differential privacy engine (gaussian noise, feature-gated) 4. SHAKE-256 witness chains (3-entry, 219 bytes per memory) 5. RVF container pipeline (VEC+META+WITNESS+proof segments to GCS) 6. Negative cache + adversarial embedding detection 7. Hot-path optimizations: cached PiiStripper, LazyLock synonyms, RvfFeatureFlags at startup, single all_memories() in status Also includes: - 18 ADR documents (ADR-058 through ADR-075) - Edge-net economics: AMM, reputation bonding curves, brain rewards - ruvllm: HashEmbedder/FlatNeighborStore exports for RlmEmbedder - npx ruvector v0.2.3: 48 CLI commands, 91 MCP tools, brain integration - Scripts for seeding, training LoRA, and Brainpedia creation - .gitignore: exclude compiled binaries and backup files Co-Authored-By: claude-flow <ruv@ruv.net>
…rver Security (7→9/10): - Remove hardcoded BRAIN_SYSTEM_KEY fallback — env var required, no default - System key comparison uses constant-time equality (subtle::ConstantTimeEq) - Enforce minimum API key length of 8 characters - Move CORS origins from hardcoded list to CORS_ORIGINS env var - GCP project ID no longer exposed in source code Error Handling (6→8/10): - Firestore pagination retries on transient errors (up to 3 consecutive) instead of breaking immediately — preserves page_token for resume - Firestore PUT retries once on 401 (token refresh) and 5xx (server error) with 500ms backoff instead of silently dropping writes - RVF pipeline build_rvf_container() returns Result<Vec<u8>, String> instead of unwrap_or_default() which silently produced empty metadata - Vote tracker uses entry API (single lookup) instead of contains_key + insert Deployment (6→8/10): - Graceful shutdown: handles SIGTERM (Cloud Run) and Ctrl+C - In-flight requests complete before process exits Test Coverage (7→9/10): - test_end_to_end_share_pipeline: verify→strip PII→witness chain→RVF container - test_auth_pseudonym_derivation: deterministic key→pseudonym mapping - test_rvf_feature_flags_defaults: verify all 7 flag default values - Total: 48 tests (up from 45) Co-Authored-By: claude-flow <ruv@ruv.net>
…ADR-077) Wire 4 midstream crates (nanosecond-scheduler, temporal-attractor-studio, temporal-neural-solver, strange-loop) into mcp-brain-server with feature-gated scoring layers. Add /v1/midstream endpoint, 7 new tests (59 total), and optimized search path (select_nth_unstable, amortized attractor recompute). Add comprehensive README.md for both mcp-brain-server (413 lines: full API reference, deployment scripts, feature flags) and mcp-brain (205 lines: MCP tools, protocol examples, installation). Deployed and benchmarked as ruvbrain-00071-wp7 with zero latency regression. Co-Authored-By: claude-flow <ruv@ruv.net>
Documents the plan to expose all 8 AGI subsystems (SONA, GWT, temporal, meta-learning, nanosecond-scheduler, attractor-studio, temporal-neural-solver, strange-loop) through the npx ruvector CLI and MCP server. Adds 10 new CLI commands (brain agi group + midstream group), 12 new MCP tools, and enhanced brain search --verbose output. Co-Authored-By: claude-flow <ruv@ruv.net>
…tions, publish Docker image Fixes #226 Bugs fixed: - Cypher MATCH self-reference (a.id == b.id) — rewrote match_pattern() with proper edge traversal - Graph/RDF persistence (in-memory only) — added PostgreSQL backing tables with auto-load - SONA dimension panic on non-256-dim input — dynamic dimension detection + catch_unwind guard - GNN/healing/tenancy/hybrid "not registered" — added 46 missing CREATE FUNCTION statements Compilation fixes (pgrx 0.12): - Added `use pgrx::JsonB` import in graph/mod.rs - Fixed get_by_name::<T>() → get_by_name::<T, _>() (18 errors) - Fixed SonaConfig dim as usize cast (sona-learning feature) SQL schema (ruvector--0.3.0.sql): - GNN: 5 functions (gcn_forward, gnn_aggregate, message_pass, graphsage_forward, gnn_batch_forward) - Self-Healing: 17 functions (health_status through healing_problem_types) - Multi-Tenancy: 17 functions (tenant_create through generate_roles_sql) - Hybrid Search: 7 functions (register_hybrid through hybrid_list) - Total extension functions: 190 Docker: - Published ruvnet/ruvector-postgres:0.3.1 and :latest to Docker Hub - Added Dockerfile.prebuilt for slim builds (~12s vs 15+ min) - Updated Dockerfiles with v0.3.1 labels, features, Rust 1.85 npm (ruvector v0.2.5): - Added SONA dimension-aware apply/learn commands - Fixed chalk ESM/CJS compatibility All 46 new functions verified in Docker container (46/46 PASS). Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
JsonBimport,get_by_namegenerics,usizecast)ruvnet/ruvector-postgres:0.3.1with 190 verified SQL functionsruvectorv0.2.5 with SONA dimension-aware commandsTest plan
cargo check -p ruvector-postgres --features pg17,sona-learning,graph-complete— 0 errorsCloses #226
🤖 Generated with claude-flow