fix(review): 修復 /review 機制的 7 個審查問題

必修:
- 路由表新增 .sh → critic、.yaml/.yml → tool-expert 兩條規則
- refactor-specialist 改為並行(不取代 critic),確保 vuln-verifier 觸發條件正確
- Phase B 觸發條件從 'critic 含 🔴' 改為 '任一主審 Agent 含 🔴'

選修:
- Stage 0 新增 >2000 行 diff 保護(降級為 --stat 摘要)
- Stage 2.5 移除 '立即' 矛盾描述,改為 'Phase A 全回報後逐一發送'
- tg_notify.sh: 新增 CHAT_IDS 解析後空值守衛
- tg_notify.sh: 改用 printf | --data-urlencode 'text@-' 支援多行訊息

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ogt
2026-04-22 01:39:39 +08:00
parent a45b61f326
commit 4cdf0793a4
2 changed files with 16 additions and 8 deletions

View File

@@ -34,12 +34,17 @@ else
CHAT_IDS=$(echo "$CHAT_IDS_RAW" | tr -d '[]" ' | tr ',' '\n')
fi
if [[ -z "$CHAT_IDS" ]]; then
echo "[tg_notify] CHAT_IDS 解析結果為空,跳過通知" >&2
exit 0
fi
while IFS= read -r CHAT_ID; do
[[ -z "$CHAT_ID" ]] && continue
curl -s --max-time 10 -X POST \
printf '%s' "$FULL_MSG" | curl -s --max-time 10 -X POST \
"https://api.telegram.org/bot${TOKEN}/sendMessage" \
-d "chat_id=${CHAT_ID}" \
--data-urlencode "text=${FULL_MSG}" \
--data-urlencode "text@-" \
-d "parse_mode=HTML" > /dev/null || \
echo "[tg_notify] 發送到 ${CHAT_ID} 失敗(不阻斷流程)" >&2
done <<< "$CHAT_IDS"