Skip to content

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

test(memory): allowlist the engine's backfill read-back in the bypass ratchet

Shanue8b4b5e9908b
diff --git a/docs/specs/memory-guard-allowlist.md b/docs/specs/memory-guard-allowlist.md
index 7499fc4950..e56ec4bdda 100644
--- a/docs/specs/memory-guard-allowlist.md
+++ b/docs/specs/memory-guard-allowlist.md
@@ -97,6 +97,7 @@ changes anything here.
| Path | Reason |
| --- | --- |
| `memory/tinycortex/sync.rs` | The engine seam. |
+| `vendor/tinymemory/crates/tinymemory-core/src/backfill.rs` (`.get_document(`) | The connector-tree backfill (tinymemory#136 / openhuman#6012) reads each stored connector document back through the engine's read-one escape hatch before re-filing it into the memory tree. Engine-internal and beneath the module contract; the host reaches it only through `MemoryMaintenance::backfill_connector_trees`, which the kernel guard tiers as a read for a dry run and a write for a real pass. |
| `memory/global.rs` | The process-global slot itself. |
| `memory/ops/helpers.rs` | Defines `active_memory_client`. |
| `memory/ops/guard.rs`, `guard_tests.rs` | The guarded resolver; matches only in prose and in its own fallback. |
diff --git a/src/openhuman/memory/bypass_allowlist_tests.rs b/src/openhuman/memory/bypass_allowlist_tests.rs
index 8f19730371..5483eb0e93 100644
--- a/src/openhuman/memory/bypass_allowlist_tests.rs
+++ b/src/openhuman/memory/bypass_allowlist_tests.rs
@@ -261,6 +261,21 @@ const ALLOWED: &[(&str, &str, &str)] = &[
"global::client_if_ready(",
"the TinyCortex engine seam; it sits beneath the contract, not above it",
),
+ // ── Engine-internal backfill reader (tinymemory#136, openhuman#6012) ──
+ //
+ // `backfill_connector_trees` re-files connector documents that were stored
+ // before the openhuman#6007 routing fix into the memory tree. It reads each
+ // stored document back through the engine's own read-one escape hatch and
+ // hands the body to the same ingest funnel the sync path writes through.
+ // Engine code beneath the module contract: the host reaches it only via
+ // `MemoryMaintenance::backfill_connector_trees`, which the kernel guard
+ // already tiers (dry-run as a read, a real pass as a write), so there is no
+ // host-side guard left for this read to route through.
+ (
+ "vendor/tinymemory/crates/tinymemory-core/src/backfill.rs",
+ ".get_document(",
+ "engine-internal read-back of stored connector documents for the tree backfill; beneath the contract, reached by the host only through the guarded Maintenance member",
+ ),
];
/// True for source files the lint deliberately does not scan.