Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(review): unmount guard, sink parity, error parity; guards fed; merge main\n\nReview round plus the two lanes it exposed. The namespace-summaries\nupdate now honours cancelledRef like every sibling state write; the tree\nCLI's non-module branch regains its event sink and propagates a config\nerror as the true cause, mirroring the helper's contract; the leaked\ngate_probe example is deleted (a debugging throwaway that rode an add -A).\n\nThree test-mock factories learn the new tauriCommands export -- a\nfactory mock without it turned every status-hook render into an\nunhandled rejection, which is what actually failed the frontend lane\nwhile 778 files passed. The kernel's capability-string drift witness\nwidens its deliberate literal to 26 for v1.13.7's typed-ingestion round.\nMerged current main.\n

Shanu07ead0e2d016
diff --git a/app/src/components/intelligence/MemoryTreeStatusPanel.test.tsx b/app/src/components/intelligence/MemoryTreeStatusPanel.test.tsx
index 6b90db8ff2..3a3587da01 100644
--- a/app/src/components/intelligence/MemoryTreeStatusPanel.test.tsx
+++ b/app/src/components/intelligence/MemoryTreeStatusPanel.test.tsx
@@ -50,6 +50,7 @@ vi.mock('../../utils/tauriCommands', async importOriginal => {
memoryTreeSetEnabled: (...args: unknown[]) => mockSetEnabled(...args),
memorySyncStatusList: (...args: unknown[]) => mockSyncStatusList(...args),
memoryTreeRetryFailed: (...args: unknown[]) => mockRetryFailed(...args),
+ memoryNamespaceSummaries: vi.fn(async () => ({ namespaces: [], total_documents: 0 })),
};
});
diff --git a/app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx b/app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx
index c18e25c3bf..085c18c723 100644
--- a/app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx
+++ b/app/src/components/intelligence/__tests__/MemoryWorkspace.test.tsx
@@ -10,6 +10,9 @@ import { MemoryWorkspace } from '../MemoryWorkspace';
// out separately so the workspace mounts cleanly without hitting the
// network.
vi.mock('../../../utils/tauriCommands', () => ({
+ // The status hook polls this alongside pipeline status; a factory mock
+ // without it turns every render into an unhandled rejection.
+ memoryNamespaceSummaries: vi.fn(async () => ({ namespaces: [], total_documents: 0 })),
isTauri: vi.fn(() => true),
memoryTreeGraphExport: vi.fn(),
memoryTreeFlushNow: vi.fn(),
diff --git a/app/src/components/intelligence/memoryTreeStatusHelpers.tsx b/app/src/components/intelligence/memoryTreeStatusHelpers.tsx
index 02bbc4330c..1c887829f8 100644
--- a/app/src/components/intelligence/memoryTreeStatusHelpers.tsx
+++ b/app/src/components/intelligence/memoryTreeStatusHelpers.tsx
@@ -51,8 +51,12 @@ export function useMemoryTreeStatus(): {
// number, from a different store than every tree tile (#5932 field
// finding — a user watched 100 items land while the tree figure sat at 2).
void memoryNamespaceSummaries()
- .then(r => setStoredItems(r.total_documents))
- .catch(() => setStoredItems(null));
+ .then(r => {
+ if (!cancelledRef.current) setStoredItems(r.total_documents);
+ })
+ .catch(() => {
+ if (!cancelledRef.current) setStoredItems(null);
+ });
try {
// Fetch pipeline + per-integration health in parallel so the strip
// and the tiles share a single 1.5s / 4s adaptive tick (#2763).
diff --git a/app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx b/app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx
index 650df50761..4026c440e0 100644
--- a/app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/MemoryDataPanel.test.tsx
@@ -26,6 +26,9 @@ const hoisted = vi.hoisted(() => ({
}));
vi.mock('../../../../utils/tauriCommands', () => ({
+ // The status hook polls this alongside pipeline status; a factory mock
+ // without it turns every render into an unhandled rejection.
+ memoryNamespaceSummaries: vi.fn(async () => ({ namespaces: [], total_documents: 0 })),
isTauri: hoisted.mockIsTauri,
openhumanGetConfig: hoisted.mockGetConfig,
openhumanUpdateMemorySettings: hoisted.mockUpdateMemorySettings,
diff --git a/examples/gate_probe.rs b/examples/gate_probe.rs
deleted file mode 100644
index 8d2797ca19..0000000000
--- a/examples/gate_probe.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-//! One-shot memory doctor over the active user's real workspace:
-//!
-//! cargo run --example run_memory_doctor
-//!
-//! Run it with NO `OPENHUMAN_WORKSPACE` override for a logged-in install —
-//! the loader then resolves the active-user marker exactly like the app and
-//! reads `users/<id>/config.toml`. Pointing the env var at a user-scoped
-//! workspace instead synthesizes `users/<id>/.openhuman/config.toml`, which
-//! does not exist, and the doctor silently reports a default (unconfigured)
-//! config. The stderr probe line prints which config actually loaded so a
-//! wrong verdict is visible as a wrong path.
-
-#[tokio::main(flavor = "multi_thread")]
-async fn main() -> anyhow::Result<()> {
- let mut config = openhuman_core::openhuman::config::Config::load_or_init()
- .await
- .unwrap_or_default();
- config.apply_env_overrides();
-
- openhuman_core::openhuman::memory::host::install_memory_event_sink();
- #[cfg(feature = "modules")]
- openhuman_core::openhuman::modules::memory::set_modules_policy(std::sync::Arc::new(
- config.clone(),
- ));
-
- eprintln!(
- "config_path={} embeddings_provider={:?} embedding_endpoint={:?}",
- config.config_path.display(),
- config.embeddings_provider,
- config.memory_tree.embedding_endpoint,
- );
-
- let report = openhuman_core::openhuman::memory::tree::health::report::run_doctor(&config).await;
- println!("{}", serde_json::to_string_pretty(&report)?);
- tokio::time::sleep(std::time::Duration::from_secs(20)).await;
- Ok(())
-}
diff --git a/src/core/subsystem/driver_tests.rs b/src/core/subsystem/driver_tests.rs
index 98da381f6d..40e3f71b62 100644
--- a/src/core/subsystem/driver_tests.rs
+++ b/src/core/subsystem/driver_tests.rs
@@ -196,11 +196,13 @@ fn every_memory_contract_capability_string_maps_into_driver_capabilities() {
// A literal, so adding a family forces a look at this test rather than
// sliding past it. 13 → 17 when the port added People, Chunks, Retrieval
// and Profile, then 18 with Episodic, then 20 when tinymemory v1.7.0 added
- // SourceSync and CodingSessions, then 21 with v1.13.2 adding Scoring. The
- // assertion above is the load-bearing one: it says the mapping is lossless,
- // which is what makes the kernel's opaque-string set able to carry the
- // contract without knowing what a memory capability is.
- assert_eq!(caps.len(), 21);
+ // SourceSync and CodingSessions, then 21 with v1.13.2 adding Scoring,
+ // then 26 with v1.13.7's typed-ingestion round (Document/Conversation/
+ // Learning/Event ingest and Answer). The assertion above is the
+ // load-bearing one: it says the mapping is lossless, which is what makes
+ // the kernel's opaque-string set able to carry the contract without
+ // knowing what a memory capability is.
+ assert_eq!(caps.len(), 26);
assert!(
caps.contains("tool_memory"),
"the one non-identity snake_case family must survive"
diff --git a/src/openhuman/memory/tree/tree_runtime/cli.rs b/src/openhuman/memory/tree/tree_runtime/cli.rs
index e93a501bdf..66974c48dc 100644
--- a/src/openhuman/memory/tree/tree_runtime/cli.rs
+++ b/src/openhuman/memory/tree/tree_runtime/cli.rs
@@ -353,10 +353,14 @@ async fn load_config() -> Result<crate::openhuman::config::Config> {
}
#[cfg(not(feature = "modules"))]
{
+ // Mirrors the helper's contract: a config error propagates as the
+ // true cause instead of silently dropping operator settings, and the
+ // event sink installs exactly as it always has on this path.
let mut config = crate::openhuman::config::Config::load_or_init()
.await
- .unwrap_or_default();
+ .map_err(|error| anyhow::anyhow!("load config: {error}"))?;
config.apply_env_overrides();
+ crate::openhuman::memory::host::install_memory_event_sink();
Ok(config)
}
}