Skip to content

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

fix(approval): return count of expired rows from expire_stale

Steven Enamakel762228ffb8b5
diff --git a/crates/openhuman-core/src/security/approval/store.rs b/crates/openhuman-core/src/security/approval/store.rs
index f7b97d7594..bb4d4f8b69 100644
--- a/crates/openhuman-core/src/security/approval/store.rs
+++ b/crates/openhuman-core/src/security/approval/store.rs
@@ -293,7 +293,9 @@ pub fn record_flow_preauthorization(
/// (`decided_at` + `decision`) without leaving expired rows pending
/// forever.
pub fn expire_stale(config: &Config) -> Result<usize> {
- with_connection(config, |conn| expire_stale_with_now(conn, Utc::now()))
+ with_connection(config, |conn| {
+ Ok(expire_stale_with_now(conn, Utc::now())?.len())
+ })
}
/// List all rows that are still awaiting user input, regardless of