feat(awooop): show source ref gap recency
This commit is contained in:
@@ -670,8 +670,18 @@ def test_list_callback_replies_response_preserves_callback_evidence() -> None:
|
||||
"outbound_reply_markup_total": 30,
|
||||
"outbound_reply_markup_missing_incident_ref_total": 4,
|
||||
"outbound_reply_markup_missing_incident_ref_top_prefixes": [
|
||||
{"prefix": "silence", "total": 3},
|
||||
{"prefix": "drift_view", "total": 1},
|
||||
{
|
||||
"prefix": "silence",
|
||||
"total": 3,
|
||||
"recent_24h_total": 0,
|
||||
"last_sent_at": datetime(2026, 5, 18, 7, 40, 0),
|
||||
},
|
||||
{
|
||||
"prefix": "drift_view",
|
||||
"total": 1,
|
||||
"recent_24h_total": 1,
|
||||
"last_sent_at": datetime(2026, 5, 18, 8, 15, 0),
|
||||
},
|
||||
],
|
||||
"outbound_failed_total": 1,
|
||||
"callback_total": 3,
|
||||
@@ -716,6 +726,9 @@ def test_list_callback_replies_response_preserves_callback_evidence() -> None:
|
||||
][0] == {
|
||||
"prefix": "silence",
|
||||
"total": 3,
|
||||
"recent_24h_total": 0,
|
||||
"first_sent_at": None,
|
||||
"last_sent_at": "2026-05-18T07:40:00",
|
||||
}
|
||||
assert dumped["summary"]["callback_snapshot_missing_total"] == 1
|
||||
assert dumped["summary"]["snapshot_status"] == "partial"
|
||||
@@ -740,8 +753,18 @@ def test_callback_reply_audit_summary_marks_missing_snapshots() -> None:
|
||||
"outbound_reply_markup_total": 100,
|
||||
"outbound_reply_markup_missing_incident_ref_total": 12,
|
||||
"outbound_reply_markup_missing_incident_ref_top_prefixes": [
|
||||
{"prefix": "silence", "total": 8},
|
||||
{"prefix": "drift_view", "total": 4},
|
||||
{
|
||||
"prefix": "silence",
|
||||
"total": 8,
|
||||
"recent_24h_total": 0,
|
||||
"last_sent_at": datetime(2026, 5, 18, 7, 40, 0),
|
||||
},
|
||||
{
|
||||
"prefix": "drift_view",
|
||||
"total": 4,
|
||||
"recent_24h_total": 2,
|
||||
"last_sent_at": datetime(2026, 5, 25, 8, 42, 22),
|
||||
},
|
||||
],
|
||||
"outbound_failed_total": 0,
|
||||
"callback_total": 2,
|
||||
@@ -767,6 +790,12 @@ def test_callback_reply_audit_summary_marks_missing_snapshots() -> None:
|
||||
assert summary["callback_snapshot_missing_total"] == 2
|
||||
assert summary["snapshot_status"] == "not_captured"
|
||||
assert summary["next_action"] == "press_telegram_detail_or_history_after_rollout"
|
||||
assert summary["outbound_reply_markup_missing_incident_ref_top_prefixes"][0][
|
||||
"recent_24h_total"
|
||||
] == 0
|
||||
assert summary["outbound_reply_markup_missing_incident_ref_top_prefixes"][1][
|
||||
"last_sent_at"
|
||||
] == datetime(2026, 5, 25, 8, 42, 22)
|
||||
|
||||
|
||||
def test_callback_reply_audit_summary_marks_mixed_legacy_snapshots_partial() -> None:
|
||||
@@ -779,8 +808,18 @@ def test_callback_reply_audit_summary_marks_mixed_legacy_snapshots_partial() ->
|
||||
"outbound_reply_markup_total": 1322,
|
||||
"outbound_reply_markup_missing_incident_ref_total": 684,
|
||||
"outbound_reply_markup_missing_incident_ref_top_prefixes": [
|
||||
{"prefix": "silence", "total": 275},
|
||||
{"prefix": "drift_view", "total": 144},
|
||||
{
|
||||
"prefix": "silence",
|
||||
"total": 275,
|
||||
"recent_24h_total": 0,
|
||||
"last_sent_at": datetime(2026, 5, 25, 10, 59, 49),
|
||||
},
|
||||
{
|
||||
"prefix": "drift_view",
|
||||
"total": 144,
|
||||
"recent_24h_total": 0,
|
||||
"last_sent_at": datetime(2026, 5, 18, 18, 14, 27),
|
||||
},
|
||||
],
|
||||
"outbound_failed_total": 0,
|
||||
"callback_total": 3,
|
||||
@@ -804,6 +843,9 @@ def test_callback_reply_audit_summary_marks_mixed_legacy_snapshots_partial() ->
|
||||
assert summary["callback_snapshot_missing_total"] == 2
|
||||
assert summary["snapshot_status"] == "partial"
|
||||
assert summary["next_action"] == "review_legacy_callback_snapshot_gap"
|
||||
assert summary["outbound_reply_markup_missing_incident_ref_top_prefixes"][0][
|
||||
"last_sent_at"
|
||||
] == datetime(2026, 5, 25, 10, 59, 49)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user