Relationships
#2433 workflow resume --from: a step moved or renamed since the run failed is skipped and the run reported succeeded, or crashes with 'Step run not found'
Opened by hammz · 9/23/2026· Shipped 9/24/2026
Problem
swamp workflow resume <wf> --from <step> --run <id> uses the current workflow YAML. If the step was moved to another job or renamed since the run failed, --from does not detect it. Depending on the edit, the run is reported succeeded without running the step, or the resume crashes and leaves the run in an inconsistent state.
Moved to another job, nothing in the new job depends on it: false success. The workflow has job build (compile → test) and job release (publish), where release depends on build. test fails. Move test into release and run resume --from test:
build │ completed
system │ Completed workflow moved succeededThe command exits 0 and no step runs. The run record says succeeded, with build.test: pending, release: skipped, and release.publish: skipped. In the repro, test would have failed again if it had run. A caller that checks the exit code or the run status sees a success that never happened.
Moved to another job, a step in the new job depends on it: crash. The same move, with publish depending on test in release: resume --from test fails with [FTL] error: Error: Step run not found: test and exits 1. The run is failed, but job build is succeeded with test: pending, and job release is stuck at running with publish: pending.
Renamed: crash. Rename the failed step b to b2 and run resume --from b2: Step run not found: b2, exit 1. The run stays failed with the dependents of b left pending. On the swamp-club#2409 branch, a later resume --run <id> then refuses because those steps are pending.
A removed step is handled: --from a step that is still in the run re-runs that step and its dependents, and the run completes.
Reproduced on main at c811f8ce and on the swamp-club#2409 branch, which does not change the --from code.
Cause
computeStepsToReset (src/domain/workflows/execution_service.ts) checks the --from step only against the current workflow. It then maps each template in the reset set to stored step records by name across all jobs, without checking that the record is in the job where the current workflow puts that step. Execution walks the current workflow's jobs and looks up each step's record in that job's stored run:
- A step with no record in that job throws
Step run not found. - A record left in a job the workflow no longer puts the step in is never executed, so it stays
pending.
The job and the run are then completed as succeeded even though a step is still pending.
The failed-run retry added by swamp-club#2409 refuses these shapes before changing anything (selectRetryTemplates: each entry template must be a step of the same job in the current workflow) and suggests starting a new run. --from has no equivalent check.
Fix approach
- Before the first change, check that every template in the
--fromreset set has a stored record in the job where the current workflow places it. If not, refuse with aUserErrorthat names the step and says to start a new run. Because the check runs before any mutation, the run staysfailedand unchanged. - As a backstop, do not complete a job or a run as
succeededwhile any of its steps is stillpending.
Reproduction (false success)
- Create workflow
moved: jobbuildwithcompile, thentest(depends oncompile, runs a command that exits 1); jobrelease(depends onbuild) withpublish. swamp workflow run moved:testfails. Note the run id.- Edit the YAML: remove
testfrombuildand add it toreleaseas an independent step next topublish. swamp workflow resume moved --from test --run <id>: exits 0,Completed workflow moved succeeded, no step runs.swamp workflow history get moved --json:status: succeeded,build.test: pending,release: skipped.
For the crash, give publish a dependsOn on test in step 3.
Related: swamp-club#2432 (the Step run not found crash prints as a fatal error with a stack trace).
Shipped
Click a lifecycle step above to view its details.
hammz commented 9/24/2026, 6:41:06 PM
Triage split: resuming a suspended run against a workflow edited during the approval window (added, moved or removed step) is now tracked in swamp-club#2498, with its own repro. That includes the case where deploy runs before the resume crashes. This issue stays scoped to resuming a failed run (--from and the #2409 retry). Triage also found that the retry path crashes when a step is added, and that --from on a renamed job resets the whole run before crashing with Job run not found. Both are covered here. E2E coverage is tracked in swamp-club/swamp-uat#431.
Sign in to post a ripple.