Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
//! Full-stack integration tests: All components together
|
||||
|
||||
#[cfg(test)]
|
||||
mod full_stack_integration {
|
||||
use super::*;
|
||||
// use exo_core::*;
|
||||
// use exo_manifold::*;
|
||||
// use exo_hypergraph::*;
|
||||
// use exo_temporal::*;
|
||||
// use exo_federation::*;
|
||||
// use exo_backend_classical::*;
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_complete_cognitive_substrate() {
|
||||
// Test complete system: manifold + hypergraph + temporal + federation
|
||||
//
|
||||
// // Setup
|
||||
// let backend = ClassicalBackend::new(config);
|
||||
// let manifold = ManifoldEngine::new(backend.clone());
|
||||
// let hypergraph = HypergraphSubstrate::new(backend.clone());
|
||||
// let temporal = TemporalMemory::new();
|
||||
// let federation = FederatedMesh::new(fed_config);
|
||||
//
|
||||
// // Scenario: Multi-agent collaborative memory
|
||||
// // 1. Store patterns with temporal context
|
||||
// let p1 = temporal.store(pattern1, &[]).unwrap();
|
||||
//
|
||||
// // 2. Deform manifold
|
||||
// manifold.deform(&pattern1, 0.8);
|
||||
//
|
||||
// // 3. Create hypergraph relationships
|
||||
// hypergraph.create_hyperedge(&[p1, p2], &relation).unwrap();
|
||||
//
|
||||
// // 4. Query with causal constraints
|
||||
// let results = temporal.causal_query(&query, now, CausalConeType::Past);
|
||||
//
|
||||
// // 5. Federate query
|
||||
// let fed_results = federation.federated_query(&query, FederationScope::Global).await;
|
||||
//
|
||||
// // Verify all components work together
|
||||
// assert!(!results.is_empty());
|
||||
// assert!(!fed_results.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_agent_memory_lifecycle() {
|
||||
// Test complete memory lifecycle:
|
||||
// Storage -> Consolidation -> Retrieval -> Forgetting -> Federation
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_cross_component_consistency() {
|
||||
// Test that all components maintain consistent state
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//! Integration tests: Manifold Engine + Hypergraph Substrate
|
||||
|
||||
#[cfg(test)]
|
||||
mod manifold_hypergraph_integration {
|
||||
use super::*;
|
||||
// use exo_manifold::*;
|
||||
// use exo_hypergraph::*;
|
||||
// use exo_backend_classical::ClassicalBackend;
|
||||
|
||||
#[test]
|
||||
fn test_manifold_with_hypergraph_structure() {
|
||||
// Test querying manifold with hypergraph topological constraints
|
||||
// let backend = ClassicalBackend::new(config);
|
||||
// let mut manifold = ManifoldEngine::new(backend.clone());
|
||||
// let mut hypergraph = HypergraphSubstrate::new(backend);
|
||||
//
|
||||
// // Store patterns in manifold
|
||||
// let p1 = manifold.deform(pattern1, 0.8);
|
||||
// let p2 = manifold.deform(pattern2, 0.7);
|
||||
// let p3 = manifold.deform(pattern3, 0.9);
|
||||
//
|
||||
// // Create hyperedges linking patterns
|
||||
// let relation = Relation::new("semantic_cluster");
|
||||
// hypergraph.create_hyperedge(&[p1, p2, p3], &relation).unwrap();
|
||||
//
|
||||
// // Query manifold and verify hypergraph structure
|
||||
// let results = manifold.retrieve(query, 10);
|
||||
//
|
||||
// // Verify results respect hypergraph topology
|
||||
// for result in results {
|
||||
// let edges = hypergraph.hyperedges_containing(result.id);
|
||||
// assert!(!edges.is_empty()); // Should be connected
|
||||
// }
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_persistent_homology_on_manifold() {
|
||||
// Test computing persistent homology on learned manifold
|
||||
// let manifold = setup_manifold_with_patterns();
|
||||
// let hypergraph = setup_hypergraph_from_manifold(&manifold);
|
||||
//
|
||||
// let diagram = hypergraph.persistent_homology(1, (0.0, 1.0));
|
||||
//
|
||||
// // Verify topological features detected
|
||||
// assert!(diagram.num_features() > 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hypergraph_guided_retrieval() {
|
||||
// Test using hypergraph structure to guide manifold retrieval
|
||||
// Retrieve patterns, then expand via hyperedge traversal
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
//! Integration tests: Temporal Memory + Federation
|
||||
|
||||
#[cfg(test)]
|
||||
mod temporal_federation_integration {
|
||||
use super::*;
|
||||
// use exo_temporal::*;
|
||||
// use exo_federation::*;
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_federated_temporal_query() {
|
||||
// Test temporal queries across federation
|
||||
// let node1 = setup_federated_node_with_temporal(config1);
|
||||
// let node2 = setup_federated_node_with_temporal(config2);
|
||||
//
|
||||
// // Join federation
|
||||
// node1.join_federation(&node2.address()).await.unwrap();
|
||||
//
|
||||
// // Store temporal patterns on node1
|
||||
// let p1 = node1.temporal_memory.store(pattern1, &[]).unwrap();
|
||||
// let p2 = node1.temporal_memory.store(pattern2, &[p1]).unwrap();
|
||||
//
|
||||
// // Query from node2 with causal constraints
|
||||
// let query = Query::new("test");
|
||||
// let results = node2.federated_temporal_query(
|
||||
// &query,
|
||||
// SubstrateTime::now(),
|
||||
// CausalConeType::Past,
|
||||
// FederationScope::Global
|
||||
// ).await;
|
||||
//
|
||||
// // Should receive results from node1
|
||||
// assert!(!results.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_distributed_memory_consolidation() {
|
||||
// Test memory consolidation across federated nodes
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[tokio::test]
|
||||
async fn test_causal_graph_federation() {
|
||||
// Test causal graph spanning multiple nodes
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user