@@ -126,21 +126,21 @@ def test_add_scorer_rejects_invalid_weight(self, mock_builder: ScenarioBuilder)
126126 with pytest .raises (ValueError , match = "Scorer weight must be positive" ):
127127 mock_builder .add_bash_script_scorer ("bad" , bash_script = "echo 1" , weight = - 1.0 )
128128
129- def test_build_params_validation (self , mock_builder : ScenarioBuilder ) -> None :
130- """Test _build_params raises for missing required fields."""
129+ def test_build_validation (self , mock_builder : ScenarioBuilder ) -> None :
130+ """Test build raises for missing required fields."""
131131 # Missing problem statement
132132 mock_builder .add_test_command_scorer ("test" , test_command = "pytest" )
133133 with pytest .raises (ValueError , match = "Problem statement is required" ):
134- mock_builder ._build_params ()
134+ mock_builder .build ()
135135
136136 # Missing scorer (new builder)
137137 builder2 = ScenarioBuilder ("test2" , mock_builder ._client )
138138 builder2 .with_problem_statement ("Fix the bug" )
139139 with pytest .raises (ValueError , match = "At least one scorer is required" ):
140- builder2 ._build_params ()
140+ builder2 .build ()
141141
142- def test_build_params_with_all_options (self , mock_builder : ScenarioBuilder , mock_blueprint : Blueprint ) -> None :
143- """Test _build_params with all optional fields set."""
142+ def test_build_with_all_options (self , mock_builder : ScenarioBuilder , mock_blueprint : Blueprint ) -> None :
143+ """Test build with all optional fields set."""
144144 mock_builder .with_problem_statement ("Fix the bug" )
145145 mock_builder .with_additional_context ({"hint" : "line 42" })
146146 mock_builder .add_test_command_scorer ("tests" , test_command = "pytest" )
@@ -152,7 +152,7 @@ def test_build_params_with_all_options(self, mock_builder: ScenarioBuilder, mock
152152 mock_builder .with_required_secrets (["db_pass" ])
153153 mock_builder .with_validation_type ("FORWARD" )
154154
155- params = mock_builder ._build_params ()
155+ params = mock_builder .build ()
156156
157157 assert params ["name" ] == "test-scenario"
158158 assert params ["input_context" ]["problem_statement" ] == "Fix the bug"
@@ -167,14 +167,14 @@ def test_build_params_with_all_options(self, mock_builder: ScenarioBuilder, mock
167167 assert params .get ("required_secret_names" ) == ["db_pass" ]
168168 assert params .get ("validation_type" ) == "FORWARD"
169169
170- def test_build_params_normalizes_weights (self , mock_builder : ScenarioBuilder ) -> None :
171- """Test that _build_params normalizes scorer weights to sum to 1.0."""
170+ def test_build_normalizes_weights (self , mock_builder : ScenarioBuilder ) -> None :
171+ """Test that build normalizes scorer weights to sum to 1.0."""
172172 mock_builder .with_problem_statement ("Fix the bug" )
173173 mock_builder .add_bash_script_scorer ("scorer1" , bash_script = "echo 1" , weight = 1.0 )
174174 mock_builder .add_bash_script_scorer ("scorer2" , bash_script = "echo 2" , weight = 2.0 )
175175 mock_builder .add_bash_script_scorer ("scorer3" , bash_script = "echo 3" , weight = 3.0 )
176176
177- params = mock_builder ._build_params ()
177+ params = mock_builder .build ()
178178 scorers = list (params ["scoring_contract" ]["scoring_function_parameters" ])
179179
180180 # Weights 1, 2, 3 should normalize to 1/6, 2/6, 3/6
0 commit comments