@@ -72,7 +72,7 @@ def test_scorers(self, builder: ScenarioBuilder) -> None:
7272 test_files : list [ScorerTestBasedScoringFunctionTestFile ] = [
7373 {"file_path" : "test_main.py" , "file_contents" : "def test_foo(): pass" }
7474 ]
75- result = builder .add_test_scorer ("test-scorer" , test_command = "pytest" , weight = 2.0 , test_files = test_files )
75+ result = builder .add_test_command_scorer ("test-scorer" , test_command = "pytest" , weight = 2.0 , test_files = test_files )
7676 assert result is builder
7777 assert builder ._scorers [0 ]["name" ] == "test-scorer"
7878 assert builder ._scorers [0 ]["weight" ] == 2.0
@@ -81,17 +81,17 @@ def test_scorers(self, builder: ScenarioBuilder) -> None:
8181 assert builder ._scorers [0 ]["scorer" ].get ("test_files" ) == test_files
8282
8383 # Command scorer
84- builder .add_command_scorer ("cmd-scorer" , command = "./check.sh" )
84+ builder .add_shell_command_scorer ("cmd-scorer" , command = "./check.sh" )
8585 assert builder ._scorers [1 ]["scorer" ]["type" ] == "command_scorer"
8686 assert builder ._scorers [1 ]["scorer" ].get ("command" ) == "./check.sh"
8787
8888 # Bash scorer
89- builder .add_bash_scorer ("bash-scorer" , bash_script = "echo 'score=1.0'" )
89+ builder .add_bash_script_scorer ("bash-scorer" , bash_script = "echo 'score=1.0'" )
9090 assert builder ._scorers [2 ]["scorer" ]["type" ] == "bash_script_scorer"
9191 assert builder ._scorers [2 ]["scorer" ].get ("bash_script" ) == "echo 'score=1.0'"
9292
9393 # Python scorer with optional params
94- builder .add_python_scorer (
94+ builder .add_python_script_scorer (
9595 "python-scorer" ,
9696 python_script = "print('1.0')" ,
9797 python_version_constraint = ">=3.10" ,
@@ -119,15 +119,15 @@ def test_scorers(self, builder: ScenarioBuilder) -> None:
119119 def test_add_scorer_rejects_invalid_weight (self , builder : ScenarioBuilder ) -> None :
120120 """Test that adding a scorer with zero or negative weight raises ValueError."""
121121 with pytest .raises (ValueError , match = "Scorer weight must be positive" ):
122- builder .add_bash_scorer ("bad" , bash_script = "echo 1" , weight = 0.0 )
122+ builder .add_bash_script_scorer ("bad" , bash_script = "echo 1" , weight = 0.0 )
123123
124124 with pytest .raises (ValueError , match = "Scorer weight must be positive" ):
125- builder .add_bash_scorer ("bad" , bash_script = "echo 1" , weight = - 1.0 )
125+ builder .add_bash_script_scorer ("bad" , bash_script = "echo 1" , weight = - 1.0 )
126126
127127 def test_build_params_validation (self , builder : ScenarioBuilder ) -> None :
128128 """Test _build_params raises for missing required fields."""
129129 # Missing problem statement
130- builder .add_test_scorer ("test" , test_command = "pytest" )
130+ builder .add_test_command_scorer ("test" , test_command = "pytest" )
131131 with pytest .raises (ValueError , match = "Problem statement is required" ):
132132 builder ._build_params ()
133133
@@ -141,7 +141,7 @@ def test_build_params_with_all_options(self, builder: ScenarioBuilder, mock_blue
141141 """Test _build_params with all optional fields set."""
142142 builder .with_problem_statement ("Fix the bug" )
143143 builder .with_additional_context ({"hint" : "line 42" })
144- builder .add_test_scorer ("tests" , test_command = "pytest" )
144+ builder .add_test_command_scorer ("tests" , test_command = "pytest" )
145145 builder .from_blueprint (mock_blueprint )
146146 builder .with_working_directory ("/app" )
147147 builder .with_metadata ({"team" : "infra" })
@@ -166,9 +166,9 @@ def test_build_params_with_all_options(self, builder: ScenarioBuilder, mock_blue
166166 def test_build_params_normalizes_weights (self , builder : ScenarioBuilder ) -> None :
167167 """Test that _build_params normalizes scorer weights to sum to 1.0."""
168168 builder .with_problem_statement ("Fix the bug" )
169- builder .add_bash_scorer ("scorer1" , bash_script = "echo 1" , weight = 1.0 )
170- builder .add_bash_scorer ("scorer2" , bash_script = "echo 2" , weight = 2.0 )
171- builder .add_bash_scorer ("scorer3" , bash_script = "echo 3" , weight = 3.0 )
169+ builder .add_bash_script_scorer ("scorer1" , bash_script = "echo 1" , weight = 1.0 )
170+ builder .add_bash_script_scorer ("scorer2" , bash_script = "echo 2" , weight = 2.0 )
171+ builder .add_bash_script_scorer ("scorer3" , bash_script = "echo 3" , weight = 3.0 )
172172
173173 params = builder ._build_params ()
174174 scorers = params ["scoring_contract" ]["scoring_function_parameters" ]
@@ -188,7 +188,7 @@ def test_push_calls_api_and_returns_scenario(self, builder: ScenarioBuilder, moc
188188 mock_client .scenarios .create .return_value .id = "scn-new-123"
189189
190190 builder .with_problem_statement ("Fix the bug" )
191- builder .add_test_scorer ("tests" , test_command = "pytest" )
191+ builder .add_test_command_scorer ("tests" , test_command = "pytest" )
192192
193193 scenario = builder .push ()
194194
@@ -206,7 +206,7 @@ def test_fluent_chaining(self, builder: ScenarioBuilder, mock_blueprint: Bluepri
206206 .with_working_directory ("/app" )
207207 .with_problem_statement ("Fix the bug" )
208208 .with_additional_context ({"hint" : "check main.py" })
209- .add_test_scorer ("tests" , test_command = "pytest" )
209+ .add_test_command_scorer ("tests" , test_command = "pytest" )
210210 .with_metadata ({"team" : "infra" })
211211 .with_reference_output ("diff content" )
212212 .with_required_env_vars (["API_KEY" ])
0 commit comments