fix(awooop): clarify apply candidate owner review state
This commit is contained in:
@@ -144,6 +144,14 @@ def _build_execution_result(
|
||||
failure_status = "no_command_failed"
|
||||
summary = "已執行成功,但缺少修復驗證結果"
|
||||
terminal = False
|
||||
elif state == "apply_candidate_owner_review_ready":
|
||||
approval_status = "owner_review_required"
|
||||
completion_status = "dry_run_passed_apply_candidate_ready"
|
||||
command_status = "check_mode_succeeded"
|
||||
repair_status = "not_executed"
|
||||
failure_status = "not_applicable"
|
||||
summary = "AI 已完成安全乾跑並產生 apply candidate;等待 owner review 後才可執行"
|
||||
terminal = False
|
||||
elif state == "dry_run_only_owner_review_required":
|
||||
approval_status = "owner_review_required"
|
||||
completion_status = "dry_run_completed_no_apply"
|
||||
@@ -313,12 +321,12 @@ def build_operator_outcome(
|
||||
summary = "已執行但驗證退化,需人工確認"
|
||||
reason = first_blocker or f"verification={verification}"
|
||||
elif verdict == "ansible_check_mode_only" or ansible_dry_run_only:
|
||||
state = "dry_run_only_owner_review_required"
|
||||
state = "apply_candidate_owner_review_ready"
|
||||
severity = "warning"
|
||||
needs_human = True
|
||||
next_action = "owner_review_apply_gate_or_create_verifier_plan"
|
||||
summary = "只完成 Ansible check-mode 乾跑,尚未執行修復"
|
||||
reason = first_blocker or "ansible_check_mode_without_apply"
|
||||
next_action = "open_apply_gate_work_item_review_verifier_and_km"
|
||||
summary = "AI 已完成 Ansible check-mode 並產生 apply candidate,等待 owner review;尚未執行修復"
|
||||
reason = first_blocker or "apply_candidate_requires_owner_review"
|
||||
elif verdict == "execution_unverified" or (
|
||||
has_repair_execution and verification == "missing"
|
||||
):
|
||||
|
||||
@@ -4132,7 +4132,7 @@ def _status_chain_ansible_apply_gate_handoff(
|
||||
"runtime_execution_authorized": False,
|
||||
"writes_runtime_state": False,
|
||||
"owner_review_gate": "required_before_apply",
|
||||
"next_action": "owner_review_apply_gate_or_create_verifier_plan",
|
||||
"next_action": "open_apply_gate_work_item_review_verifier_and_km",
|
||||
"asset_ids": {
|
||||
"dry_run": f"ansible-check-mode:{catalog_id}",
|
||||
"apply_candidate": f"ansible-apply-candidate:{catalog_id}",
|
||||
@@ -5018,7 +5018,7 @@ def _build_awooop_status_chain(
|
||||
if ansible_dry_run_only:
|
||||
verdict = "ansible_check_mode_only"
|
||||
repair_state = "ansible_check_mode_only"
|
||||
next_step = "owner_review_apply_gate_or_create_verifier_plan"
|
||||
next_step = "open_apply_gate_work_item_review_verifier_and_km"
|
||||
needs_human = True
|
||||
source_section = _status_chain_source_section(truth_chain)
|
||||
if source_correlation is not None:
|
||||
|
||||
Reference in New Issue
Block a user