6767)
6868from service .automation_run_ledger import (
6969 CONTROL_CONTINUE ,
70- CONTROL_DEFER ,
7170 CONTROL_ESCALATE ,
7271 CONTROL_PAUSE_AUTO_FIX ,
7372 CONTROL_REVIEW_ONLY ,
7473 get_automation_run_ledger ,
7574 suggest_control_action ,
7675)
77- from service .automation_decision import EXECUTION_DEFER , EXECUTION_HUMAN_REVIEW , decide_automation_execution , load_execution_policy
76+ from service .automation_decision import EXECUTION_HUMAN_REVIEW , decide_automation_execution , load_execution_policy
7877from service .strategy_automation_registry import (
7978 apply_strategy_registry_guard ,
8079 summarize_strategy_registry_context ,
@@ -514,7 +513,7 @@ def _automation_control_snapshot(
514513 repo : str ,
515514 * ,
516515 task_name : str = "" ,
517- requested_mode : str = MODE_REVIEW_ONLY ,
516+ requested_mode : str = MODE_REVIEW_AND_FIX ,
518517 pending_run : dict [str , Any ] | None = None ,
519518) -> dict [str , Any ]:
520519 try :
@@ -560,8 +559,6 @@ def _automation_control_snapshot(
560559 strict_action = original_action
561560 if execution .get ("action" ) == EXECUTION_HUMAN_REVIEW :
562561 strict_action = CONTROL_ESCALATE
563- elif execution .get ("action" ) == EXECUTION_DEFER :
564- strict_action = CONTROL_DEFER
565562 elif (
566563 execution .get ("requested_mode" ) == MODE_REVIEW_AND_FIX
567564 and execution .get ("effective_mode" ) == MODE_REVIEW_ONLY
@@ -571,7 +568,7 @@ def _automation_control_snapshot(
571568 if strict_action != original_action :
572569 control ["action" ] = strict_action
573570 control ["auto_fix_allowed" ] = False
574- control ["requires_human_review" ] = execution . get ( "action" ) != EXECUTION_DEFER
571+ control ["requires_human_review" ] = True
575572 reasons = control .get ("reasons" ) if isinstance (control .get ("reasons" ), list ) else []
576573 reasons .append ("capped by execution decision" )
577574 control ["reasons" ] = reasons
@@ -1499,7 +1496,7 @@ def _handle_automation_control(self) -> None:
14991496 else :
15001497 repo = claims_repo
15011498 repo = repo or "unknown"
1502- mode = str (params .get ("mode" , [MODE_REVIEW_ONLY ])[0 ] or MODE_REVIEW_ONLY )
1499+ mode = str (params .get ("mode" , [MODE_REVIEW_AND_FIX ])[0 ] or MODE_REVIEW_AND_FIX )
15031500 _json_response (self , HTTPStatus .OK , {"status" : "ok" , "control" : _automation_control_snapshot (repo , requested_mode = mode )})
15041501
15051502 def _handle_automation_triage (self , claims : dict [str , Any ], payload : dict [str , Any ]) -> None :
@@ -1604,7 +1601,7 @@ def _handle_record_automation_run(self, claims: dict[str, Any], payload: dict[st
16041601 control = _automation_control_snapshot (
16051602 repo ,
16061603 task_name = task_name ,
1607- requested_mode = str (payload .get ("mode" ) or MODE_REVIEW_ONLY ),
1604+ requested_mode = str (payload .get ("mode" ) or MODE_REVIEW_AND_FIX ),
16081605 pending_run = {
16091606 "run_id" : run_id ,
16101607 "task_name" : task_name ,
0 commit comments