Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions crates/mcp-brain-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Wait 30s before first cycle (let startup finish, data load)
tokio::time::sleep(std::time::Duration::from_secs(30)).await;

// Run an initial enhanced cycle on startup to bootstrap cognitive state (full retrain)
let result = routes::run_enhanced_training_cycle(&train_state, true);
// Run an initial enhanced cycle on startup to bootstrap cognitive state (full retrain).
// spawn_blocking avoids starving HTTP handlers during the CPU-intensive bootstrap.
let result = {
let state = train_state.clone();
tokio::task::spawn_blocking(move || routes::run_enhanced_training_cycle(&state, true))
.await
.unwrap_or_default()
};
tracing::info!(
"Initial cognitive bootstrap: props={}, inferences={}, voice={}, curiosity={}, strange_loop={:.4}",
result.propositions_extracted, result.inferences_derived,
Expand Down Expand Up @@ -115,7 +121,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// to benefit from incremental processing; the function auto-forces a full
// retrain every 24h.
if new_memories > 0 || new_votes > 0 || tick_count % 15 == 0 {
let result = routes::run_enhanced_training_cycle(&train_state, false);
let result = {
let state = train_state.clone();
tokio::task::spawn_blocking(move || {
routes::run_enhanced_training_cycle(&state, false)
})
.await
.unwrap_or_default()
};
tracing::info!(
"Cognitive cycle #{} ({}): props={}, inferences={}, voice={}, auto_votes={}, \
curiosity={}, sona_patterns={}, strange_loop={:.4}, lora_auto={}, processed={}/{}",
Expand Down
2 changes: 1 addition & 1 deletion crates/mcp-brain-server/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ pub fn run_training_cycle(state: &AppState) -> TrainingCycleResult {
}

/// Enhanced training result (ADR-110)
#[derive(Debug, Clone, serde::Serialize)]
#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct EnhancedTrainingResult {
pub sona_message: String,
pub sona_patterns: usize,
Expand Down
2 changes: 1 addition & 1 deletion crates/ruvector-postgres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruvector-postgres"
version = "0.3.0"
version = "2.0.1"
edition = "2021"
license = "MIT"
description = "High-performance PostgreSQL vector database extension v2 - pgvector drop-in replacement with 230+ SQL functions, SIMD acceleration, Flash Attention, GNN layers, hybrid search, multi-tenancy, self-healing, and self-learning capabilities"
Expand Down
2 changes: 1 addition & 1 deletion crates/ruvector-postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Multi-stage Dockerfile for ruvector-postgres extension
# Builds the extension and creates a PostgreSQL image with it installed
# v0.3.1: Fixes — Cypher self-reference, graph/RDF persistence, SONA dimension panic
# v2.0.1: Extension version aligned with Docker image tag (fixes #271)

# Build stage
# Using nightly Rust to support edition2024 crates in the registry
Expand Down
Loading