Severity: medium
Found in: 2026-07-22 code review
Location
lib/dag/runner.rb:124 (call site), :159 (acquire_running transitions :pending -> :running first), :187 (@registry.lookup raises inside build_run_context), :191 (klass.new(config:) raises for cached step instances).
Failure mode
Runner#call transitions the workflow to :running before build_run_context runs. build_run_context can raise for reachable, non-exotic reasons: UnknownStepTypeError for a definition node whose type was never registered (create_workflow does not validate registry membership), StaleRevisionError on corrupt storage, or a cached step's constructor raising on invalid config. The exception propagates out of #call, leaving the workflow in :running with zero events. Worse, it is unrecoverable: resume allows :running but re-enters the same build_run_context and raises identically, so the workflow can never reach a terminal state.
Minimal trigger
Register only :noop, store a definition with add_node(:a, type: :typo), call runner.call(id) → UnknownStepTypeError, workflow stuck :running forever.
Fix direction
Rescue build_run_context failures inside #call, transition the workflow to :failed (with a diagnostic event) before re-raising, so the row never wedges in :running. Related: safe_call_step (runner.rb:438-453) gives the same constructor error a different behavior for cache_instances: false — see the companion low-severity issue.
Severity: medium
Found in: 2026-07-22 code review
Location
lib/dag/runner.rb:124(call site),:159(acquire_runningtransitions:pending -> :runningfirst),:187(@registry.lookupraises insidebuild_run_context),:191(klass.new(config:)raises for cached step instances).Failure mode
Runner#calltransitions the workflow to:runningbeforebuild_run_contextruns.build_run_contextcan raise for reachable, non-exotic reasons:UnknownStepTypeErrorfor a definition node whose type was never registered (create_workflowdoes not validate registry membership),StaleRevisionErroron corrupt storage, or a cached step's constructor raising on invalid config. The exception propagates out of#call, leaving the workflow in:runningwith zero events. Worse, it is unrecoverable:resumeallows:runningbut re-enters the samebuild_run_contextand raises identically, so the workflow can never reach a terminal state.Minimal trigger
Register only
:noop, store a definition withadd_node(:a, type: :typo), callrunner.call(id)→UnknownStepTypeError, workflow stuck:runningforever.Fix direction
Rescue
build_run_contextfailures inside#call, transition the workflow to:failed(with a diagnostic event) before re-raising, so the row never wedges in:running. Related:safe_call_step(runner.rb:438-453) gives the same constructor error a different behavior forcache_instances: false— see the companion low-severity issue.