Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions xtask/src/app_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ pub async fn serve_home(
startup_timeout: Duration::from_secs(60),
..Default::default()
};
config.platform_home = Some(home.clone());
config.session_defaults.cwd = cwd.to_string_lossy().into_owned();
dim_app_server::cli::product_session_defaults(&mut config.session_defaults);
if let Some(defaults) = &run.defaults {
Expand Down
27 changes: 2 additions & 25 deletions xtask/src/scenario_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9787,7 +9787,6 @@ mod tests {
HostFuture, ModelConnection, ModelDriver, ModelStopReason, ResolveModelConnection,
ResolvedModelConnection,
};
use dim_agent_capabilities::host_platform::{HostPlatform, resolve_shell};
use std::sync::{
Mutex,
atomic::{AtomicUsize, Ordering},
Expand Down Expand Up @@ -16284,10 +16283,6 @@ mod tests {
http: tokio::task::JoinHandle<()>,
models: PathBuf,
scenarios: PathBuf,
/// The process facts a flow's runs see: the ones this process has,
/// with `home` pointed at the fixture's own empty directory, so a run
/// never reads the developer's `~/AGENTS.md`, Skills list or `<home>`.
platform: HostPlatform,
}
impl Fixture {
/// `scenario` is the scenario file's content and `workspace` the
Expand Down Expand Up @@ -16385,25 +16380,12 @@ mod tests {
serde_json::to_string_pretty(&scenario).unwrap(),
)
.unwrap();
let platform_home = directory.join("platform-home");
std::fs::create_dir_all(&platform_home).unwrap();
let env: Vec<_> = std::env::vars_os().collect();
let shell = resolve_shell(Ok(None), &env).await;
let mut platform = HostPlatform::current(shell)
.unwrap()
.with_execution_settings(
dim_agent_capabilities::execution_settings::ExecutionSettingsHost::fixed(
Default::default(),
),
);
platform.home = platform_home;
Self {
directory,
provider,
http,
models,
scenarios,
platform,
}
}
/// [`evaluate`] over this fixture's runs, whose process facts point at
Expand All @@ -16419,19 +16401,14 @@ mod tests {
rejudge(
options,
options.rejudge.as_deref().expect("a rejudge source"),
|builder| {
builder.process_value(Arc::new(self.platform.clone()));
},
|_| {},
)
.await
}
/// [`pooled`] over this fixture's provider, with the same process
/// facts as [`evaluate`](Self::evaluate).
async fn pooled(&self, options: &Options) -> Result<String> {
pooled(options, |builder| {
builder.process_value(Arc::new(self.platform.clone()));
})
.await
pooled(options, |_| {}).await
}
/// The options of one run per arm over this fixture, with `out`.
fn options(&self, out: PathBuf) -> Options {
Expand Down