fix: 收紧代理故障判定并修复自动恢复门控/日历/终态问题

This commit is contained in:
RuoJi6 committed 2026-10-31 16:23:28 +08:00
1 parent de6a0fa125
commit e878020c4d
15 files changed
+437 -26

No files matched your search

+5 -1
View File
@@ -150,7 +150,11 @@ func (s *Server) applyTaskControlWithCause(t *Task, action string, pauseCause er
reason = "paused_by_proxy"
}
if err := s.m.ApplyTaskPauseOriginReason(t.ID, reason, pauseCause == agent.AbortPausedBySchedule); err != nil {
if !wasEnginePaused && !wasQueued {
// Do not compensate over a proxy pause that may have committed while
// this control request was failing. The persisted reason is the source
// of truth for which Engine barrier must remain installed.
stillProxyPaused := t.lifecycleSnapshot().PauseReason == "paused_by_proxy"
if !stillProxyPaused && !wasEnginePaused && !wasQueued {
s.engine.Resume(t)
}
return out, err