Commit Graph

7 Commits

Author SHA1 Message Date
OG T
1e1f24c561 fix(test): ComplexityScorer 模型名稱更新 llama3.2:3b → gemma3:4b
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
2026-04-09 09:01:59 +08:00
OG T
688146ef9c test(ai-router): test_fallback_list >= 2 改 >= 1
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
DIAGNOSE local chain 選 Nemotron 後 fallback 只剩 Ollama 一個
>= 2 斷言過嚴,與 test_query_routes_to_ollama 同樣修正

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 18:05:25 +08:00
OG T
428ed5f8cd test(ai-router): 修正 test_query_routes_to_ollama 斷言
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 41s
Phase 25 P0 後 DIAGNOSE 走 _local_fallback_chain [NEMOTRON, OLLAMA]
選 NEMOTRON 為 primary,fallback 只剩 OLLAMA 一個,
>= 2 斷言過嚴,改為 >= 1。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 18:02:43 +08:00
OG T
59902f270d fix(tests): 首席架構師審查修復 - 測試套件 + DI 強化 (96/100 OUTSTANDING)
P1 測試修復:
- test_smart_router.py: 更新至當前 API (IntentResult + DIAGNOSE/CONFIG 規範化)
- test_auto_repair_service.py: 注入 _no_cooldown fixture 隔離 Redis 依賴
- test_global_repair_cooldown.py: 加 @pytest.mark.integration 標記

P2 架構改進:
- AutoRepairService: 新增 cooldown_checker DI 參數 (Callable | None)
- global_repair_cooldown: get_redis() 移入 try-except 防止未捕獲 RuntimeError

P3 配置:
- pyproject.toml: 登記 integration pytest marker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 11:11:50 +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
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