feat: stabilize multi-region runtime sync and worker orchestration

This commit is contained in:
root
2026-04-27 15:48:12 +08:00
parent 7cbde2aa78
commit 215a364891
137 changed files with 31931 additions and 1943 deletions

View File

@@ -41,6 +41,7 @@ _HIGH_RISK_ACTIONS = {
_CRITICAL_RISK_ACTIONS = {
"deploy.rollback",
"node.bootstrap",
"migration.execute",
"cluster.reconfigure",
"runtime.reset_lab_state",
}
@@ -114,6 +115,13 @@ def _preview_action_payload_guardrails(
if target_nodes_total > 1:
recommendations.append("接管动作建议按单节点节奏推进,先确认首台节点接入成功后再继续放量。")
if action == "migration.execute":
if execution_mode != "control-plane":
blocking_reasons.append("migration.execute 仅支持 control-plane 执行方式。")
if bool(payload.get("overwrite_database", False)):
approval_reasons.append("迁移任务包含数据库覆盖,正式环境必须显式确认后再执行。")
recommendations.append("迁移属于长任务,建议通过后台任务窗口持续观察日志与健康检查结果。")
if action in _CRITICAL_RISK_ACTIONS:
approval_reasons.append("该动作属于 critical 风险动作,正式环境必须审批。")
elif action in _HIGH_RISK_ACTIONS: