Skip to content

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

test(threads): build config with struct update syntax in ops tests

Steven Enamakel43b315b2997a
diff --git a/crates/openhuman-core/src/threads/ops/edit_tests.rs b/crates/openhuman-core/src/threads/ops/edit_tests.rs
index c0ef3c4782..4d40c00bd9 100644
--- a/crates/openhuman-core/src/threads/ops/edit_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/edit_tests.rs
@@ -284,8 +284,10 @@ fn truncate_transcript_for_regenerate_returns_none_when_thread_has_no_transcript
#[test]
fn a_profile_prefixed_key_round_trips_through_edit_and_regenerate() {
let dir = TempDir::new().expect("tempdir");
- let mut config = crate::config::Config::default();
- config.workspace_dir = dir.path().to_path_buf();
+ let config = crate::config::Config {
+ workspace_dir: dir.path().to_path_buf(),
+ ..crate::config::Config::default()
+ };
let tenant = crate::core::runtime::Tenant {
profile: Some("profile-a".to_string()),
agent: None,
@@ -339,8 +341,10 @@ fn a_profile_prefixed_key_round_trips_through_edit_and_regenerate() {
#[test]
fn transcript_store_for_a_desktop_tenant_uses_the_chat_agent_and_an_embedded_agent_its_own() {
let dir = TempDir::new().expect("tempdir");
- let mut config = crate::config::Config::default();
- config.workspace_dir = dir.path().to_path_buf();
+ let config = crate::config::Config {
+ workspace_dir: dir.path().to_path_buf(),
+ ..crate::config::Config::default()
+ };
let desktop = super::super::support::transcript_store_for(
&config,
@@ -364,8 +368,10 @@ fn transcript_store_for_a_desktop_tenant_uses_the_chat_agent_and_an_embedded_age
async fn transcript_store_reads_the_profile_from_the_request_context() {
use crate::core::runtime::{ContextOverlay, CoreContext, DispatchCtx, DomainSet};
let dir = TempDir::new().expect("tempdir");
- let mut config = crate::config::Config::default();
- config.workspace_dir = dir.path().to_path_buf();
+ let config = crate::config::Config {
+ workspace_dir: dir.path().to_path_buf(),
+ ..crate::config::Config::default()
+ };
let overlay = ContextOverlay::new(
config,
DomainSet::kernel(),
diff --git a/crates/openhuman-core/src/threads/ops/transcript_tests.rs b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
index 9809454d1a..c2f684aee1 100644
--- a/crates/openhuman-core/src/threads/ops/transcript_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
@@ -10,8 +10,10 @@ use tinyagents_session::transcript::{
const THREAD: &str = "thread-store";
fn ctx_for(workspace: &std::path::Path, profile: Option<&str>) -> DispatchCtx {
- let mut config = crate::config::Config::default();
- config.workspace_dir = workspace.to_path_buf();
+ let config = crate::config::Config {
+ workspace_dir: workspace.to_path_buf(),
+ ..crate::config::Config::default()
+ };
let mut overlay = ContextOverlay::new(
config,
DomainSet::kernel(),