OG T
|
e17248fd10
|
fix: 首席架構師審查修復 — i18n/CD/時區/死碼清理
E2E Health Check / e2e-health (push) Successful in 16s
CD Pipeline / build-and-deploy (push) Has been cancelled
P0 前端 i18n 合規 (6 檔案):
- settings/page.tsx: 全面改用 useTranslations('settings')
- auto-repair/page.tsx: 30+ 處硬編碼改用 t('autoRepair.*')
- sidebar.tsx: sectionLabel 改用 tSection(),aria-label 國際化
- openclaw-panel.tsx: STATUS_MESSAGES 改用 tPanel(),Production 改用 tBrand
- alerts/page.tsx: StatPill label 改用 t('incident.severity.*')
P1 CD Pipeline:
- cd.yaml: runs-on 改 self-hosted (ADR-039)
- Telegram Secret 注入失敗改為 exit 1 (ADR-035)
- kubectl patch op:replace → op:add (首次部署相容)
P2 後端:
- langfuse_client.py: 移除 v4.x 死碼分支 (SDK 鎖定 <3.0.0)
- ai.py: 標記 TODO(R4) Router 瘦身
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-02 09:02:41 +08:00 |
|
OG T
|
5f2e5c9763
|
fix(api): Langfuse v4.x API 相容性修復
Langfuse SDK v4.0.1 API 變更:
- 移除 client.trace() 方法
- 改用 create_trace_id() + OTEL 整合
修復:
- __enter__: 檢查 trace() 方法存在再使用,否則用 create_trace_id()
- generation/span/score: 加入 hasattr 檢查,v4 改用 debug log
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 19:34:37 +08:00 |
|
OG T
|
45c3656004
|
fix(api): 修正 langfuse_client import 排序 (I001)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 09:37:09 +08:00 |
|
OG T
|
46ab6a838a
|
fix(api): 修復 ruff lint 錯誤
- langfuse_client.py: import Callable from collections.abc
- telemetry.py: import block 格式化
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 09:27:00 +08:00 |
|
OG T
|
b6cff31653
|
feat(api): Phase 15.3 Deep Linking 三系統互連
實現 Sentry ↔ SignOz ↔ Langfuse 零斷鏈觀測:
新增 deep_linking.py:
- SignOz Trace URL 生成器
- Langfuse Trace URL 生成器
- Sentry Issue URL 生成器
- get_all_links() 統一取得所有連結
整合點:
- main.py: Sentry before_send 注入 otel_trace_id + signoz_trace_url
- langfuse_client.py: 自動注入 OTEL trace_id 到 metadata
- openclaw.py: SignOz span 記錄 langfuse.trace_id 反向連結
架構圖:
┌─────────┐ trace_id ┌─────────┐ trace_id ┌──────────┐
│ Sentry │◄────────►│ SignOz │◄────────►│ Langfuse │
│ Errors │ │ Traces │ │ LLMOps │
└─────────┘ └─────────┘ └──────────┘
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 00:48:28 +08:00 |
|
OG T
|
1ac8965a7a
|
feat(api): Phase 15.1 Langfuse LLMOps 整合 + 模型升級
## 新功能
- Langfuse 自建部署 (192.168.0.110:3100)
- langfuse_client.py - LLM 呼叫追蹤包裝
- OpenClaw 整合 Langfuse trace
## 模型升級 (統帥批准)
- 生產預設: llama3.2:3b → qwen2.5:7b-instruct
- 摘要任務: llama3.2:3b (速度優先)
## 配置更新
- requirements.txt: +langfuse>=2.0.0
- config.py: +LANGFUSE_* 設定
- models.json: 更新 Ollama 模型配置
- K8s: Secret + ConfigMap 更新
## 審查通過
- 模組化檢查 ✅
- 核心測試 31/31 ✅
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
2026-03-26 00:32:19 +08:00 |
|