fix(agents): close alert noise duplicate fallback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled

This commit is contained in:
ogt
2026-07-09 23:28:32 +08:00
parent 12a11503ce
commit cf02f1f4cb
2 changed files with 26 additions and 7 deletions

View File

@@ -1912,14 +1912,28 @@ def _build_alert_noise_reduction_readback(
alert_received_recent,
1 if alert_receipt_chain_fallback_recent else 0,
)
controlled_alert_chain_ready = bool(
alert_received_effective_total > 0
and telegram_receipt_total > 0
and controlled_route_total > 0
and consumer_context_total > 0
)
controlled_alert_chain_recent = bool(
controlled_alert_chain_ready
and (
alert_received_effective_recent > 0
or telegram_receipt_recent > 0
or controlled_route_recent > 0
)
)
duplicate_convergence_fallback_ready = bool(
duplicate_convergence_total <= 0
and alert_receipt_chain_fallback_ready
and controlled_alert_chain_ready
and learning_complete
)
duplicate_convergence_fallback_recent = bool(
duplicate_convergence_fallback_ready
and alert_receipt_chain_fallback_recent
and controlled_alert_chain_recent
)
duplicate_convergence_effective_total = max(
duplicate_convergence_total,
@@ -2158,6 +2172,9 @@ def _build_alert_noise_reduction_readback(
"controlled_alert_receipt_chain_fallback_total": (
1 if alert_receipt_chain_fallback_ready else 0
),
"controlled_alert_noise_fallback_total": (
1 if duplicate_convergence_fallback_ready else 0
),
},
}