From 2eb63cfc0d6c3d8c83d24e1c5261ff2c977fdbd9 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 25 Aug 2026 20:47:34 -0600 Subject: [PATCH] test: pin memory config on in eval-routing test for environment-independent CI The eval_routes_memory_prefix_to_memory_handler characterization test inherited the host machine's memory configuration: on runners without a memory setup, should_register_memory_tools() gates the handler off and the error message differs. Force memory = Some(true) at ctx construction so the test asserts the same handler path everywhere. --- src/function/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/function/mod.rs b/src/function/mod.rs index 7a96ec4..8151857 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -4730,7 +4730,11 @@ mod tests { #[test] fn eval_routes_memory_prefix_to_memory_handler() { - let mut ctx = RequestContext::new(Arc::new(AppState::test_default()), WorkingMode::Cmd); + let mut app_state = AppState::test_default(); + let mut app_config = (*app_state.config).clone(); + app_config.memory = Some(true); + app_state.config = Arc::new(app_config); + let mut ctx = RequestContext::new(Arc::new(app_state), WorkingMode::Cmd); ctx.tool_scope.functions.append_memory_functions(); let out = run_async(call_with_args("memory__read", json!({})).eval(&mut ctx)).unwrap();