Skip to content

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

fix(memory): prevent panic on empty safety check list

Steven Enamakel225bdd2eac09
diff --git a/crates/openhuman-core/src/memory/safety.rs b/crates/openhuman-core/src/memory/safety.rs
index 0fb9ba03fd..3d92fd36dc 100644
--- a/crates/openhuman-core/src/memory/safety.rs
+++ b/crates/openhuman-core/src/memory/safety.rs
@@ -33,10 +33,12 @@
//! Same pattern lists, same replacement tokens, same 128-level JSON depth cap,
//! same sensitive-key classifier, same checksum gates, and the same priority and
//! overlap-resolution order — so every caller stores exactly the bytes it always
-//! stored. The engine's module tree (`safety` over `pii` over
-//! `checks`/`normalize`/`prefilter`) is flat here because nothing outside it ever
-//! named the inner modules; every item keeps its name, so the two copies stay
-//! diffable line for line.
+//! stored. This copy mirrors the engine's own `safety` over `pii` over
+//! `checks`/`normalize`/`prefilter` split (`secrets` here plays the role of
+//! the engine's `safety`, and [`pii::checksums`]/[`pii::normalize`]/
+//! [`pii::patterns`] the role of its `checks`/`normalize`/`prefilter`); every
+//! item keeps its name, so the two copies stay diffable function for
+//! function even though the file layout is no longer identical.
#[cfg(test)]
#[path = "safety_tests.rs"]