-
Notifications
You must be signed in to change notification settings - Fork 1
Module index Roadmap
Production index runtime exists across vector/secondary/spatial/graph indexing, acceleration/compression pathways, and index lifecycle/rebuild/tiering operations.
Wave Alignment (see root ROADMAP.md § Program Execution Model):
- Wave B (Q3–Q4 2026): AnnFrontdoor+vector integration gates, GPU backend validation (CUDA/HIP), hybrid retrieval Phase B (buffer lifecycle RAII, concurrency ThreadSanitizer)
- Wave B Exit Criteria: Full 4-layer retrieval chain (search: ANN+vector+graph+LLM) with stable p95/p99 on representative hardware
- Tier 2 Functional Completeness: Index performance critical for all retrieval workloads; blocks RAG Phase B and search Phase B
Hybrid Retrieval Rollout Readiness: 40% 🟡 (issue #5468).
- Phase A (exact-first, CPU fallback): ✅ AnnFrontdoor ready with CPU fallback enforced.
- Phase B (ANN + CPU validation): 🟡 Q3 2026 — buffer lifecycle RAII and concurrency gaps must be fixed.
- Phase C (GPU ANN): ❌ Q4 2026 or later — blocked by gpu module gaps.
- Rollout risk detail:
ai_working/HYBRID_RETRIEVAL_ROLLOUT_PLAN.md §7
ANN Frontdoor formalized (issue #5424): AnnFrontdoor is the single universal retrieval gate for all
ANN queries. All six artifact classes — Document, Chunk, Entity, Adapter, Package, ShardSummary — are
registered as first-class AnnScopeKind values with hot/cold routing and observability.
- [~] hardening backend parity and deterministic fallback across mixed GPU/runtime capabilities (Target: Q3 2026)
- [~] benchmark stabilization for vector search, rebuild, spatial, and quantization hot paths (Target: Q3 2026)
- [~] diagnostics consistency for lifecycle, rebuild, and distributed index incidents (Target: Q3 2026)
- [~] GPU vector index CUDA backend: L2, cosine, inner-product kernels (Target: Q4 2026)
- [~] GPU vector index HIP backend: AMD ROCm support with feature-parity (Target: Q4 2026)
- [~] hybrid retrieval rollout Phase B entry: buffer lifecycle RAII + concurrency hardening (Target: Q3 2026)
Source: MODULE_GAP_ANALYSIS_WAVE2.md §Wave 2-B, gap scanner verified 2026-08-25
Gap count: 5gpu_memory_leak(CRITICAL), 26unchecked_cuda_call, 12iterator_invalidation, 79todo_as_productionlogic
- Implement
CudaUniquePtr<T>RAII wrapper withcudaFree()destructor — fix 5gpu_memory_leakincuda_hnsw_graph_traversal.cpp:362,370,381andgpu_memory_oversubscription.cpp:53(2026-08-26:include/index/cuda_utils.hcreated; all 6 Impl raw-pointer members migrated toCudaUniquePtr<T>;freeDevice()simplified to RAII resets;batchSearchtemporary allocations also wrapped)- Constraints: exception-safe;
cudaFreecalled on all error paths - Errors:
cudaErrorInvalidDevicePointer→ log +IndexErrorCode::GpuMemoryError - Tests:
tests/index/test_wave5_index_hardening.cpp(I1-A..D: null-safety, n=0, move, deleter)
- Constraints: exception-safe;
- Add
THEMIS_CUDA_CHECKafter every kernel launch incuda_hnsw_graph_traversal.cpp,gpu_vector_index.cpp,rotary_embeddings_cuda.cu(26 sites) — returnIndexErrorCode::GpuKernelErroron failure (2026-08-26:THEMIS_CUDA_CHECKandTHEMIS_CUDA_CHECK_BOOLmacros added tocuda_utils.h;batchSearchresult D2H copy sites hardened; tests:test_wave5_index_hardening.cppI2-A,B) - Fix 12
iterator_invalidationingraph_index.cpp:244-248,multi_vector_search.cpp:224,406— vector-resize and concurrent traversal patterns (2026-08-26: range-for over JSON array converted to index-based loop; CSV while-loop annotated; multi_vector_search score/rank push_back sites annotated with Wave-B I3 comment) - Implement CUDA L2/Cosine/Dot-Product kernels in
src/acceleration/cuda/cuda_hnsw_kernels.cu— replace CPU fallbacks; target ≥4× speedup vs CPU baseline on RTX-class GPU (Target: Q4 2026)- Inputs: float32 vectors, batch size ≤ 1e6; outputs: distance matrix + TopK indices
- Constraints: deterministic FP tolerance ≤ 1e-6 vs CPU reference
- Tests:
tests/index/test_ann_cuda_kernel_parity.cpp(L2/cosine/dot CPU vs GPU parity)
- HIP/AMD backend:
HIPVectorBackend::search()— feature parity with CUDA backend (Target: Q4 2026)
- Phase B gate: fix 60% of buffer lifecycle RAII gaps (7,712 total → ~4,600 target) (Target: Q3 2026)
- Phase B gate: ThreadSanitizer clean for Vec KNN insert pipeline (Target: Q3 2026)
- Phase B gate: ANN result validation — output cardinality + range check before tensor layer (2026-08-09: truncation + NaN/negative distance filter added to AnnFrontdoor::search())
- [~] Phase B ctest gate:
test_ann_cpu_parityfor distance and TopK kernels (implemented; environment validation pending) (Target: Q3 2026) - [~] Phase B benchmark gate:
bench_ann_distance_cpu_vs_flat(implemented; environment validation pending) (Target: Q3 2026)
- tighten deterministic behavior under high-volume mixed index operation workloads (Target: Q4 2026)
- extend stress coverage for rebuild/tiering/distributed edge scenarios (Target: Q4 2026)
- improve operator-facing diagnostics for backend and lifecycle degradation incidents (Target: Q4 2026)
- re-baseline p95/p99 envelopes for core vector and secondary index operations (Target: Q1 2027)
- broaden benchmark depth for distributed and advanced retrieval workflows (Target: Q1 2027)
- harden long-running reliability under sustained multi-tenant index pressure (Target: Q1 2027)
- AnnFrontdoor abstraction API defined (
include/index/ann_frontdoor.h) - Decision tree HNSW / ScaNN / DiskANN / Distributed / Flat formalized
- All six artifact scope kinds defined: Document, Chunk, Entity, Adapter, Package, ShardSummary
- Metadata fields for ANN route-aware sharding (ShardMetadata, AnnQueryContext, AnnRetrievalPlan)
- freeze core/acceleration/lifecycle contracts for active major line (2026-08-09: INDEX_CONTRACT.md created; IAnnIndex, AnnFrontdoor, lifecycle contracts frozen)
- define explicit error taxonomy for backend, rebuild, and distribution failure classes (2026-08-09: index_error_codes.h created; IndexErrorCode + IndexError frozen in ranges 1100-1199)
- AnnFrontdoor::search() / planStrategy() / planRetrieval() implemented
- Routing logic for all six artifact classes with hot/cold tier awareness
- Distributed fan-out with cost-aware shard pruning
- TieredIndexManager integration for hot/cold tier resolution
- complete hardening for vector/secondary/spatial/graph index internals (Target: Q4 2026)
- align quantization/compression behavior to bounded runtime contracts (Target: Q4 2026)
- Missing backend → FLAT_BRUTE_FORCE fallback with degraded_continue reason code
- Partial shard failures → partial_results flag + configurable fail-closed behavior
- nullptr query / dim==0 guard with std::invalid_argument
- standardize fail-safe behavior for unsupported/degraded backend scenarios (Target: Q4 2026)
- unify diagnostics across rebuild/tiering/distributed failure incidents (Target: Q4 2026)
- Unit tests for all routing strategies and scope kinds (tests/index/test_ann_frontdoor.cpp)
- Tests for Document, Chunk, Entity scope kind routing and candidate return
- Distributed fan-out, flaky shard, and retry tests
- Hot/cold tier demotion tests
- expand focused regressions for mixed backend/index/lifecycle edge scenarios (Target: Q4 2026)
- extend deterministic stress fixtures for high-concurrency retrieval and update workloads (Target: Q4 2026)
- hot vs cold benchmark for ANN frontdoor routing paths (Target: Q4 2026)
- lock benchmark-backed release gates for index hot paths (Target: Q4 2026)
- validate p95/p99 and throughput behavior against release baselines (Target: Q4 2026)
- ANN frontdoor API documented in include/index/ann_frontdoor.h (Doxygen)
- Artifact class routing table documented in TARGET_ARCHITECTURE.md §2.1
- HNSW vs DiskANN decision tree documented in TARGET_ARCHITECTURE.md §2.1
- core index module docs aligned to source-verifiable behavior
- roadmap/future planning separated from historical changelog entries
- HybridSearch::setAnnFrontdoor() integration point established
- Tensor mid-layer (AdapterRepository, TensorMidLayer) integrates via setAnnFrontdoor()
- Migrate all existing retrieval flows to pass through AnnFrontdoor (2026-08-09: HybridSearch + TensorMidLayer already migrated; ANNFRONTDOOR_ROLLOUT.md documents patterns + remaining callers)
- Rollout guide for existing callers (2026-08-09: ANNFRONTDOOR_ROLLOUT.md created with call patterns, config, backward-compat notes)
- ANN Frontdoor API stable and documented
- HNSW / ScaNN / DiskANN switching validated via unit tests
- All six ANN scope kinds defined and tested
- Shard-aware routing with cost-aware pruning implemented and tested
- core index surfaces documented and source-verified
- module-level security and failure behavior documented
- benchmark mapping documented in performance expectations
- remaining hardening tasks closed for backend/lifecycle edge paths
- release benchmark stabilization complete
- hot vs cold ANN path benchmarks completed
- runtime behavior depends on backend capability, selected index strategy, and operational configuration.
- distributed and advanced acceleration edge scenarios need continued hardening.
- benchmark breadth should continue expanding for specialized index workflows.
- shard-aware routing metadata (ShardMetadata) uses fixed defaults; real cost/freshness injection is future work.
No breaking index contract planned. Any contract-breaking change requires migration notes and changelog entry before merge.
This module is a contributing module in the program-level Wave A → B → C → D execution model.
It does not own a primary wave deliverable but must remain release_critical-green throughout all waves
and must deliver Wave D operability improvements in Q1 2027.
See [[../../ROADMAP.md|ROADMAP]] for the full wave model and exit criteria.
| Task | Description | Status |
|---|---|---|
| [x] W9-13 | Audit and close all 28 CRITICAL scanner FPs; verify brace balance in 6 files | ✅ Done |
| [x] W9-14 | FAISS optional-feature wiring: THEMIS_HAS_FAISS in CMake, stub block verified |
✅ Done |
| [x] W9-15 | GPU Vulkan RAII hardening Phase B entry: VkBufferRaii added, stubs documented |
✅ Done |
- Deliver or validate distributed tracing, high-cardinality stress coverage, exporter reliability, and operator remediation hints as applicable to this module (Target: Q1 2027)
- Contribute to or validate long-duration soak test coverage for this module's primary paths (Target: Q1 2027)
- Ensure runbook coverage for operator-critical scenarios in this module (Target: Q1 2027)
-
release_criticalCI must remain green ondevelopthroughout all waves (Target: ongoing) - p95/p99 benchmarks must be refreshed on representative hardware before Wave D sign-off (Target: Q1 2027)
- No behavioral regression may be introduced into modules in Wave A/B/C scope from changes in this module.
- This module's distributed/acceleration paths fail closed (Target: Q1 2027)
- Benchmark-backed p95/p99 baselines exist on representative hardware (Target: Q1 2027)
- Operator-critical paths have diagnostics, alerts, and runbooks (Target: Q1 2027)
- Architecture-ACCESS-MODEL-IMPLEMENTATION-SUMMARY
- Architecture-ADR-003-pg-dump-sql-parser
- Architecture-BASEENTITY-PRINCIPLE
- Architecture-CACHE-STORAGE-INTEGRATION
- Architecture-CMAKE-ARCHITECTURE
- Architecture-CMAKE-FLAGS-REFERENCE
- Architecture-CMAKE-MODULAR-ARCHITECTURE
- Architecture-CONCERNS-ARCHITECTURE-DIAGRAM
- Architecture-CONCERNS-IMPLEMENTATION-SUMMARY
- Architecture-CONTENT-MODEL
- Architecture-COPILOT-THEMISDB-GRAPH-RAG-BACKEND-ARCHITECTURE
- Architecture-CRYPTO-AND-KEYS
- Architecture-FEATURE-FLAGS-REFERENCE
- Architecture-GPU-ARCHITECTURE-REVIEW-TEMPLATE
- Architecture-HTTP-SHUTDOWN-HARDENING
- Architecture-MIGRATION-GUIDE-CONCERNS
- Architecture-MIGRATION-GUIDE-v13-v14
- Architecture-MODULARIZATION-GUIDE
- Architecture-MODULAR-ARCHITECTURE-ROADMAP
- Architecture-MODULE-ARCHITECTURE-INDEX
- Architecture-P1D01-ISSMPLUGIN-DESIGN-REVIEW
- Architecture-P1-D01-ISSMPLUGIN-DESIGN-REVIEW
- Architecture-P1-D08-MAMBA-GOVERNANCE-CONTRACT
- Architecture-P1-P2-IMPLEMENTATION-COMPLETION-INDEX
- Architecture-PHASE0-COMPLETION-ASSESSMENT
- Architecture-PHASE3-QUERYENGINE-DI-ARCHITECTURE
- Architecture-PHASE4-INDEX-MANAGER-DI
- Architecture-POSTGRESQL-WIRE-PROTOCOL
- Architecture-QUERYENGINE-IMPLEMENTATION-GUIDE
- Architecture-QUERY-SCHEDULING
- Architecture-RAFT-CONSENSUS-DESIGN
- Architecture-README
- Architecture-README-SSM-HYBRID-IMPLEMENTATION
- Architecture-REFACTORING-SUMMARY
- Architecture-RESOURCE-POOLING
- Architecture-SOURCE-DIRECTORY-GUIDE
- Architecture-THEMIS-CORE-GUIDE
- Architecture-UNIFIED-ACCESS-MODEL
- Architecture-WAL-GRPC-MTLS-CONFIGURATION
- Architecture-WIRE-PROTOCOL-RETRY
- Architecture-boltzmann-observability-draft
- Architecture-experimental-logarithmic-vector-storage
- Architecture-llm-wiki-mvp-adr
- Architecture-rewrite-engine-architecture
- Architecture-rope-api-architecture
- Architecture-ssm-gguf-mamba-status
- Architecture-ssm-hybrid-analysis
- Architecture-ssm-hybrid-rollout-plan
- Architecture-ssm-plugin-interface-design-review
- Architecture-transaction-coordinators
- Architecture-wiki-secondary-index
- Architecture-wire-protocol
- Governance-DISABLED-STUB-POLICY
- Governance-DOCS-PR-POLICY
- Governance-GA-PROMOTION-SIGN-OFF
- Governance-GITHUB-MILESTONES-SETUP
- Governance-MATURITY-CLAIM-VERIFICATION-CHECKLIST
- Governance-MATURITY-EVIDENCE-REGISTRY
- Governance-MERGE-GATE-BOT-CONFIG
- Governance-MERGE-GATE-STATUS-LIVE
- Governance-PHASE3-ENFORCEMENT-RUNBOOK
- Governance-PHASE-1-CLOSURE-REPORT
- Governance-PHASE-CLOSURE-POLICY
- Governance-PHASE-DEPENDENCY-GRAPH
- Governance-PLUGIN-SUBMODULE-ROLLBACK
- Governance-PRODUCTION-READY-2026-DELIVERY-PLAN
- Governance-PR-VERSION-TARGETING
- Governance-PR-VERSION-TARGETING-BACKFILL
- Governance-QUERY-MODULE-STATUS
- Governance-README
- Governance-RELEASE-PROMOTION-GATE-POLICY
- Governance-RELEASE-VALIDATION-CHECKLIST
- Governance-SECURITY-MODULE-5671-EVIDENCE-SUMMARY
- Governance-SHARDING-P6-RESIDUAL-RISK-ACCEPTANCE
- Governance-SOURCECODE-COMPLIANCE-GOVERNANCE
- Governance-UPDATES-DEVELOPMENT-STATUS-SIGN-OFF
- Governance-WAVE-C-IMPLEMENTATION-COMPLETE
- Module-acceleration-Roadmap
- Module-access-model-Roadmap
- Module-ai-Roadmap
- Module-analytics-Roadmap
- Module-api-Roadmap
- Module-aql-Roadmap
- Module-auth-Roadmap
- Module-base-Roadmap
- Module-cache-Roadmap
- Module-cdc-Roadmap
- Module-chaos-Roadmap
- Module-chimera-Roadmap
- Module-config-Roadmap
- Module-content-Roadmap
- Module-core-Roadmap
- Module-distributed-knowledge-Roadmap
- Module-distributed-tensor-Roadmap
- Module-document-Roadmap
- Module-ethics-ai-Roadmap
- Module-evaluation-Roadmap
- Module-execution-Roadmap
- Module-exporters-Roadmap
- Module-failover-Roadmap
- Module-geo-Roadmap
- Module-governance-Roadmap
- Module-gpu-Roadmap
- Module-graph-Roadmap
- Module-image-analysis-Roadmap
- Module-importers-Roadmap
- Module-index-Roadmap
- Module-ingestion-Roadmap
- Module-llama-cpp-Roadmap
- Module-llm-Roadmap
- Module-llm-streaming-Roadmap
- Module-llm-wiki-Roadmap
- Module-maintenance-Roadmap
- Module-metadata-Roadmap
- Module-network-Roadmap
- Module-observability-Roadmap
- Module-onnx-clip-Roadmap
- Module-performance-Roadmap
- Module-plugins-Roadmap
- Module-process-Roadmap
- Module-projects-Roadmap
- Module-prompt-engineering-Roadmap
- Module-query-Roadmap
- Module-rag-Roadmap
- Module-replication-Roadmap
- Module-retrieval-Roadmap
- Module-rpc-grpc-Roadmap
- Module-scheduler-Roadmap
- Module-scraper-Roadmap
- Module-search-Roadmap
- Module-security-Roadmap
- Module-server-Roadmap
- Module-sharding-Roadmap
- Module-stable-diffusion-Roadmap
- Module-storage-Roadmap
- Module-temporal-Roadmap
- Module-tensor-Roadmap
- Module-themis-Roadmap
- Module-timeseries-Roadmap
- Module-toolbox-Roadmap
- Module-training-Roadmap
- Module-transaction-Roadmap
- Module-updates-Roadmap
- Module-user-storage-encrypted-Roadmap
- Module-utils-Roadmap
- Module-vector-search-Roadmap
- Module-voice-Roadmap
- Module-whisper-Roadmap