Commit Graph

31 Commits

Author SHA1 Message Date
OoO
2ae377dadf V10.386 harden Gemini compose defaults
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
2026-05-21 20:14:36 +08:00
OoO
d2d8dbab65 強化 PPT 產線與線上預覽
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
2026-05-18 15:44:11 +08:00
OoO
160173a270 fix(market-intel): mount mcp compose for preflight
All checks were successful
CD Pipeline / deploy (push) Successful in 6m28s
2026-05-18 14:55:02 +08:00
OoO
c420d48263 Fix PPT auto generation and analytics fallbacks
Some checks failed
CD Pipeline / deploy (push) Failing after 26s
2026-05-18 11:52:31 +08:00
OoO
b65a319cb8 固化 Ollama 三主機路由紅線
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
2026-05-13 12:09:40 +08:00
OoO
153e4c9734 fix(observability): revert unrelated quick review commit files
All checks were successful
CD Pipeline / deploy (push) Successful in 58s
2026-05-06 19:50:52 +08:00
OoO
308efdce25 chore(observability): clarify quick review completion copy
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s
2026-05-06 19:49:28 +08:00
OG T
ddcfd9603b fix(ops): cap momo runtime startup load
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
2026-05-05 14:58:11 +08:00
OoO
15800a29ac [V-New] Ollama 主機切換:GCP 優先 / 111 自動備援架構 | services/ollama_service.py, docker-compose.yml
All checks were successful
CD Pipeline / deploy (push) Successful in 12m19s
2026-05-03 16:03:00 +08:00
OoO
650ef4c5db feat(deploy): ADR-020 — momo-app 容器加 CODE_REVIEW_AUTO_FIX_ENABLED 預設 true
All checks were successful
CD Pipeline / deploy (push) Successful in 12m10s
接續 6cad59f:Python 端預設已改 true,但 188 容器透過 docker-compose
讀 env_file: .env,.env 沒設此 key 時容器仍視為 false(reasoning
顯示 auto_fix=flag_disabled)。本次在 momo-app environment 區塊明確
注入主開關,採 `${CODE_REVIEW_AUTO_FIX_ENABLED:-true}` 機制:
  • .env 沒設 → true(預設生效)
  • .env 顯式 true → true
  • .env 顯式 false → false(保留 escape hatch)

CD pipeline 偵測到 docker-compose.yml 變更會走 rebuild path
(force-recreate momo-app),無需手動干預。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 23:52:49 +08:00
OoO
d5a836e8da fix(frontend): 掛載 Flask web static assets 2026-04-30 23:53:23 +08:00
OoO
41a08886cc fix(frontend): 掛載 V2 static assets 2026-04-30 23:50:52 +08:00
OoO
73561efa7a 強化 CD Gunicorn 掛載與 metrics 降噪
All checks were successful
CD Pipeline / deploy (push) Successful in 9m26s
2026-04-30 09:13:36 +08:00
OoO
8bc0fd7ff6 fix(gunicorn): preload 後重置 SQLAlchemy 連線池
Some checks failed
CD Pipeline / deploy (push) Failing after 9m32s
2026-04-30 00:07:10 +08:00
OoO
779b27f676 修復 P0 告警自癒鏈與測試收集
All checks were successful
CD Pipeline / deploy (push) Successful in 9m39s
2026-04-29 22:37:20 +08:00
OoO
53edcc0077 refactor(templates): 統一模板目錄並移除 fallback loader
ADR-017 Phase 3f-4:根目錄模板搬入 templates/,補 trends/login_history,移除 ChoiceLoader 根目錄 fallback,搬移 components,刪除 web/templates 下的空檔/死檔與 compose 舊模板 mount。
2026-04-29 21:44:38 +08:00
OoO
9528d6c23e fix(stability): 補強 scheduler 例外處理與 vendor 模板路徑
ADR-017 Phase 3f-3:移除 scheduler 裸 except,P1 任務失敗改走 EventRouter notify_failure 同步入口;清理 docker-compose vendor 死 mount;修正 vendor_bp template_folder 指向專案 web/templates。
2026-04-29 21:39:25 +08:00
OoO
13fa165ee2 refactor(cache): 統一 cache SOT 並啟用 gunicorn preload
ADR-017 Phase 3f-2:新增 services/cache_manager.py,讓 sales/import/export/daily/dashboard 共用同一份 in-memory cache;cache_service 改為相容 shim;Dockerfile/docker-compose 啟用 gunicorn --preload。
2026-04-29 21:35:56 +08:00
ooo
f4aed94eb7 fix(adr-011): postgres service profile-gated, 核心三容器移除 depends_on postgres
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
- postgres service 加 profiles: [bundled-db],預設不啟動,避免 docker compose up -d 自動建出 momo-postgres 與生產 momo-db 撞
- momo-app / scheduler / telegram-bot 三核心服務移除 depends_on postgres(生產主機使用獨立 momo-db)
- pgadmin / metabase / postgres-exporter 維持 depends_on postgres(profile-gated,只在 monitoring/bi profile 啟用時生效)
2026-04-28 15:19:00 +08:00
OoO
0906c4be60 fix: mount routes directory for telegram-bot and scheduler
Some checks failed
CD Pipeline / deploy (push) Failing after 1m49s
2026-04-28 12:44:10 +08:00
OoO
b63af671f0 fix: add utils/ volume mount to scheduler + telegram-bot — logger_manager 全容器修復
Some checks failed
CD Pipeline / deploy (push) Failing after 1m1s
2026-04-28 10:36:49 +08:00
OoO
7a0f4ef387 fix: add utils/ volume mount to momo-app — logger_manager 無法 import 根本修復
Some checks failed
CD Pipeline / deploy (push) Failing after 1m7s
2026-04-28 10:34:15 +08:00
ogt
3414d5bedd fix(p1): resolve 014 migration conflict, remove orphan file, add healthchecks
P1-14: rename migrations/014_code_fix_playbook.sql → 020_code_fix_playbook.sql
  to resolve duplicate 014 numbering with 014_telegram_users.sql
P1-22: git rm telegram_ai_integration.py (root orphan) + remove its volume
  mount from docker-compose.yml telegram-bot service; services/ copy remains
P1-23: add healthcheck to momo-scheduler and momo-telegram-bot containers;
  change VERSION:-latest to VERSION:-stable to prevent unvetted Watchtower pushes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 21:15:40 +08:00
ogt
dc6597d36b [V10.4-D] 環境變數修復:POSTGRES_PASSWORD 注入 + fail-fast 守衛
Some checks failed
CD Pipeline / deploy (push) Failing after 1m6s
修復 H7(排程器/Telegram Bot 容器中 POSTGRES_PASSWORD 為空):

- docker-compose.yml: 移除 scheduler/telegram-bot 的 \${POSTGRES_*} environment
  插值行,僅保留 env_file: .env(與 188 主機已上線版本同步)
- config.py: USE_POSTGRESQL=true 時,POSTGRES_PASSWORD 空值立即 raise ValueError,
  避免無聲連線失敗(原本只在執行期出現 auth error)
- .env.example: 新增 GEMINI_API_KEY / GEMINI_MODEL / OPENCLAW_MODEL,
  附 Gemini 2.0 Flash EOL 2026-06-01 警告

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 01:43:43 +08:00
ogt
0099543c05 fix(security): 全域健檢 — 40 項安全/Bug/品質修復
Some checks failed
CD Pipeline / deploy (push) Failing after 5m18s
🔴 Critical
- auto_heal_service: 補 import re + sqlalchemy.text + 修正 orchestrator 變數名
  + autoheal_playbook→playbooks 表名 + _alert_and_store cooldown 修復
- aider_heal_executor: shell injection 改 shell=False + list 參數
- docker-compose: DISABLE_LOGIN 改 env var + 移除密碼 fallback + POSTGRES_HOST 修正
- app.py: /api/backup /api/run_task 等 6 個管理 API 加 @login_required
- config.py + pg_sync + e2e_test: 移除 wooo_pg_2026 hardcoded 密碼 fallback
- pg_backup.sh: 移除 TELEGRAM_TOKEN= 中間變數,直接用 $TELEGRAM_BOT_TOKEN
- migration 014: trigger_pattern→match_pattern + 補 error_type NOT NULL 欄位

🟡 High
- telegram_bot_service: str(e) 改通用訊息 + session try/finally + 移除 pa:/pr: 舊 callback
- run_scheduler: ElephantAlpha thread 死亡監控 + 自動重啟 + Telegram 告警
  + agent_context 03:30 TTL 定時清理任務
- openclaw_learning_service: build_rag_context 兩路徑加 .limit(200)
- hooks: commit-quality + momo-prod-guard 空 catch 改 stderr+exit(1)
- scripts/code_review: auto_yes 預設改 false
- db_backup_service: PGPASSWORD 透過 env dict 傳遞

📦 Migrations
- 013_autoheal: 修正建表順序 playbooks→incidents(外鍵前向引用)
- 018_add_missing_indexes: heal_logs/incidents 外鍵索引 + cleanup_expired_agent_context()

🟢 Infrastructure
- requirements.txt: 加版本下界 Flask>=2.3 SQLAlchemy>=1.4 等
- cd.yaml: 新增 run_scheduler.py + run_telegram_bot.py 監聽路徑
- .gitignore: insert_playbook_local.py 加入忽略

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 01:12:23 +08:00
ogt
704f5b6538 fix: restore full scheduler + telegram-bot + fix momo-app network isolation
All checks were successful
CD Pipeline / deploy (push) Successful in 1m55s
三個關鍵修復:
1. momo-app 加入 momo-pro_default 網路 → 修復 momo-db DNS 解析失敗(crash loop)
2. 新增 telegram-bot compose 服務 → momo-telegram-bot 容器從未啟動,小龍蝦群組零訊息
3. 重寫 run_scheduler.py → 完整載入 scheduler.py 13 個真實排程任務
4. 新增 run_telegram_bot.py 至 repo(原本只存在 server,未納入版控)
5. cd.yaml 同步更新:三容器 restart/rebuild(app/scheduler/telegram-bot)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 19:48:32 +08:00
ogt
9ce8a51326 fix: add momo-pro_default external network to scheduler for momo-db access
Some checks failed
CD Pipeline / deploy (push) Failing after 2m30s
Scheduler container needs to reach momo-db (on momo-pro_default network).
Without this, psycopg2 fails with DNS name resolution error on every recreate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 08:54:28 +08:00
ogt
cab57c4fb5 fix: correct POSTGRES_HOST momo-postgres → momo-db in docker-compose.yml
Some checks failed
CD Pipeline / deploy (push) Failing after 2m44s
Compose env section was overriding the .env file fix with the wrong hostname,
causing psycopg2 name resolution failure after scheduler recreated via compose.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 08:46:42 +08:00
ogt
456c031955 fix: remove defunct momo-telegram-bot from all CD/compose references
Some checks failed
CD Pipeline / deploy (push) Failing after 1m20s
CD was failing with 'No such container: momo-telegram-bot' because
the Gitea Actions restart step still listed all three containers.

Changes:
1. .gitea/workflows/cd.yaml:
   - Sync mode: docker restart now only targets momo-pro-system momo-scheduler
   - Rebuild mode: docker compose up no longer includes telegram-bot service

2. docker-compose.yml:
   - Removed telegram-bot service block (38 lines)
   - Syncs local repo with remote server state (already removed there)
2026-04-20 06:19:44 +08:00
ogt
abefca99e5 chore: docker-compose 明確宣告 EMBEDDING_HOST 環境變數
Some checks failed
CD Pipeline / deploy (push) Failing after 10m59s
momo-app 與 scheduler 兩個 service 均加入
EMBEDDING_HOST=http://192.168.0.111:11434
確保 bge-m3 embedding 永遠走 Hermes 內網,不走公開 HTTPS (ADR-003)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 02:04:35 +08:00
ogt
1b4f3a7bbe feat: EwoooC 初始化 — 完整專案推版至 Gitea
Some checks failed
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