OG T
|
b77e151387
|
feat(ai): ADR-036 NVIDIA Nemotron Tool Calling 整合
Phase 20 - 提升 Tool Calling 精準度 50% → 83.3%
新增:
- src/models/nvidia.py: Pydantic Schema
- src/services/nvidia_provider.py: NvidiaProvider 類別
- tests/test_nvidia_provider.py: 15 項單元測試 (全部通過)
修改:
- ai_router.py: AIProvider.NVIDIA + route_tool_calling()
- ai_rate_limiter.py: NVIDIA 限制 (5 RPM, 100/day)
- models.json: NVIDIA 配置
- cd.yaml: Secrets 注入 NVIDIA_API_KEY
路由策略:
- Tool Calling: Nemotron → Gemini → Claude
- 一般對話: Ollama → Gemini → Claude (不變)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-29 00:00:08 +08:00 |
|
OG T
|
59c9eff83a
|
fix(api): 修復 10 個 Lint 錯誤 (imports 排序 + unused imports + set comprehension)
- F401: 移除未使用的 imports (TerminalSessionStatus, AutoApproveDecision, TerminalSession)
- I001: 修正 import blocks 排序
- C401: set(generator) → {set comprehension}
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-28 18:51:52 +08:00 |
|
OG T
|
7b9b0c490b
|
feat(phase19): Omni-Terminal 100% 完成 + 首席架構師審查 47/50
## Phase 19 Omni-Terminal (Wave 0-6 全部完成)
### 核心功能
- SSE 狀態機 (7-State 設計,10/10 分)
- GenUI 動態渲染 (6 張卡片 + Zod Schema 驗證)
- 核鑰 UX (長按授權 + 風險分級)
- Terminal Telemetry (Sentry 整合)
### P0-P2 修復
- P0: Singleton → FastAPI Depends 依賴注入
- P1: Zod Schema 升級 (7 個驗證 Schema)
- P1: 錯誤分類碼聚合 (Sentry fingerprint)
- P2: Slow Query 監控 (5s 警告 / 10s 嚴重)
### 測試
- test_terminal_service.py: 54 項測試全通過
- 意圖分類: 42 個測試案例 (9 種 IntentType)
### 文檔
- ADR-031: SSE 架構實作紀錄
- ADR-032: GenUI 渲染實作紀錄
- Skills: v1.9 (後端 Terminal 章節)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-28 18:04:12 +08:00 |
|
OG T
|
30153496d1
|
fix(api): 修復全部 lint 錯誤 (ruff --fix)
- Import sorting (I001)
- Unused imports (F401)
- f-string without placeholders (F541)
- Loop variable unused (B007)
- zip() strict parameter (B905)
- Exception chaining (B904)
- collections.abc imports (UP035)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 16:06:20 +08:00 |
|
OG T
|
fe7fd7a3e0
|
feat(tests): ADR-018 LLM 測試策略三層架構
問題: LLM 測試因模型波動導致 CI 失敗
解決方案: 三層測試策略
- Tier 1 (CI): Schema 驗證 + Golden Responses
- Tier 2 (Nightly): 屬性測試 + Live LLM
- Tier 3 (Weekly): 語意相似度測試
新增檔案:
- ADR-018-llm-testing-strategy.md
- tests/llm_testing/ 框架
- schema_validators.py: Pydantic Schema 驗證
- property_validators.py: kubectl/風險等級驗證
- golden_responses.py: 預錄回應管理
- tests/test_llm_tier1_schema.py: 35 個 Tier 1 測試
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 11:17:00 +08:00 |
|
OG T
|
2e75a20150
|
feat(api): Phase 7.5-7.6 Playbook 整合決策與自動萃取
Phase 7.5: DecisionManager 三軌決策
- 新增 Playbook 優先匹配 (similarity >= 85%)
- 三軌決策順序: Playbook > LLM > Expert System
- 整合 PlaybookService 推薦引擎
Phase 7.6: 自動萃取機制
- approval_execution.py 成功執行後觸發萃取
- 條件: RESOLVED/CLOSED + effectiveness >= 4
- 滿分 (5) 自動核准 Playbook
測試:
- 13 個 Playbook 單元測試全部通過
- 修復 Incident 模型欄位對應 (reasoning_steps)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 11:09:25 +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 |
|
OG T
|
58b4004a18
|
feat(api): Phase 13.3 智能路由 (#85-87)
- IntentClassifier: 意圖分類 (告警/部署/查詢/維運/審查)
- ComplexityScorer: 複雜度評分 (1-5 分)
- AIRouter: 動態模型選擇 (整合 Intent + Complexity)
- 測試: 完整單元測試覆蓋
Phase 13.3 設計: project_phase13_3_smart_router.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 10:01:04 +08:00 |
|
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 |
|