fix(ai-loop): require Wazuh provider delivery
This commit is contained in:
@@ -3597,7 +3597,7 @@ def test_runtime_telegram_receipt_queries_include_alert_notifications() -> None:
|
||||
("catalog_id", "shadow_completes"),
|
||||
[
|
||||
("ansible:generic-posture-readback", True),
|
||||
("ansible:wazuh-manager-posture-readback", True),
|
||||
("ansible:wazuh-manager-posture-readback", False),
|
||||
],
|
||||
)
|
||||
def test_same_run_suppressed_shadow_respects_provider_receipt_policy(
|
||||
@@ -3706,7 +3706,7 @@ def test_same_run_suppressed_shadow_respects_provider_receipt_policy(
|
||||
"state_transition",
|
||||
"recovered",
|
||||
"duplicate_lifecycle_state",
|
||||
True,
|
||||
False,
|
||||
),
|
||||
(
|
||||
"shadow",
|
||||
@@ -3714,7 +3714,7 @@ def test_same_run_suppressed_shadow_respects_provider_receipt_policy(
|
||||
"shadow_only",
|
||||
"recovered",
|
||||
"historical_projection_backfill",
|
||||
True,
|
||||
False,
|
||||
),
|
||||
(
|
||||
"shadow",
|
||||
@@ -3776,11 +3776,11 @@ def test_wazuh_apply_receipt_requires_exact_recovered_lifecycle_provenance(
|
||||
) is expected
|
||||
|
||||
|
||||
def test_wazuh_duplicate_lifecycle_shadow_closes_strict_same_run_eighteen_stage_loop() -> (
|
||||
def test_wazuh_provider_receipt_closes_strict_same_run_eighteen_stage_loop() -> (
|
||||
None
|
||||
):
|
||||
automation_run_id = "wazuh-candidate-op"
|
||||
incident_id = "INC-WAZUH-SHADOW-STRICT-CLOSURE"
|
||||
incident_id = "INC-WAZUH-PROVIDER-STRICT-CLOSURE"
|
||||
apply_op_id = "wazuh-apply-op"
|
||||
catalog_id = "ansible:wazuh-manager-posture-readback"
|
||||
non_execution_stages = set(AI_AUTOMATION_REQUIRED_LOOP_STAGES) - set(
|
||||
@@ -3891,20 +3891,20 @@ def test_wazuh_duplicate_lifecycle_shadow_closes_strict_same_run_eighteen_stage_
|
||||
],
|
||||
telegram_latest_rows=[
|
||||
{
|
||||
"message_id": "wazuh-telegram-shadow",
|
||||
"message_id": "wazuh-telegram-provider-sent",
|
||||
"automation_run_id": automation_run_id,
|
||||
"incident_id": incident_id,
|
||||
"action": "controlled_apply_result",
|
||||
"send_status": "shadow",
|
||||
"provider_message_id": None,
|
||||
"send_status": "sent",
|
||||
"provider_message_id": "wazuh-provider-message",
|
||||
"notification_policy_version": (
|
||||
"telegram_posture_lifecycle_transition_v1"
|
||||
),
|
||||
"notification_disposition": "suppressed",
|
||||
"notification_disposition": "sent",
|
||||
"notification_provider_delivery": "state_transition",
|
||||
"notification_lifecycle_state": "recovered",
|
||||
"notification_suppression_reason": "duplicate_lifecycle_state",
|
||||
"notification_provider_send_suppressed": True,
|
||||
"notification_suppression_reason": None,
|
||||
"notification_provider_send_suppressed": None,
|
||||
}
|
||||
],
|
||||
)
|
||||
@@ -4442,7 +4442,7 @@ def test_retry_terminal_accepts_policy_complete_suppressed_receipt() -> None:
|
||||
"state_transition",
|
||||
"failed",
|
||||
"duplicate_lifecycle_state",
|
||||
True,
|
||||
False,
|
||||
),
|
||||
(
|
||||
"no_write_replay",
|
||||
@@ -4460,7 +4460,7 @@ def test_retry_terminal_accepts_policy_complete_suppressed_receipt() -> None:
|
||||
"digest",
|
||||
"failed",
|
||||
"duplicate_failure_fingerprint_window",
|
||||
True,
|
||||
False,
|
||||
),
|
||||
(
|
||||
"no_write_replay",
|
||||
@@ -4469,7 +4469,7 @@ def test_retry_terminal_accepts_policy_complete_suppressed_receipt() -> None:
|
||||
"shadow_only",
|
||||
"failed",
|
||||
"historical_projection_backfill",
|
||||
True,
|
||||
False,
|
||||
),
|
||||
(
|
||||
"no_write_posture_readback",
|
||||
|
||||
Reference in New Issue
Block a user