Skip to content

Commit 333cbbf

Browse files
committed
test(gepa): add comprehensive ReAct detection and reconstruction tests
Detection tests (3): - test_single_react_module_detection: top-level ReAct module - test_multi_react_workflow_detection: mixed ReAct + ChainOfThought (bug fix validation) - test_nested_react_orchestrator_worker_detection: orchestrator with 2 workers as tools Reconstruction tests (3): - test_build_program_single_react: single ReAct module - test_build_program_multi_react_workflow: mixed workflow with ReAct + non-ReAct - test_build_program_orchestrator_with_workers: complex nested structure Helper functions (12): - setup_spy_for_base_program: captures base_program from gepa.optimize - simple_metric_for_detection/reconstruction: test metrics - create_gepa_optimizer_for_detection: creates optimizer - assert_react_module_detected/updated: validates ReAct modules - assert_regular_module_detected/updated: validates non-ReAct modules - mock_optimized_react_module: mocks optimized candidate - create_*_program: 3 reusable program builders Validates: - Full path preservation (bug fix) - All 4 ReAct components (react, extract, tools, arg_desc) - Non-ReAct module handling - Deepcopy verification (original unchanged) - Both detection and reconstruction phases
1 parent 1206f38 commit 333cbbf

File tree

1 file changed

+365
-60
lines changed

1 file changed

+365
-60
lines changed

0 commit comments

Comments
 (0)