OG T
|
b5905ae283
|
fix(test): 根治 test_github_webhook.py segfault — 改用最小化 app
CD Pipeline / build-and-deploy (push) Has been cancelled
根本原因:
from src.main import app
→ import 整個 FastAPI 應用所有路由
→ src.api.v1.knowledge → knowledge_service → knowledge_repository
→ sqlalchemy.ext.asyncio (C extension) → asyncpg.protocol.protocol
→ CI runner (catthehacker/ubuntu:act-22.04) segfault (exit 139)
修復:
改用只掛載 github_webhook router 的最小化 FastAPI app
github_webhook 的 import chain: config → redis_client → structlog
完全不走 DB / sqlalchemy / asyncpg,無 C extension segfault 風險
結果:
- test_github_webhook.py 恢復進入 CI 測試
- 移除 cd.yaml 中 --ignore=tests/test_github_webhook.py
- HMAC 簽章、whitelist、事件類型等 8 個測試全部覆蓋
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-05 13:36:24 +08:00 |
|
OG T
|
648e100e3c
|
fix(tests): 修復測試 lint 錯誤 + TelegramGateway 方法呼叫
修復項目:
1. 新增 conftest.py 確保環境變數在 settings 前載入
2. test_github_webhook.py 移除重複的 os.environ 設定 (E402)
3. test_smart_router.py 排序 import (I001)
4. github_webhook.py 修正 send_message → send_notification
Phase 13.1 首席架構師審查修復
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 10:37:45 +08:00 |
|
OG T
|
a22ee766da
|
fix(tests): 修復 lint 錯誤 (I001, F401)
- test_smart_router.py: 移除未使用的 pytest import
- test_github_webhook.py: 修正 import 排序
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 10:16:04 +08:00 |
|
OG T
|
0060a33e31
|
feat(api): Phase 13.1 #74 GitHub Webhook → OpenClaw 整合
- POST /api/v1/webhooks/github endpoint
- 處理 pull_request 和 push 事件
- 驗證 X-Hub-Signature-256
- Telegram 通知整合
- GitHubWebhookService 封裝 Redis 操作 (leWOOOgo 合規)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 10:08:54 +08:00 |
|