fix(ai): 修復假信心度 + 解除 Shadow Mode (Phase 22 P1)
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
E2E Health Check / e2e-health (push) Has been cancelled

1. openclaw.py: LLM 截斷時 confidence 0.82→0.0 (禁止偽造信心度)
2. prompts.py: NEMOTRON schema 範例值改用佔位符,防模型照抄 0.75
3. configmap: SHADOW_MODE_ENABLED=false,開放 low 風險自動執行
   條件門檻: confidence≥90% + trust_score≥5 + playbook_success≥95%

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-01 15:59:42 +08:00
parent d352673099
commit eccf61fbc9
3 changed files with 12 additions and 4 deletions

View File

@@ -1041,9 +1041,10 @@ class OpenClawService:
if "suggested_action" not in data:
data["suggested_action"] = "NO_ACTION"
# Step 2.5: 2026-03-31 ogt - 強力補全計畫 (針對 Nemo-4B 斷片)
# Step 2.5: 2026-04-01 Claude Code - 斷片補全 (信心度必須誠實)
# 🔴 禁止填入假信心度!截斷 = 0.0,讓 auto-approve 正確判斷
if "confidence" not in data or not isinstance(data["confidence"], int | float):
data["confidence"] = 0.82 # 給予合理平均值而非 0
data["confidence"] = 0.0 # 截斷/缺失 → 0.0,不可偽造
if "risk_level" not in data:
data["risk_level"] = "low"
if "primary_responsibility" not in data: