Skip to content

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

fix(subagent_sessions): correct document update return and test lookup

Steven Enamakelb08d3d90fe37
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
index f00c1aeb60..962a8051ce 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
@@ -140,7 +140,7 @@ fn an_equal_millisecond_live_close_persists_and_a_stale_snapshot_cannot_reopen_i
.load()
.unwrap()
.into_iter()
- .find(|record| record.subagent_session_id == "equal-ms-close")
+ .find(|record| record.subagent_session_id == original.subagent_session_id)
.expect("session remains stored");
assert_eq!(closed.status, DurableSubagentStatus::Closed);
assert!(!closed.reusable);
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs
index 775b0505d7..7447879fd9 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs
@@ -228,11 +228,11 @@ impl Docs {
.await
.map(|updated| updated.map(|(value, _)| value))
})?;
- updated
+ Ok(updated
.map(|value| {
serde_json::from_value::<StoredSession>(value).map(DurableSubagentSession::from)
})
- .transpose()
+ .transpose()?)
}
/// Whether the one-time legacy file import finished in this scope.