Merge remote-tracking branch 'gitea/main' into codex/p0-006-ai-log-triage-20260709
This commit is contained in:
@@ -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
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1519,6 +1519,9 @@ def test_consumer_receipts_close_taxonomy_decision_and_learning_gaps():
|
||||
executor_log_count_rows=[
|
||||
{"status": "success", "total": 2141, "recent": 12},
|
||||
],
|
||||
alert_operation_count_rows=[
|
||||
{"event_type": "ALERT_RECEIVED", "total": 28333, "recent": 87},
|
||||
],
|
||||
log_controlled_writeback_consumer=_log_controlled_writeback_consumer_readback(),
|
||||
)
|
||||
|
||||
@@ -1581,16 +1584,15 @@ def test_consumer_receipts_close_taxonomy_decision_and_learning_gaps():
|
||||
alert_noise = readback["alert_noise_reduction"]
|
||||
assert alert_noise["status"] == "completed"
|
||||
assert alert_noise["missing_required_stage_ids"] == []
|
||||
assert alert_noise["rollups"]["raw_alert_received_total"] == 0
|
||||
assert alert_noise["rollups"]["raw_alert_received_total"] == 28333
|
||||
assert alert_noise["rollups"]["raw_suppressed_alert_total"] == 0
|
||||
assert alert_noise["rollups"]["controlled_alert_receipt_chain_fallback_total"] == 1
|
||||
assert alert_noise["rollups"]["controlled_alert_receipt_chain_fallback_total"] == 0
|
||||
assert alert_noise["rollups"]["controlled_alert_noise_fallback_total"] == 1
|
||||
alert_quality = {
|
||||
item["stage_id"]: item.get("record_quality")
|
||||
for item in alert_noise["stages"]
|
||||
}
|
||||
assert alert_quality["alert_intake_receipts"] == (
|
||||
"controlled_alert_receipt_chain_fallback"
|
||||
)
|
||||
assert alert_quality["alert_intake_receipts"] == "recorded"
|
||||
assert alert_quality["duplicate_convergence"] == (
|
||||
"controlled_alert_receipt_chain_fallback"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user