refactor(subconscious): structured memory_diff → prepare_context → decide tick (#4107)

This commit is contained in:
Steven Enamakel
2026-06-25 09:20:47 -07:00
committed by GitHub
parent 71b2609aa4
commit 25e6ae96f3
37 changed files with 615 additions and 1642 deletions
+7 -9
View File
@@ -42,21 +42,22 @@ async fn ingest_doc(
result.document_id
}
/// Two-tick E2E test — verifies the agent-per-tick model can process
/// ingested memory data and persist tick state.
/// Two-tick E2E test — verifies the structured tick model persists tick
/// state across runs. The first tick has no world baseline, so it
/// establishes one; subsequent ticks diff against it. (Exercising the full
/// diff → decide path additionally requires configured + synced memory
/// sources; this smoke test focuses on the tick lifecycle + state.)
#[tokio::test]
#[ignore] // requires running Ollama
async fn two_tick_e2e_with_real_ollama() {
use openhuman_core::openhuman::embeddings::NoopEmbedding;
use openhuman_core::openhuman::memory::{MemoryClient, UnifiedMemory};
use openhuman_core::openhuman::memory::UnifiedMemory;
use openhuman_core::openhuman::subconscious::store;
let tmp = tempfile::tempdir().expect("tempdir");
let workspace = tmp.path();
let memory = UnifiedMemory::new(workspace, Arc::new(NoopEmbedding), None).expect("init memory");
let memory_client =
MemoryClient::from_workspace_dir(workspace.to_path_buf()).expect("memory client");
// Ingest test data
ingest_doc(
@@ -80,10 +81,7 @@ async fn two_tick_e2e_with_real_ollama() {
config.local_ai.runtime_enabled = true;
config.local_ai.usage.subconscious = true;
let engine = openhuman_core::openhuman::subconscious::SubconsciousEngine::new(
&config,
Some(Arc::new(memory_client)),
);
let engine = openhuman_core::openhuman::subconscious::SubconsciousEngine::new(&config);
// Tick 1
println!("\n=== TICK 1 ===");