@@ -253,6 +253,38 @@ def render_functional_requirement(
253253
254254 return self .post_request (endpoint_url , headers , payload , run_state )
255255
256+ def fix_unittests_issue (
257+ self ,
258+ frid ,
259+ plain_source_tree ,
260+ linked_resources ,
261+ existing_files_content ,
262+ module_name : str ,
263+ required_modules ,
264+ unittests_issue ,
265+ run_state : RunState ,
266+ conformance_tests_fixes : list [dict ] | None = None ,
267+ ):
268+ endpoint_url = f"{ self .api_url } /fix_unittests_issue"
269+ headers = {"X-API-Key" : self .api_key , "Content-Type" : "application/json" }
270+
271+ payload = {
272+ "frid" : frid ,
273+ "plain_source_tree" : plain_source_tree ,
274+ "linked_resources" : linked_resources ,
275+ "existing_files_content" : existing_files_content ,
276+ "module_name" : module_name ,
277+ "required_modules" : required_modules ,
278+ "unittests_issue" : unittests_issue ,
279+ "unittest_batch_id" : run_state .unittest_batch_id ,
280+ }
281+ # Implementation code changes made by the conformance tests fixer right before this unit tests run;
282+ # only sent when unit tests are processed inside the conformance tests phase.
283+ if conformance_tests_fixes is not None :
284+ payload ["conformance_tests_fixes" ] = conformance_tests_fixes
285+
286+ return self .post_request (endpoint_url , headers , payload , run_state )
287+
256288 def distill_conformance_test_memory (
257289 self ,
258290 frid ,
@@ -526,29 +558,3 @@ def summarize_finished_conformance_tests(
526558 }
527559
528560 return self .post_request (endpoint_url , headers , payload , run_state )
529-
530- def agent_start (self , task_type : str , task_params : dict , frid : str , module_name : str , run_state : RunState ):
531- """Start a server-side agent session; returns the first turn (tool calls or completion)."""
532- endpoint_url = f"{ self .api_url } /agent/start"
533- headers = {"X-API-Key" : self .api_key , "Content-Type" : "application/json" }
534- payload = {
535- "task_type" : task_type ,
536- "task_params" : task_params ,
537- "frid" : frid ,
538- "module_name" : module_name ,
539- }
540- return self .post_request (endpoint_url , headers , payload , run_state )
541-
542- def agent_continue (
543- self , session_id : str , tool_results : list [dict ], frid : str , module_name : str , run_state : RunState
544- ):
545- """Feed tool results into an agent session and run its next turn."""
546- endpoint_url = f"{ self .api_url } /agent/continue"
547- headers = {"X-API-Key" : self .api_key , "Content-Type" : "application/json" }
548- payload = {
549- "session_id" : session_id ,
550- "tool_results" : tool_results ,
551- "frid" : frid ,
552- "module_name" : module_name ,
553- }
554- return self .post_request (endpoint_url , headers , payload , run_state )
0 commit comments