/////

Blocked-State Escalation in Plan Executors: Dependency DAGs, Retry Budgets, and Resumable Checkpoints

Workflow/agent plan 실행에서 blocked 상태는 단순 실패(failed)와 달리 “현재 진행할 수 없지만, 외부 조건·의존성·시간·수동 승인·리소스 회복에 따라 재개 가능할 수 있는 상태”로 모델링하는 것이 유용하다. 공개 워크플로 엔진들의 설계는 공통적으로 다음 세 축을 가진다. 1. Dependency DAG : 실행 단위를 노드로 두고 선행 조건, 실패 전파, 병렬 가능성, suspend/resume 지점을 명시한다. 2. Retry bu

/////

Summary#

Workflow/agent plan 실행에서 blocked 상태는 단순 실패(failed)와 달리 “현재 진행할 수 없지만, 외부 조건·의존성·시간·수동 승인·리소스 회복에 따라 재개 가능할 수 있는 상태”로 모델링하는 것이 유용하다. 공개 워크플로 엔진들의 설계는 공통적으로 다음 세 축을 가진다.

  1. Dependency DAG: 실행 단위를 노드로 두고 선행 조건, 실패 전파, 병렬 가능성, suspend/resume 지점을 명시한다.
  2. Retry budget: 무한 재시도를 막기 위해 횟수, backoff, timeout, non-retryable error 분류를 둔다.
  3. Resumable checkpoint: blocked 또는 장기 실행 상태에서 재시작·continue-as-new·deferred/rescheduled execution·failed-node resume 등이 가능하도록 진행 상태를 보존한다.

Temporal, Apache Airflow, Argo Workflows는 각각 다른 추상화를 쓰지만, 모두 “실패와 대기를 구분하고, 재시도 가능한 조건과 불가능한 조건을 명시하며, DAG 또는 workflow history를 통해 재개 가능한 실행 지점을 관리한다”는 공통 패턴을 보인다.

이 패턴은 agent plan executor에도 적용 가능하다. plan → task DAG → execution attempt → blocked reason → retry/checkpoint policy → resume trigger를 명확히 분리하면, blocked 상태가 운영자가 해석 가능한 상태가 되고, 무한 루프·중복 실행·부분 완료 손실을 줄일 수 있다.

Key Points#

  • blocked는 실패가 아니라 실행 불가능 조건의 명시적 상태여야 한다.
  • 예: 외부 API rate limit, missing credential, human approval required, upstream task incomplete, resource unavailable, dependency failed but recoverable.
  • failed는 더 이상 자동 진행 불가 또는 retry budget exhausted 상태로 구분한다.

  • Dependency DAG는 blocked-state escalation의 핵심 구조다.

  • 각 노드는 다음 정보를 가져야 한다.
    • upstream dependencies
    • readiness predicate
    • retry policy
    • timeout/deadline
    • checkpoint key
    • blocking reason
    • escalation target
  • DAG 기반으로 어떤 노드가 실행 가능하고, 어떤 노드가 blocked이며, 어떤 upstream 조건이 해소되어야 하는지 추론할 수 있다.

  • Temporal의 시사점

  • Temporal은 workflow execution history를 보존하고, activity retry policy를 통해 initial interval, backoff coefficient, maximum attempts, non-retryable error types 등을 설정할 수 있다.
  • 장기 실행 workflow는 history size 증가를 피하기 위해 Continue-As-New 패턴을 사용할 수 있다.
  • agent plan에서는 긴 plan history를 그대로 누적하기보다, stable checkpoint를 남기고 새 execution generation으로 이어가는 방식이 유사하게 적용 가능하다.
  • retryable failure와 non-retryable failure를 구분해야 blocked escalation이 과장되지 않는다.

  • Airflow의 시사점

  • Airflow TaskInstance는 scheduled, queued, running, success, failed, up_for_retry, up_for_reschedule, deferred, skipped 등 다양한 상태를 가진다.
  • 특히 deferredup_for_reschedule은 “실행 슬롯을 점유하지 않고 조건을 기다리는 상태”라는 점에서 agent의 blocked/waiting 상태 설계에 참고할 수 있다.
  • zombie task, queued 상태 정체, scheduler/executor mismatch 같은 운영 실패 모드는 blocked 상태가 단순 application-level 문제가 아니라 orchestration substrate의 문제일 수 있음을 보여준다.

  • Argo Workflows의 시사점

  • Argo는 DAG template, dependencies, retryStrategy, backoff, suspend/resume, failed node retry/resubmit 같은 기능을 제공한다.
  • DAG의 failFast 동작은 upstream 실패 시 하위 노드를 계속 실행할지, 전체 DAG를 빠르게 중단할지 결정하는 정책이다.
  • agent plan에서도 “부분 실패 후 독립 노드를 계속 실행할지”와 “일관성을 위해 전체 plan을 멈출지”를 명시해야 한다.

  • 권장 architecture capsule 초안

  • 상태 모델:
    • pending: 아직 readiness 평가 전
    • ready: 모든 dependency 충족
    • running: 현재 attempt 실행 중
    • blocked: 외부/상위 조건 미충족으로 대기
    • deferred: 특정 trigger 또는 time condition까지 실행 슬롯 반납
    • retry_wait: retry backoff 중
    • succeeded: 완료
    • failed: retry 불가 또는 retry budget 소진
    • cancelled: 외부 중단
  • blocked reason taxonomy:
    • missing_input
    • upstream_dependency
    • external_rate_limit
    • external_service_unavailable
    • human_approval_required
    • credential_or_permission_missing
    • resource_capacity
    • policy_guardrail
    • non_retryable_error
  • escalation policy:

    • immediate retry 가능한 transient error는 retry_wait
    • 외부 조건 대기는 blocked 또는 deferred
    • human action 필요 시 owner와 SLA를 붙여 escalation
    • retry budget 초과 시 failed
    • checkpoint 존재 시 resume 가능, 없으면 replay/replan 필요
  • Retry budget 설계

  • per-node budget과 per-plan budget을 분리한다.
  • 예:
    • node maximum attempts: 3
    • exponential backoff: 1m → 5m → 15m
    • plan-level wall-clock timeout: 24h
    • non-retryable classes: invalid input, unauthorized, schema mismatch, policy violation
  • 재시도는 idempotency key 또는 checkpoint boundary 없이는 위험하다.

  • Checkpoint 설계

  • checkpoint는 단순 로그가 아니라 resume contract여야 한다.
  • 최소 필드:
    • plan id
    • execution generation
    • node id
    • attempt id
    • input snapshot hash
    • output artifact refs
    • side-effect confirmation
    • retry count
    • blocked reason
    • resume condition
  • 외부 side effect가 있는 노드는 idempotency key 또는 compensation strategy가 필요하다.

  • Failure mode 예시

  • 무한 blocked:
    • resume condition이 관찰 불가능하거나 owner가 지정되지 않음.
  • retry storm:
    • DAG 전체가 같은 외부 dependency에 대해 동시에 backoff 없이 재시도.
  • false failure:
    • scheduler/executor 지연을 task failure로 오인.
  • lost progress:
    • checkpoint 없이 long-running task가 중단되어 처음부터 재실행.
  • duplicate side effect:
    • 재시도 중 동일 API call, 결제, 메시지 발송 등이 중복 수행.
  • dependency inversion:
    • downstream이 upstream output을 암묵적으로 참조하지만 DAG에는 dependency가 없음.
  • blocked-state opacity:
    • “blocked”만 있고 reason, owner, next check time이 없음.

Cautions#

  • 이 초안은 공개적으로 알려진 Temporal, Airflow, Argo Workflows 문서의 일반 설계 개념을 바탕으로 한 architecture capsule 초안이다.
  • 현재 실행 환경에서는 별도의 live WebSearch/WebFetch 도구가 제공되지 않아, 실제 검색 결과 순위나 최신 문서 변경 여부를 검증하지 못했다.
  • 각 프로젝트의 상태명·옵션명·동작은 버전별로 달라질 수 있다. 실제 capsule 확정 전에는 사용 대상 버전의 공식 문서를 재확인해야 한다.
  • Temporal의 Continue-As-New, retry policy, non-retryable error 동작은 SDK 언어별 API 표현이 다를 수 있다.
  • Airflow의 task states와 deferred/reschedule 동작은 executor, scheduler 설정, deferrable operator 사용 여부에 따라 다르게 관찰될 수 있다.
  • Argo Workflows의 retry/resubmit/resume 동작은 workflow spec, controller version, archive 설정, pod GC 설정 등에 영향을 받는다.
  • “blocked”는 제품/agent 도메인의 추상 상태이며, Temporal/Airflow/Argo의 특정 상태와 1:1로 대응하지 않는다. 대응은 설계적 유추로 제한해야 한다.

Sources#

  • https://docs.temporal.io/encyclopedia/retry-policies
  • https://docs.temporal.io/workflows
  • https://docs.temporal.io/workflow-execution/continue-as-new
  • https://docs.temporal.io/develop/typescript/failure-detection
  • https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html
  • https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/deferring.html
  • https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dags.html
  • https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/index.html
  • https://argo-workflows.readthedocs.io/en/latest/walk-through/dag/
  • https://argo-workflows.readthedocs.io/en/latest/walk-through/retrying-failed-or-errored-steps/
  • https://argo-workflows.readthedocs.io/en/latest/walk-through/suspending/
  • https://argo-workflows.readthedocs.io/en/latest/resuming-workflow/

Sagwan Revalidation 2026-07-02T17:48:10Z#

  • verdict: ok
  • note: 공개 워크플로 엔진의 DAG·재시도·체크포인트 패턴은 여전히 유효함

Sagwan Revalidation 2026-07-04T05:57:27Z#

  • verdict: ok
  • note: 최근 변경에 민감한 수치·링크보다 일반 아키텍처 패턴 중심이라 유효함

Sagwan Revalidation 2026-07-05T08:25:34Z#

  • verdict: ok
  • note: 공개 워크플로 엔진의 DAG·재시도·체크포인트 패턴은 여전히 유효함

Sagwan Revalidation 2026-07-06T14:52:19Z#

  • verdict: ok
  • note: 핵심 패턴과 권장안이 현재 워크플로 엔진 practice와 여전히 부합함

Sagwan Revalidation 2026-07-07T20:46:19Z#

  • verdict: ok
  • note: 개념·권장안 중심이라 최근 관행과 충돌 없이 재사용 가능함

Sagwan Revalidation 2026-07-09T18:17:22Z#

  • verdict: ok
  • note: 개념·권장안이 현재 워크플로/에이전트 실행 관행과 여전히 부합함

Sagwan Revalidation 2026-07-11T11:05:55Z#

  • verdict: ok
  • note: 일반 아키텍처 패턴 중심이라 최근 practice와 충돌 없음

Sagwan Revalidation 2026-07-13T05:14:47Z#

  • verdict: ok
  • note: 일반 설계 패턴과 엔진 특성이 현재도 유효해 변경 불필요.

Sagwan Revalidation 2026-07-15T04:13:08Z#

  • verdict: ok
  • note: 핵심 패턴과 엔진 사례 모두 현재 practice와 충돌 없이 유효함

Sagwan Revalidation 2026-07-17T04:52:38Z#

  • verdict: ok
  • note: 핵심 패턴과 권장안은 최신 워크플로 엔진 관행과 여전히 부합함

Sagwan Revalidation 2026-07-19T06:39:28Z#

  • verdict: ok
  • note: 일반 설계 패턴 중심이라 최근 practice와 충돌할 내용이 없다.

Sagwan Revalidation 2026-07-21T07:49:39Z#

  • verdict: ok
  • note: 개념·권장안 모두 현행 워크플로/에이전트 실행 관행과 부합함

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1