|
73 | 73 | get_automation_run_ledger, |
74 | 74 | suggest_control_action, |
75 | 75 | ) |
76 | | -from service.automation_decision import EXECUTION_HUMAN_REVIEW, decide_automation_execution, load_execution_policy |
| 76 | +from service.automation_decision import EXECUTION_DEFER, EXECUTION_HUMAN_REVIEW, decide_automation_execution, load_execution_policy |
77 | 77 | from service.strategy_automation_registry import ( |
78 | 78 | apply_strategy_registry_guard, |
79 | 79 | summarize_strategy_registry_context, |
@@ -552,13 +552,16 @@ def _automation_control_snapshot( |
552 | 552 | execution["effective_mode"] = MODE_REVIEW_ONLY |
553 | 553 | execution["human_review_required"] = True |
554 | 554 | execution["auto_fix_allowed"] = False |
| 555 | + execution["defer"] = False |
555 | 556 | reasons = execution.get("reasons") if isinstance(execution.get("reasons"), list) else [] |
556 | 557 | reasons.append("automation ledger unavailable; forcing human review") |
557 | 558 | execution["reasons"] = reasons |
558 | 559 | original_action = str(control.get("action") or CONTROL_REVIEW_ONLY) |
559 | 560 | strict_action = original_action |
560 | 561 | if execution.get("action") == EXECUTION_HUMAN_REVIEW: |
561 | 562 | strict_action = CONTROL_ESCALATE |
| 563 | + elif execution.get("action") == EXECUTION_DEFER: |
| 564 | + strict_action = CONTROL_PAUSE_AUTO_FIX |
562 | 565 | elif ( |
563 | 566 | execution.get("requested_mode") == MODE_REVIEW_AND_FIX |
564 | 567 | and execution.get("effective_mode") == MODE_REVIEW_ONLY |
|
0 commit comments