Skip to content

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

fix(memory): refresh guard allowlist for tinymemory 1.13

Steven Enamakel5db385bca9bf
diff --git a/docs/specs/memory-guard-allowlist.md b/docs/specs/memory-guard-allowlist.md
index 6d60df848b..7499fc4950 100644
--- a/docs/specs/memory-guard-allowlist.md
+++ b/docs/specs/memory-guard-allowlist.md
@@ -17,14 +17,13 @@ dead-string rot the ratchet exists to prevent.
## Scope
-The lint scans `src/` for twelve patterns, keyed on `(file, pattern)` so the
+The lint scans the host and vendored `tinymemory-core` sources for nine
+patterns, keyed on `(file, pattern)` so the
failure message names the needle that tripped:
| Pattern | What it hands out |
| --- | --- |
-| `active_memory_client(` | `MemoryClientRef` |
-| `global::client_if_ready(` / `global::client(` | `MemoryClientRef` |
-| `.memory_handle(` | raw `Arc<dyn Memory>` |
+| `global::client_if_ready(` | `MemoryClientRef` |
| `.profile_conn(` | raw `Arc<Mutex<rusqlite::Connection>>` (one in-family site) |
| `.profile_store(` | a typed `ProfileStore` — confined, but still unguarded |
| `.get_document(` | `pub(crate)` read-one escape hatch |
@@ -124,24 +123,11 @@ is the only path" is not yet a true invariant.**
| Path | Sites |
| --- | --- |
-| `memory/sync/composio/providers/profile.rs` | 5 |
-| `agent/learning/startup.rs` | 2 |
-| `memory/store/client_tests.rs` | 2 (test) |
-| `memory/store/golden.rs` | 2 (test infrastructure — see below) |
-
-`memory/store/golden.rs` is the seeder / read-back engine behind the
-`memory_golden_fixture_e2e` schema gate. It is `#[doc(hidden)]` and has no
-caller outside `tests/`, so it is not a product bypass. It needs
-`profile_conn()` for the same reason `agent/learning/*` does: the episodic,
-conversation-segment, event and `user_profile` tiers have no guard-routed
-writer, and a fixture that omitted them would leave the FTS5 shadow tables and
-six sync triggers unrepresented — exactly the schema the gate exists to pin.
-Its document / KV / graph writes and all of its read-back **do** go through
-`memory::ops`. If those four tiers ever gain a guarded writer, re-point this
-module and drop both entries.
-
-The brief named only the first two files. The other two were found by grep and
-are recorded here so M4c starts from the real set.
+| `vendor/tinymemory/crates/tinymemory-core/src/store/identity.rs` | 2 — the engine's cross-toolkit identity matcher resolves its global client and then reads the typed profile store. This is below the module contract, not a host-side path. |
+
+TinyMemory v1.13.4 removed the old in-process Composio sync pipeline, so its
+former profile-store entries are intentionally absent. The identity matcher is
+the remaining vendor-internal reader counted by this guard.
### C. Needs a concrete engine type the contract does not expose
@@ -168,12 +154,9 @@ are recorded here so M4c starts from the real set.
`integrations/composio/ops_tests.rs`, `core/runtime/context.rs` (its `#[cfg(test)]`
module).
-`vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/types_test_support.rs`
-is a `#[cfg(test)]` module whose isolated-workspace fixtures construct
-`MemoryClient` directly. It is counted because the scanner does not brace-track
-test modules — and it is one entry where there used to be three: the engine
-seam, the composio provider types and the engine-free sync runner each carried
-their fixtures inline until the engine split them out into this file.
+TinyMemory v1.13.4 removed the in-process Composio sync test support along with
+the pipeline itself. The remaining vendored global-client use is the
+engine-internal identity matcher described above.
## Honest scorecard
diff --git a/src/openhuman/memory/bypass_allowlist_tests.rs b/src/openhuman/memory/bypass_allowlist_tests.rs
index 4a265ce452..8f19730371 100644
--- a/src/openhuman/memory/bypass_allowlist_tests.rs
+++ b/src/openhuman/memory/bypass_allowlist_tests.rs
@@ -83,9 +83,10 @@ use std::path::{Path, PathBuf};
// engine at all — so there is no longer an API to rename them to. They matched
// nothing, and a needle that matches nothing is a guard that guards nothing.
//
-// `global::client_if_ready(` survives because it still matches: the remaining
-// callers are test fixtures, which the scanner reaches but production no longer
-// does.
+// `global::client_if_ready(` survives because the engine's identity matcher
+// still uses the process-global client to query profile-store identity rows.
+// This is below the module contract, so it belongs in the ratchet rather than
+// being mistaken for a host bypass.
const BYPASS_PATTERNS: &[(&str, &str)] = &[
(
"global::client_if_ready(",
@@ -184,7 +185,6 @@ const ALLOWED: &[(&str, &str, &str)] = &[
// `flows/bus.rs`'s two entries are gone: the run-digest subscriber resolves
// the guarded driver, and its `#[cfg(test)]` override now injects a real
// `MemoryGuard` over an in-memory provider rather than a raw handle.
- // ── Composio integration: &MemoryClientRef parameter shape ──
// ── The driver and the binding: guarding these would be a cycle ──
(
"src/openhuman/memory/binding.rs",
@@ -227,31 +227,20 @@ const ALLOWED: &[(&str, &str, &str)] = &[
".profile_conn(",
"sole in-family call; wraps the raw handle in ProfileStore. profile_conn is pub(in crate::openhuman::memory), so the compiler — not this lint — is the primary enforcement",
),
- // ── Composio memory sync: profile_store + &MemoryClientRef ──
+ // ── Engine-internal identity lookup ──
+ //
+ // v1.13.4 removed the in-process Composio sync pipeline. Its remaining
+ // profile-store consumer is the engine's identity matcher, which answers
+ // whether a canonical identity belongs to the user across connected tools.
(
- "vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/profile.rs",
+ "vendor/tinymemory/crates/tinymemory-core/src/store/identity.rs",
".profile_store(",
- "typed profile writes; the contract has no profile family, so still unguarded",
- ),
- (
- "vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/profile.rs",
- "global::client_if_ready(",
- "resolved only to reach profile_store()",
+ "engine-internal identity lookup over profile rows; it sits below the module contract",
),
(
- "vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/types.rs",
+ "vendor/tinymemory/crates/tinymemory-core/src/store/identity.rs",
"global::client_if_ready(",
- "same provider trait shape",
- ),
- (
- "vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/types_test_support.rs",
- "MemoryClient::from_workspace_dir(",
- "#[cfg(test)] module, split out of the inline test blocks three earlier entries covered",
- ),
- (
- "vendor/tinymemory/crates/tinymemory-core/src/sync/composio/providers/user_scopes.rs",
- "global::client_if_ready(",
- "same provider trait shape",
+ "resolves the global client solely for the engine-internal identity lookup",
),
// ── Golden-workspace fixture seeder (test infrastructure) ──
//
@@ -261,27 +250,17 @@ const ALLOWED: &[(&str, &str, &str)] = &[
// segment, event and profile tiers, which have no guard-routed writer — the
// archivist and the learning cache reach them the same way, and those two
// are already allowlisted below/above for the same reason.
- // ── Inline test modules and the two sync seams ──
+ // ── Engine seam ──
//
// tinymemory#18 §C1 renamed `core/src/tinycortex/` to `core/src/engine/`,
- // and §B1 added `core/src/sync/pipelines/host.rs` — the engine-FREE sync
- // runner, an adapter over `MemoryClient` shaped exactly like the engine
- // seam it sits beside. Both are beneath the contract, not above it: they
- // are what a bound driver is built FROM, which is why they name the raw
- // client. Their `from_workspace_dir` hits are all inside inline
- // `#[cfg(test)]` modules (the #61 connection-guard tests), which the
- // scanner does not brace-track.
+ // and its current engine seam remains beneath the contract, not above it:
+ // it is what a bound driver is built FROM, which is why it names the raw
+ // client.
(
"vendor/tinymemory/crates/tinymemory-core/src/engine/sync.rs",
"global::client_if_ready(",
"the TinyCortex engine seam; it sits beneath the contract, not above it",
),
- (
- "vendor/tinymemory/crates/tinymemory-core/src/sync/pipelines/host.rs",
- "global::client_if_ready(",
- "the engine-free sync runner's seam over the bound client; beneath the contract, \
- the same way the engine seam beside it is",
- ),
];
/// True for source files the lint deliberately does not scan.