pub fn find_by_hash(
conn: &Connection,
namespace: &str,
body_hash: &str,
) -> Result<Option<i64>, AppError>Expand description
Looks up a live memory by exact body_hash within a namespace.
Used during remember to short-circuit semantic duplicates before
spending an embedding call.
§Returns
Ok(Some(id)) when a live memory with the same hash exists,
Ok(None) otherwise.
§Errors
Returns Err(AppError::Database) on any rusqlite failure.