Commit Graph

13 Commits

Author SHA1 Message Date
OG T
31fabe8d61 fix(ci): 修復 CI 失敗問題
- lewooogo-core: 新增 placeholder 測試檔 (vitest)
- api: 修復 I001 import 排序 (ruff --fix)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 23:57:24 +08:00
OG T
0afaea63f8 fix(api): Phase 16 R4 測試修復 - ParsedOperation 向後兼容
問題:
- test_action_parsing.py 導入路徑未更新 (舊: approvals.py)
- ParsedOperation dataclass 不支援 tuple 解包

修復:
- 更新測試導入至 src.services.operation_parser
- 新增 ParsedOperation.__iter__() 支援 tuple 解包

測試: 24/24 passed (100%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 23:00:03 +08:00
OG T
bd6d7f5d0a fix(api): lint errors in test_model_regression and test_prompt_validation
- Remove unused asyncio imports
- Fix import sorting (I001)
- Fix f-string without placeholders (F541)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 11:37:14 +08:00
OG T
9317f64813 feat(ci): Phase 12.3 Prompt 驗證自動化 (#69)
新增:
- test_prompt_validation.py (5 個 System Prompt 驗證案例)
- CI 加入 Prompt Validation Test 步驟
- AWOOOI_SYSTEM_PROMPT 品質基線 80%

驗證維度: 角色遵循、格式遵循、安全邊界

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 11:29:34 +08:00
OG T
0a1787e934 feat(ci): Phase 12.3 Ollama 自動化測試 (#67-68)
新增:
- CI Ollama Model Test job (連線測試 + 冒煙測試)
- test_model_regression.py (4 個回歸案例 + 準確度報告)
- Skills 03 更新模型選擇規則

Phase 12.1-12.2 完成記錄更新

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 11:26:10 +08:00
OG T
c437b0c749 fix(api): import sorting in test_action_parsing.py
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 10:52:35 +08:00
OG T
afda3123eb feat(api): Phase 12.1 Tool Calling 優化 (#60-62)
行動解析準確度: 80% → 100%

新增模式:
- 刪除 Pod X (中文)
- restart deployment X (明確區分)
- 重新啟動 deployment X (中英混合)

測試:
- 24 測試案例 (英/中/混合/邊界)
- test_accuracy_report() 自動化基線報告

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 10:48:37 +08:00
OG T
efe5f824db test: 移除 Telegram Webhook Mock 測試
全面禁止 Mock 測試鐵律:
- 移除 test_webhook_telegram_integration.py (323 lines of Mock)
- 整合測試必須使用真實資料庫與服務

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 10:24:40 +08:00
OG T
4ddaf76b62 test: 移除 Mock 測試 (統帥鐵律)
全面禁止 Mock 測試,所有測試必須使用真實資料庫。
移除 test_stats_api.py (Mock-based unit tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 10:24:27 +08:00
OG T
e3abc04035 fix(test): Telegram 測試 Mock 返回值修正
問題: OpenClaw.analyze_alert Mock 只返回 3 個值
     但函數簽名要求 5 個值 (result, provider, raw, metrics, trace_url)

修復: return_value=(None, "mock", "") → (None, "mock", "", None, "")

首席架構師審查發現

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 10:19:19 +08:00
OG T
b7fb1d962f test(api): Stats API 單元測試 (12 cases)
測試項目:
- IncidentSummary: 空資料庫、解決率計算
- ResolutionStats: 無已解決事件
- IncidentTrends: 空資料、週期參數
- AIPerformance: 空 outcome、評分分佈初始化
- AffectedServices: 空結果、limit 參數
- FeedbackSummary: 空回饋、評分分類、主題萃取

首席架構師審查要求

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 10:14:40 +08:00
OG T
6f049877fc fix(lint): ruff auto-fix + lewooogo-core src 加入 git
- Python: ruff --fix 修復 280 個 lint 錯誤
- lewooogo-core: src/ 目錄未追蹤,導致 CI eslint 失敗

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-23 23:51:37 +08:00
OG T
196d269b92 feat: add all application source code
- apps/api: FastAPI backend with Dockerfile
- apps/web: Next.js frontend with Dockerfile
- apps/sensor: Signal collection agent
- packages: shared packages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-22 18:57:44 +08:00