fix(api): 修復時區 import 排序與未使用變數 lint 錯誤

- 修正 import 順序 (standard → third-party → local)
- 修復 datetime/timedelta 未定義錯誤
- 移除未使用的 imports

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-25 09:26:58 +08:00
parent 5c95b194b9
commit 749b8bc554
12 changed files with 70 additions and 33 deletions

View File

@@ -5,15 +5,37 @@
---
## 📍 當前狀態 (2026-03-25 00:20)
## 📍 當前狀態 (2026-03-25 01:20)
| 項目 | 狀態 |
|------|------|
| **當前 Phase** | **Phase 10 完善 + Incident 同步** |
| **當前 Phase** | **Phase 10 完善** |
| **Day** | Day 7 |
| **下一步** | CD 5d03a82 部署 → 驗證 Incidents 同步 |
| **重大修復** | ✅ Sentry Tunnel Nginx 修復 + Incidents 同步端點 + Ollama 0.18.2 |
| **CI/CD** | ⏳ 5d03a82 排隊 (Runner 忙碌中) |
| **下一步** | 測試簽核流程 (驗證原始內容保留) |
| **重大修復** | ✅ **簽核保留原始內容** - OpenClaw 1859893 |
| **CI/CD** | ✅ 23501633819 完成 |
### 🔴 2026-03-25 01:20 簽核內容保留修復
**問題**: Telegram 簽核後只顯示「✅ 動作 xxx 已批准」,原始告警內容被覆蓋
**根因**: OpenClaw `_handle_approval_callback()` 使用 `edit_message_text()` 完全覆蓋原始訊息
**修復** (commit 1859893):
- 取得 `query.message.text` 原始內容
- 組合: 原始內容 + 分隔線 + 簽核鋼印
- 更新 `feedback_approval_preserve_content.md`
### 🔴 2026-03-25 Alertmanager 災難修復
**問題**: Claude 錯誤將 Alertmanager 指向 OpenClaw (8088),導致 Telegram 發送舊 AIOPS 格式
**修復**:
- Alertmanager 改指向 `http://192.168.0.120:32334/api/v1/webhooks/alertmanager`
- 刪除錯誤 Memory `feedback_alertmanager_openclaw_flow.md`
- 新增正確 Memory `feedback_alertmanager_awoooi_flow.md`
- 更新 DevOps Skill 04
- 停用 runner-healthcheck.yml 中 ubuntu-latest jobs (GitHub Billing)
### 🧠 認知覺醒計畫 Phase 6 施工順序 (C-Suite 2026-03-23 統帥方案)
@@ -41,6 +63,11 @@
| 時間 | 事件 | 負責人 |
|------|------|--------|
| 2026-03-25 01:10 | **✅ CD 23501633819 部署完成**: API/Web/Worker 全部更新Alertmanager webhook 路徑修復生效 | Claude Code |
| 2026-03-25 01:05 | **🔧 NetworkPolicy DNS 修復**: CoreDNS podSelector 修正Telegram 發送恢復 | Claude Code |
| 2026-03-25 01:00 | **📝 feedback_approval_preserve_content.md**: 簽核後保留原始內容鐵律 | Claude Code |
| 2026-03-25 00:55 | **🔧 CI ubuntu-latest Jobs 停用 (ad00eda)**: external-sentinel + telegram-connectivity | Claude Code |
| 2026-03-25 00:50 | **🔴🔴 Alertmanager 路由修復**: Alertmanager 改指向 AWOOOI API (K3s 32334),修復舊 AIOPS 格式災難 + Memory/Skill 更新 | Claude Code |
| 2026-03-25 00:20 | **🔧 sync-from-approvals 端點 (5d03a82)**: 為舊 Approvals 補建 Incidents修復活躍事件顯示 0 問題 | Claude Code |
| 2026-03-25 00:10 | **🔧 Sentry Tunnel Nginx 修復 (41bd213)**: 將 /api/sentry-tunnel 路由到前端 (不是後端 FastAPI) | Claude Code |
| 2026-03-25 00:05 | **✅ CD 23498719881 部署成功**: Incident-Approval 同步 + ApprovalCard UX 修復生效 | Claude Code |