Your Name
8fb0c5df33
Code Review / ai-code-review (push) Successful in 47s
CD Pipeline / tests (push) Successful in 2m11s
CD Pipeline / build-and-deploy (push) Failing after 31m12s
CD Pipeline / post-deploy-checks (push) Has been skipped
feat(heartbeat): noise reduction — silent 6h + warnings hash dedup
P0 #4 (徹底長期修系列) — 統帥鐵證:「INFO | AWOOOI 系統報告」每 30 分鐘
推一次,一天 48 條同樣內容,即使我修了 P0 #3 假警報,每天的「全系統正常」
重複推送本身就是噪音,讓統帥誤以為告警還在重複。
修法(不違反「監控工具必須被監控」鐵律 — 健康狀態仍每 6h 推 1 次「我活著」):
| 狀況 | 推送行為 |
|------|---------|
| 健康(無 warnings)| 6h 內最多 1 次「我活著」訊號 |
| 有 warnings 跟上次同 hash | 跳過 |
| 有 warnings 跟上次不同 | 立即推送(新狀況不漏)|
| 健康 ↔ 有事 切換 | 自動清掉相反 marker |
Redis keys:
- `heartbeat:silent_last_sent` — 健康狀態 silent marker, TTL=6h
- `heartbeat:warnings_hash` — 上次 warnings 的 md5[:12], TTL=24h
效果:統帥每天從 48 條 heartbeat → ~4 條(健康狀態 4×6h),有事立即推。
Tests: 6 passed (test_heartbeat_dedup_p0_4.py)
- healthy_first_send_goes_through
- healthy_second_send_within_6h_skipped
- warnings_unchanged_skipped
- warnings_changed_pushes
- warnings_to_healthy_clears_warnings_hash
- healthy_to_warnings_clears_silent_marker
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 01:48:57 +08:00
..
2026-03-25 23:14:24 +08:00
2026-04-28 15:05:06 +08:00
2026-05-02 23:44:12 +08:00
2026-04-11 21:33:19 +08:00
2026-05-01 16:53:02 +08:00
2026-05-01 13:21:19 +08:00
2026-04-25 03:24:16 +08:00
2026-05-03 00:18:57 +08:00
2026-04-30 23:59:39 +08:00
2026-04-27 08:15:10 +08:00
2026-05-02 12:31:37 +08:00
2026-05-01 10:56:59 +08:00
2026-03-24 09:20:56 +08:00
2026-04-16 03:01:31 +08:00
2026-05-03 01:48:57 +08:00
2026-04-20 04:04:13 +08:00
2026-04-22 01:33:30 +08:00
2026-03-28 23:47:18 +08:00
2026-03-23 23:51:37 +08:00
2026-04-30 23:04:58 +08:00