Skip to content

Commit 9b84ef2

Browse files
Pigbibicodex
andcommitted
fix: align defer with legacy pause control
Co-Authored-By: Codex <noreply@openai.com>
1 parent 2afcb30 commit 9b84ef2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

service/ai_gateway_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
get_automation_run_ledger,
7474
suggest_control_action,
7575
)
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
7777
from service.strategy_automation_registry import (
7878
apply_strategy_registry_guard,
7979
summarize_strategy_registry_context,
@@ -552,13 +552,16 @@ def _automation_control_snapshot(
552552
execution["effective_mode"] = MODE_REVIEW_ONLY
553553
execution["human_review_required"] = True
554554
execution["auto_fix_allowed"] = False
555+
execution["defer"] = False
555556
reasons = execution.get("reasons") if isinstance(execution.get("reasons"), list) else []
556557
reasons.append("automation ledger unavailable; forcing human review")
557558
execution["reasons"] = reasons
558559
original_action = str(control.get("action") or CONTROL_REVIEW_ONLY)
559560
strict_action = original_action
560561
if execution.get("action") == EXECUTION_HUMAN_REVIEW:
561562
strict_action = CONTROL_ESCALATE
563+
elif execution.get("action") == EXECUTION_DEFER:
564+
strict_action = CONTROL_PAUSE_AUTO_FIX
562565
elif (
563566
execution.get("requested_mode") == MODE_REVIEW_AND_FIX
564567
and execution.get("effective_mode") == MODE_REVIEW_ONLY

0 commit comments

Comments
 (0)