feat(adr-081): Phase 1 感官縱深 — 8D 情報蒐集 + 執行後驗證
成品: - IncidentEvidence DB model(8D 感官 + pre/post 執行狀態) - EvidenceSnapshot dataclass(build_summary → LLM 上下文) - SanitizationService(Prompt Injection 0-tolerance,12 pattern) - MCPToolRegistry(動態工具登記,suggest_tools 不寫死告警類型) - PreDecisionInvestigator(8D 並行感官,P99 < 8s,Redis 30s 快取) - PostExecutionVerifier(warmup 10s → 後狀態評估 success/degraded/failed) - decision_manager + approval_execution 接線(feature flag 守衛) Gate 1 修復:D4/D5/D7/D8 補 sanitize_dict_values;移除裸 "error" failure signal 防 error_rate key 誤判;evidence_snapshot rowcount 零行警告。 測試:130 passed(+111 新增) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1656,8 +1656,19 @@ class DecisionManager:
|
||||
|
||||
優先順序: Playbook > LLM > Expert System
|
||||
"""
|
||||
# ADR-070: 分析前用 MCP 收集真實環境狀態
|
||||
mcp_context = await self._collect_mcp_context(incident)
|
||||
# ADR-081 Phase 1: PreDecisionInvestigator — 8D 感官蒐集(feature flag 守衛)
|
||||
# AIOPS_P1_ENABLED=False → 退回舊 _collect_mcp_context() 路徑
|
||||
# 2026-04-15 ogt + Claude Sonnet 4.6
|
||||
evidence_snapshot = None
|
||||
from src.core.feature_flags import aiops_flags
|
||||
if aiops_flags.is_sub_flag_enabled("AIOPS_P1_PRE_DECISION_INVESTIGATOR"):
|
||||
from src.services.pre_decision_investigator import get_pre_decision_investigator
|
||||
investigator = get_pre_decision_investigator()
|
||||
evidence_snapshot = await investigator.investigate(incident)
|
||||
mcp_context = evidence_snapshot.evidence_summary or ""
|
||||
else:
|
||||
# ADR-070: 原有 MCP 收集路徑(Phase 0 保留)
|
||||
mcp_context = await self._collect_mcp_context(incident)
|
||||
|
||||
# Phase 7.5: 先嘗試 Playbook 匹配
|
||||
playbook_result = await self._try_playbook_match(incident)
|
||||
|
||||
Reference in New Issue
Block a user