fix(agents): align reports with controlled autonomy
Some checks failed
Code Review / ai-code-review (push) Successful in 20s
CD Pipeline / tests (push) Successful in 1m36s
CD Pipeline / build-and-deploy (push) Successful in 5m46s
CD Pipeline / post-deploy-checks (push) Successful in 1m29s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
Some checks failed
Code Review / ai-code-review (push) Successful in 20s
CD Pipeline / tests (push) Successful in 1m36s
CD Pipeline / build-and-deploy (push) Successful in 5m46s
CD Pipeline / post-deploy-checks (push) Successful in 1m29s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
This commit is contained in:
@@ -526,7 +526,7 @@ class FailureWatcherService(IFailureWatcher):
|
||||
|
||||
規則:
|
||||
- 同一資源 5 分鐘內最多修復 3 次
|
||||
- 超過則升級為 MEDIUM 風險,請求人工授權
|
||||
- 超過則升級為 MEDIUM 風險,排入 AI 受控重試 / rollback / verifier
|
||||
|
||||
Returns:
|
||||
True 如果可以自動修復,False 如果超過限制
|
||||
@@ -672,7 +672,7 @@ class FailureWatcherService(IFailureWatcher):
|
||||
return "clear_cache"
|
||||
|
||||
if any(kw in action_lower for kw in ["scale", "擴展", "增加"]):
|
||||
return "scale_up" # 需人工授權
|
||||
return "scale_up" # 交由受控策略檢查副本上下限與回滾
|
||||
|
||||
# 無法自動執行,返回原始建議
|
||||
return recommended_action[:50]
|
||||
@@ -719,7 +719,7 @@ class FailureWatcherService(IFailureWatcher):
|
||||
analysis: dict,
|
||||
reason: str,
|
||||
) -> None:
|
||||
"""請求人工授權 (推送到 Telegram + 前端)"""
|
||||
"""排入 AI 受控修復後續 (推送到 Telegram + 前端)"""
|
||||
try:
|
||||
# 推送到 Redis (前端 WebSocket 訂閱)
|
||||
redis = get_redis()
|
||||
|
||||
Reference in New Issue
Block a user