MCPcopy Create free account
hub / github.com/AI45Lab/Code / local_executor

Function local_executor

core/tests/test_orchestration_real_llm.rs:39–52  ·  view source on GitHub ↗

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).

()

Source from the content-addressed store, hash-verified

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).
39fn 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`.

Calls 5

expectMethod · 0.80
default_llm_configMethod · 0.80
pathMethod · 0.80
repo_config_pathFunction · 0.70

Tested by

no test coverage detected