ogt
dc6597d36b
[V10.4-D] 環境變數修復:POSTGRES_PASSWORD 注入 + fail-fast 守衛
...
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/品質修復
...
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
...
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
...
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
...
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
...
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 環境變數
...
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
...
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