fix(awooop): clarify apply candidate owner review state
All checks were successful
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m34s
CD Pipeline / build-and-deploy (push) Successful in 4m50s
CD Pipeline / post-deploy-checks (push) Successful in 1m33s

This commit is contained in:
Your Name
2026-06-26 00:19:48 +08:00
parent 3dd4373dac
commit 5ce6fc4924
9 changed files with 129 additions and 22 deletions

View File

@@ -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"
):

View File

@@ -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: