Returns the executor plus the workspace guard — keep the guard in scope so the temp dir is cleaned up when the test ends (no stray temp files).
()
| 37 | /// Returns the executor plus the workspace guard — keep the guard in scope so |
| 38 | /// the temp dir is cleaned up when the test ends (no stray temp files). |
| 39 | fn local_executor() -> (TaskExecutor, tempfile::TempDir) { |
| 40 | let path = repo_config_path(); |
| 41 | let config = CodeConfig::from_file(&path) |
| 42 | .unwrap_or_else(|e| panic!("failed to load {}: {e}", path.display())); |
| 43 | let llm_client = |
| 44 | create_client_with_config(config.default_llm_config().expect("default llm config")); |
| 45 | let workspace = tempfile::tempdir().expect("temp workspace"); |
| 46 | let executor = TaskExecutor::new( |
| 47 | Arc::new(AgentRegistry::new()), |
| 48 | llm_client, |
| 49 | workspace.path().to_string_lossy().to_string(), |
| 50 | ); |
| 51 | (executor, workspace) |
| 52 | } |
| 53 | |
| 54 | /// Phase 2: a step carrying an `output_schema` runs against a live model and |
| 55 | /// returns a value validated against the schema in `StepOutcome::structured`. |
no test coverage detected