Files
awoooi/apps/api
Your Name 47342dfb34
Some checks failed
Code Review / ai-code-review (push) Successful in 55s
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
fix(escalation): dedup escalation card by fingerprint + 24h TTL
接續 b3a0f0d7(decision card dedup)—— 統帥 17:35 鐵證:4 條 ESCALATION P0
連發(HostOutOfDiskSpace + 3×HostDiskUsageHigh,全 target=node-exporter-110,
全不同 INC ID C9CD6E/FB7944/559B54/C1BBF3)。

decision card 修了但 escalation card 走另一條路徑,根因相同:
- emergency_escalation_service.py:31 dedup key 綁 incident_id (uuid4 隨機)
- TTL 900s 比 sweeper 重觸週期 1h 短

修法:
- escalate_auto_repair_unavailable() 改用 alertname+target fingerprint dedup
- TTL 900s → 86400s,與 decision_manager.py:574 對齊

drift_auto_adopt 路徑暫不動(TTL 已 3600s + report_id 非隨機,非當前問題)。

Tests: 7 passed (escalation/emergency 相關用例)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 17:38:54 +08:00
..