ogt
|
19342a0044
|
docs: 補入 docs/external+guides+memory 目錄至版控
包含:
- docs/external/aiops_saas.md
- docs/guides/deployment_sop.md / devops_handbook.md / google_drive_setup.md
- docs/memory/credentials_passbook.md / history_logs.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 16:31:50 +08:00 |
|
ogt
|
77d3a1da48
|
feat(ai-ops): ADR-013 AIOps 自動修復閉環完整實作
CD Pipeline / deploy (push) Failing after 3m24s
架構(Exception → Incident → PlayBook → Heal → KM → Telegram):
新增元件:
- database/autoheal_models.py: Incident/Playbook/HealLog 三張表 + 7 條種子 PlayBook
- migrations/013_autoheal.sql: 建表 DDL + 種子資料(冪等 INSERT)
- services/auto_heal_service.py: 核心引擎 7 步閉環
- _classify_error: 8 類錯誤自動分類 (DNS_FAIL/DB_UNREACHABLE/OOM/...)
- _match_playbook: error_type + keyword + 冷卻 + max_retries 保護
- _execute_playbook: DOCKER_RESTART/SSH_CMD/ALERT_ONLY/WAIT_RETRY
- _sink_to_km: 修復知識寫入 ai_insights (auto_heal_playbook)
- SSH 白名單:僅允許 docker restart / compose restart / docker start
修改元件:
- database/manager.py: _init_autoheal_tables() 啟動時建表+種子 PlayBook
- scheduler.py: 3 個核心任務植入 handle_exception
(run_auto_import_task / run_icaim_analysis_task / run_weekly_strategy_task)
- requirements.txt: paramiko(SSH 跳板;不可用時降級 subprocess+CLI ssh)
安全設計: CMD 白名單 + cooldown + max_retries escalation + DB 冪等 migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 16:03:49 +08:00 |
|
ogt
|
0b4f80ee8a
|
feat(ai-ops): Agent Action Ladder 骨幹(ADR-012 Phase 1)+ 週報套模板
CD Pipeline / deploy (push) Successful in 1m14s
ADR-012 核心設計:
- 4 級信任邊界:L0 直出 / L1 Hermes 觀察 / L2 NemoTron 診斷執行 / L3 OpenClaw HITL
- 通知鏈絕不中斷:每級失敗立即降級,保底 L0 模板 + 🟡 標記
- Audit Trail:每次 dispatch 自動寫 ai_insights (insight_type=agent_action)
- 安全白名單:L2 可呼叫 6 個安全 action(retry/query_km/silence + 3 個既有 NemoTron tool)
新增檔案:
- services/event_router.py — 事件分流入口,按 severity × event_type 分 Tier
- services/agent_actions.py — 安全 action 白名單(Phase 1 stub + 完整介面)
- docs/adr/ADR-012-agent-action-ladder.md — 完整設計 + 分階段計畫
Phase 1 狀態:
- L0 直出完整可用 ✅
- L1 Hermes / L2 NemoTron 為 stub(Phase 2/3 填實作)
- Fallback 降級鏈已完整 ✅
- 靜音檢查(is_silenced)+ Audit Trail 已就緒 ✅
處理既有 TODO:
- services/openclaw_strategist_service.py::_notify_telegram_group()
改用 telegram_templates.report() 統一週報格式
全景盤點(新 memory):
- reference_telegram_endpoints_map.md — 21 個 Telegram 發送點
- feedback_agent_action_ladder.md — 操作規範
(+ 既有 ADR-011 跨專案隔離規範一併生效)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 12:46:51 +08:00 |
|
ogt
|
8d0b79cd00
|
feat(ops): restore Telegram chain + P2/P3 price decisions + ADR-011
CD Pipeline / deploy (push) Successful in 1m19s
P2 (Inline Keyboard 降價決策):
- routes/bot_api_routes.py: POST /bot/api/price-decision/notify
- services/telegram_bot_service.py: pa:/pr: callback handlers
P3 (OpenClaw 自動觸發):
- services/openclaw_strategist_service.py: Gemini 週報末尾輸出
PRICE_DECISIONS_JSON,解析後自動推送 inline keyboard 給 admin
Ops 修復(跨專案隔離與容器斷訊根因):
- ADR-011 全面規範多專案共存邊界、禁用 --remove-orphans
- .gitea/workflows/cd.yaml: sync 模式一次重啟三容器
(原本僅 momo-pro-system,scheduler/telegram-bot 靜默落伍)
- run_telegram_bot.py: 從 scripts/tools/ 複製到根目錄
(消滅 docker-compose mount 建空目錄的陷阱)
- CLAUDE.md: 補核心容器表、診斷黃金三句、緊急指令
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 12:25:04 +08:00 |
|
ogt
|
62d8504d8f
|
docs: 新增 ADR-010 Gitea CI/CD Pipeline,更新 CLAUDE.md
- ADR-010:記錄 ewoooc Gitea repo 建立、cd.yaml 設計、runner user-level 踩坑、rsync 缺失修復
- CLAUDE.md:新增 CI/CD 表格(repo URL、pipeline 模式、runner、Telegram 通知)
- docs/adr/README.md:加入 ADR-010 索引
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 11:21:53 +08:00 |
|
ogt
|
1b4f3a7bbe
|
feat: EwoooC 初始化 — 完整專案推版至 Gitea
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml)
- 部署模式: rsync Python 檔案至 188 → docker restart (volume mount)
- Dockerfile/requirements 變動時自動重建 Docker image
- 部署通知: Telegram (開始/成功/失敗)
- 健康檢查: https://mo.wooo.work/health (最多 5 次重試)
- 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-19 01:21:13 +08:00 |
|