- _build_llm_action_buttons 改 async,await setex 在 return 前完成 (消除「按鈕發出→點擊→Redis 未寫完」的 race) - short_id 從 4 bytes → 8 bytes(16-hex),64-bit 碰撞空間 - payload 加入 incident_id,callback handler 從 payload 還原真實 ID (修 P0-2:避免 short_id 進 context 造成 KM 學習鏈錯亂) - Redis 故障與按鈕過期分流回應(P1) - HTML escape 防 XSS(P2) - _build_inline_keyboard 改 async,兩個呼叫端加 await - tests 全部改 @pytest.mark.asyncio + AsyncMock redis (1495 passed in unit suite) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ADR-082 §B2:dispatch_llm_action() 風險閘控 + allowlist + 模板渲染 23 tests pass Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>