docs(logbook): 記錄 Telegram 資產總帳部署
Some checks failed
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
Some checks failed
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
## 2026-06-18|Telegram 人工處置卡補上自動化資產總帳
|
||||
|
||||
**背景**:使用者指出「KM、PlayBook、腳本、排程、自動化機制在頁面看不到、告警訊息看不到,就等於沒做」。前一段已把 Work Items 補上自動化資產總帳;本段把同一個產品要求同步到 Telegram 人工處置卡,避免低風險 / no-action / repair candidate missing 告警在批准後只顯示「需人工」卻沒有資產沉澱方向。
|
||||
|
||||
**完成內容**:
|
||||
- `5e2a758f fix(api): 在人工處置告警顯示資產總帳`:在 `TelegramMessage` 的人工處置包中新增「自動化資產總帳」摘要。
|
||||
- Telegram no-action / degraded / repair-candidate-missing 卡現在會直接列出五類必須沉澱的資產:`Knowledge Base`、`Work Items` PlayBook 草案、`Runs` 腳本 / Ansible 安全路由、`Observability` 排程 / 監控規則,以及事件時間線 Verifier 回寫。
|
||||
- 告警文字明確標示:沒有資產 ID、owner、狀態與下一步,不可視為自動化完成。
|
||||
- compact 詳情 / 歷史區也會顯示資產總帳摘要,避免長訊息只剩人工判斷文字。
|
||||
|
||||
**驗證**:
|
||||
- `DATABASE_URL=postgresql+asyncpg://ci:ci@localhost/ci PYTHONFAULTHANDLER=1 PYTHONPATH=apps/api /Users/ogt/.pyenv/shims/python3.11 -m pytest apps/api/tests/test_telegram_ai_automation_block.py apps/api/tests/test_telegram_message_templates.py apps/api/tests/test_telegram_webhook_execution_handoff.py -q -p no:cacheprovider`:`64 passed`。
|
||||
- `DATABASE_URL=postgresql+asyncpg://ci:ci@localhost/ci PYTHONFAULTHANDLER=1 PYTHONPATH=apps/api /Users/ogt/.pyenv/shims/python3.11 -m pytest apps/api/tests/test_repair_candidate_service.py -q -p no:cacheprovider`:`7 passed`。
|
||||
- `DATABASE_URL=postgresql+asyncpg://ci:ci@localhost/ci PYTHONPATH=apps/api /Users/ogt/.pyenv/shims/python3.11 -m py_compile apps/api/src/services/telegram_gateway.py apps/api/src/api/v1/telegram.py`:通過。
|
||||
- `git diff --check`、`source-control-owner-response-guard.py`、`security-mirror-progress-guard.py`:通過。
|
||||
|
||||
**正式部署與讀回**:
|
||||
- Deploy marker:`d31e6527 chore(cd): deploy 5e2a758 [skip ci]`。
|
||||
- Production health:`https://awoooi.wooo.work/api/v1/health` 回 `healthy / prod / mock_mode=false`。
|
||||
- Telegram health:`https://awoooi.wooo.work/api/v1/telegram/health` 回 `configured / prod`,`bot_token_set=true`、`chat_id_set=true`、`sre_group_chat_id_set=true`。
|
||||
- Work Items route:`https://awoooi.wooo.work/zh-TW/awooop/work-items?project_id=awoooi&_v=d31e6527-telegram-asset-ledger-prod` 回 `200`。
|
||||
- Knowledge / KM review 實際 endpoint:`/api/v1/knowledge?entry_type=auto_runbook&status=review&q=KM%20healthcheck&limit=100&project_id=awoooi` 回 `200`,可讀到 `total=1047` 的 review drafts;確認問題不是沒有資料,而是需要持續把沉澱狀態產品化到告警與頁面。
|
||||
|
||||
**邊界**:本段未發 Telegram 測試通知、未修改 Telegram token / chat routing、未改 Alertmanager、未執行修復命令、未執行 Ansible、未寫入 KM、未變更 PlayBook trust、未開 runtime gate。這是「告警可見性與處置包契約」切片,不代表 AI 自動修復已完成。
|
||||
|
||||
## 2026-06-18|Work Items 自動化資產總帳正式上線
|
||||
|
||||
**背景**:使用者指出「所有 KM、PlayBook、腳本、排程、自動化機制看不到,就等於沒做」。前一段已修復 Work Items 缺 `project_id` 導致資料鏈空洞的問題;本段把既有真實讀模型整合成頁面上方的「自動化資產總帳」,避免使用者只能在多個長文字區塊裡自行拼湊狀態。
|
||||
|
||||
Reference in New Issue
Block a user