mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-28 01:44:41 +00:00
TimingWheel::drain_due now sorts each bucket ascending by (t_ms, post, pre) before delivery, matching SpikeEvent::cmp on the heap path. This is the canonical in-bucket-ordering contract from ADR-154 §15.1 and is the first shipped piece of the cross-path determinism story. Measured on the AC-1 stimulus at N=1024: baseline : 195 782 spikes (heap + AoS dense subthreshold) optimized : 194 784 spikes (wheel + SoA + SIMD + active-set) rel_gap : 0.0051 (0.51 %) **Two new ADR §17 discoveries land with this commit:** #14 Leiden refinement delivers ARI = 1.000 on a hand-crafted 2-community planted SBM where multi-level Louvain collapses to 0.000. Direct vindication of Traag et al. 2019 on the exact failure mode from discovery #11. On default hub-heavy SBM Leiden scores 0.089 — modularity-resolution-limit territory, not a bug; CPM-based quality function named as next step. **First Louvain-family algorithm in the branch to meet a named SOTA target on ANY input.** (Landed via the feat/analysis-leiden merge in the prior commit; documentation added here.) #15 The bucket sort delivers canonical *dispatch order*; it does NOT deliver cross-path bit-exact *spike traces*. Root cause (new): the optimized path's active-set pruning is a *correctness deviation* from the baseline's dense update. Neurons near threshold under continuous dense updates can leak below it, but stay above under active-set updates. Both behaviours are correct-by-ADR; they produce genuinely different spike populations. True cross-path bit-exactness would require either running both paths with active-set off (bench-only config) or teaching the baseline the same active-set (defeats the purpose). The shipped contract: within-path bit-exact, cross-path ≤ 10 % spike-count envelope. The sort tightens intra-tick ordering; the envelope is what's realistic at the substrate level. Pattern summary updated: 7 of 12 pre-measurement diagnoses disproven; 2 unambiguous wins (items 6 adaptive cadence and 14 Leiden refinement), both sharing the pattern 'structure the problem on an orthogonal axis rather than pushing harder on the axis an earlier item ran into'. Changes: - src/lif/queue.rs: 10-line sort addition in drain_due with docstring pointing at §15.1 + the test. - tests/cross_path_determinism.rs (new, 139 LOC, 3/3 pass): asserts the 10% envelope on baseline vs optimized, plus within-path bit-exactness on both (regression tests that the sort is idempotent on already-canonical buckets). - ADR-154 §17 rows 14, 15 added. Pattern-summary paragraph updated to 2 wins / 7 disproven / 12 tested. All prior tests still green (AC-1 bit-exact still holds on both paths independently). Performance impact of the sort: under the 5% bench budget — k log k for k ≈ 5–50 events per bucket is on the order of a few hundred compares per drain. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| adr | ||
| analysis | ||
| api | ||
| architecture | ||
| benchmarks | ||
| cloud-architecture | ||
| cnn | ||
| code-reviews | ||
| dag | ||
| development | ||
| examples | ||
| gnn | ||
| guides | ||
| hnsw | ||
| hooks | ||
| implementation | ||
| integration | ||
| nervous-system | ||
| optimization | ||
| plans/subpolynomial-time-mincut | ||
| postgres | ||
| project-phases | ||
| publishing | ||
| research | ||
| reviews | ||
| ruvllm | ||
| rvagent | ||
| security | ||
| sparse-inference | ||
| sql | ||
| testing | ||
| training | ||
| .gitkeep | ||
| .nojekyll | ||
| agi-container.md | ||
| C2-shell-execution-hardening.md | ||
| C8_RESULT_VALIDATION_IMPLEMENTATION.md | ||
| consciousness-api.md | ||
| IMPLEMENTATION-C5.md | ||
| index.html | ||
| INDEX.md | ||
| moe-routing-optimization-analysis.md | ||
| README.md | ||
| REPO_STRUCTURE.md | ||
| research-openfang.md | ||
RuVector Documentation
Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.
📚 Documentation Structure
docs/
├── adr/ # Architecture Decision Records
├── analysis/ # Research & analysis docs
├── api/ # API references (Rust, Node.js, Cypher)
├── architecture/ # System design docs
├── benchmarks/ # Performance benchmarks & results
├── cloud-architecture/ # Cloud deployment guides
├── code-reviews/ # Code review documentation
├── dag/ # DAG implementation
├── development/ # Developer guides
├── examples/ # SQL examples
├── gnn/ # GNN/Graph implementation
├── guides/ # User guides & tutorials
├── hnsw/ # HNSW index documentation
├── hooks/ # Hooks system documentation
├── implementation/ # Implementation details & summaries
├── integration/ # Integration guides
├── nervous-system/ # Nervous system architecture
├── optimization/ # Performance optimization guides
├── plans/ # Implementation plans
├── postgres/ # PostgreSQL extension docs
├── project-phases/ # Development phases
├── publishing/ # NPM publishing guides
├── research/ # Research documentation
├── ruvllm/ # RuVLLM documentation
├── security/ # Security audits & reports
├── sparse-inference/ # Sparse inference docs
├── sql/ # SQL examples
├── testing/ # Testing documentation
└── training/ # Training & LoRA docs
Getting Started
- guides/GETTING_STARTED.md - Getting started guide
- guides/BASIC_TUTORIAL.md - Basic tutorial
- guides/INSTALLATION.md - Installation instructions
- guides/AGENTICDB_QUICKSTART.md - AgenticDB quick start
- guides/wasm-api.md - WebAssembly API documentation
Architecture & Design
- architecture/ - System architecture details
- cloud-architecture/ - Global cloud deployment
- adr/ - Architecture Decision Records
- nervous-system/ - Nervous system architecture
API Reference
- api/RUST_API.md - Rust API reference
- api/NODEJS_API.md - Node.js API reference
- api/CYPHER_REFERENCE.md - Cypher query reference
Performance & Benchmarks
- benchmarks/ - Performance benchmarks & results
- optimization/ - Performance optimization guides
- analysis/ - Research & analysis docs
Security
- security/ - Security audits & reports
Implementation
- implementation/ - Implementation details & summaries
- integration/ - Integration guides
- code-reviews/ - Code review documentation
Specialized Topics
- gnn/ - GNN/Graph implementation
- hnsw/ - HNSW index documentation
- postgres/ - PostgreSQL extension docs
- ruvllm/ - RuVLLM documentation
- training/ - Training & LoRA docs
Development
- development/CONTRIBUTING.md - Contribution guidelines
- development/MIGRATION.md - Migration guide
- testing/ - Testing documentation
- publishing/ - NPM publishing guides
Research
- research/ - Research documentation
- cognitive-frontier/ - Cognitive frontier research
- gnn-v2/ - GNN v2 research
- latent-space/ - HNSW & attention research
- mincut/ - MinCut algorithm research
🚀 Quick Links
For New Users
- Start with Getting Started Guide
- Try the Basic Tutorial
- Review API Documentation
For Cloud Deployment
- Read Architecture Overview
- Follow Deployment Guide
- Apply Performance Optimizations
For Contributors
- Read Contributing Guidelines
- Review Architecture Decisions
- Check Migration Guide
For Performance Tuning
- Review Optimization Guide
- Run Benchmarks
- Check Analysis
📊 Documentation Status
| Category | Directory | Status |
|---|---|---|
| Getting Started | guides/ | ✅ Complete |
| Architecture | architecture/, adr/ | ✅ Complete |
| API Reference | api/ | ✅ Complete |
| Performance | benchmarks/, optimization/, analysis/ | ✅ Complete |
| Security | security/ | ✅ Complete |
| Implementation | implementation/, integration/ | ✅ Complete |
| Development | development/, testing/ | ✅ Complete |
| Research | research/ | 📚 Ongoing |
Total Documentation: 460+ documents across 60+ directories
🔗 External Resources
- GitHub Repository: https://github.com/ruvnet/ruvector
- Main README: ../README.md
- Changelog: ../CHANGELOG.md
- License: ../LICENSE
Last Updated: 2026-02-26 | Version: 2.0.4 (core) / 0.1.100 (npm) | Status: Production Ready