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
2 changes: 1 addition & 1 deletion .github/workflows/ci-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ jobs:
#
# This asserts the calibration still holds. If it fails, every
# projection built on the simulator is suspect until it is fixed.
run: python3 scripts/dep-sim.py --cut-nothing --expect-names 268
run: python3 scripts/dep-sim.py --cut-nothing --expect-names 264

- name: Guard — new feature-gated test modules must be acknowledged
# Self-maintaining coverage: the set of source files that #[cfg]-gate a test on
Expand Down
77 changes: 66 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,16 @@ should_implement_trait = "allow"
too_many_arguments = "allow"
while_let_loop = "allow"

# The tinycortex vendored above takes `tinymemory-api` by git (it re-exports
# the TinyMemory contract instead of duplicating it, tinymemory#18 §A1).
# Without this entry cargo resolves that git copy *and* the path copy under
# vendor/tinymemory as two distinct crates, and `tinymemory_api::MemoryCategory`
# from one is not the same type as from the other — the exact duplication §A1
# deleted, reintroduced by dependency resolution. Same entry tinymemory's own
# workspace carries; the key has no `.git` suffix, matching the dep URL.
[patch."https://github.com/tinyhumansai/tinymemory"]
tinymemory-api = { path = "vendor/tinymemory/api" }

[patch.crates-io]
# Upstream 0.2.1 enables reqwest's default native-tls backend even though it
# also requests rustls. Patch the official release locally so Linux/macOS do
Expand Down
53 changes: 42 additions & 11 deletions app/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ sandbox-bubblewrap = []
# e2e-test-support`. See app/scripts/e2e-build.sh.
e2e-test-support = ["openhuman_core/e2e-test-support"]

# The tinycortex vendored above takes `tinymemory-api` by git (it re-exports
# the TinyMemory contract instead of duplicating it, tinymemory#18 §A1).
# Without this entry cargo resolves that git copy *and* the path copy under
# vendor/tinymemory as two distinct crates, and `tinymemory_api::MemoryCategory`
# from one is not the same type as from the other — the exact duplication §A1
# deleted, reintroduced by dependency resolution. Same entry tinymemory's own
# workspace carries; the key has no `.git` suffix, matching the dep URL.
[patch."https://github.com/tinyhumansai/tinymemory"]
tinymemory-api = { path = "../../vendor/tinymemory/api" }

[patch.crates-io]
# Keep reqwest defaults disabled in this independent Cargo world too. Without
# this patch, the registry release reintroduces native-tls/OpenSSL on Linux.
Expand Down
18 changes: 17 additions & 1 deletion scripts/kernel-floor.limits
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@
# Simulate with: scripts/dep-sim.py --cut <crates>
#
# History
# 286/264/2 2026-08-19 tinymemory bumped across its #18 arc (-4 names, 0
# packages net, native unchanged). A shed, not a gate, and
# a downstream one: tinymemory#43 (§D2) moved `axum` from
# tinymemory-core's normal dependencies to dev-only — its
# four references there were all inside `mod tests` — and
# that takes the whole tail out of this always-on profile:
# `axum`, `axum-core`, `axum-macros`, `matchit`,
# `httpdate`, `serde_path_to_error` leave (-6). Two enter:
# `tinymemory-sources` and `tinymemory-sync`, the crates
# tinymemory#46/#48 split the source readers and the
# engine-free Composio sync into — both already-compiled
# code relocated, so packages stay flat. Net -4 names.
# Measured on CI (Linux): `scripts/kernel-floor.sh flows
# --json` -> 286/264/2. (macOS resolves 286/265/2 per the
# documented target skew.) The crate-set diff old-pin vs
# new-pin confirms exactly the six-out/two-in above.
# 286/268/2 2026-08-15 tinywallet de-vendored back to a submodule + module
# (-11 packages / -11 names). The inlined `tinywallet`
# crate copy is deleted; key derivation and transaction
Expand Down Expand Up @@ -316,4 +332,4 @@
# (libsqlite3-sys, ring) — see docs/plans MIGRATION-PLAN G6.
# 307/284 2026-08-12 Re-baseline after the upstream lockfile resolution;
# `flows` remains at two native packages.
flows:286:268:2
flows:286:264:2
12 changes: 11 additions & 1 deletion src/openhuman/integrations/composio/ops/connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,17 @@ pub async fn composio_delete_connection(
Err(_) => None,
};
let memory_targets = if clear_memory {
composio_memory_targets_for_connection(config, toolkit.as_deref(), connection_id)
// The LIVE process client — target discovery loads notion sync state
// through it. Resolved here, not constructed inside the discovery:
// `MemoryClient::from_workspace_dir` starts an ingestion worker at
// construction, so building one per delete put a second worker on the
// live store every time.
let memory = crate::openhuman::memory::ops::helpers::active_memory_client()
.await
.map_err(|error| {
format!("[composio] delete_connection cannot resolve the memory client: {error}")
})?;
composio_memory_targets_for_connection(&memory, toolkit.as_deref(), connection_id)
.await
.map_err(|error| {
format!("[composio] delete_connection cannot enumerate memory targets: {error:#}")
Expand Down
23 changes: 11 additions & 12 deletions src/openhuman/integrations/composio/ops/memory_cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use std::sync::Arc;

use crate::openhuman::config::Config;
use crate::openhuman::memory::MemoryClient;
use tinymemory_core::store::chunks::store as memory_tree_store;
use tinymemory_core::store::chunks::types::SourceKind;
use tinymemory_core::store::MemoryClientRef;

#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum MemoryCleanupTarget {
Expand Down Expand Up @@ -48,8 +48,14 @@ impl MemoryCleanupTarget {
}
}

/// `memory` is the caller's handle on the live store — the RPC path resolves
/// the process client, tests pass one bound to their own workspace. Taken as a
/// parameter rather than constructed here: `MemoryClient::from_workspace_dir`
/// starts an ingestion worker at construction, so building one per
/// connection-delete put a second worker on the live store every time — the
/// exact hazard `memory::bypass_allowlist_tests` names for that constructor.
pub(crate) async fn composio_memory_targets_for_connection(
config: &Config,
memory: &MemoryClientRef,
toolkit: Option<&str>,
connection_id: &str,
) -> anyhow::Result<Vec<MemoryCleanupTarget>> {
Expand All @@ -63,7 +69,7 @@ pub(crate) async fn composio_memory_targets_for_connection(
format!("slack:{connection_id}"),
)],
"gmail" => gmail_memory_sources_for_connection(connection_id),
"notion" => notion_memory_targets_for_connection(config, connection_id).await?,
"notion" => notion_memory_targets_for_connection(memory, connection_id).await?,
"drive" | "googledrive" | "google_drive" => {
drive_memory_targets_for_connection(connection_id)
}
Expand All @@ -82,19 +88,12 @@ fn gmail_memory_sources_for_connection(connection_id: &str) -> Vec<MemoryCleanup
}

async fn notion_memory_targets_for_connection(
config: &Config,
memory: &MemoryClientRef,
connection_id: &str,
) -> anyhow::Result<Vec<MemoryCleanupTarget>> {
let mut targets = connection_scoped_document_targets("notion", connection_id);

let memory = Arc::new(
MemoryClient::from_workspace_dir(config.workspace_dir.clone()).map_err(|error| {
anyhow::anyhow!(
"failed to open memory client for notion cleanup target discovery: {error}"
)
})?,
);
let adapter = tinymemory_core::tinycortex::HostSyncAdapter::new(memory);
let adapter = tinymemory_core::tinycortex::HostSyncAdapter::new(Arc::clone(memory));
let state = tinycortex::memory::sync::SyncState::load(&adapter, "notion", connection_id)
.await
.map_err(|error| {
Expand Down
Loading
Loading