feat(workflow): resume a parked run from a chosen step

Each finished stage records the run's step results; a retry may name a resume
point, and the next attempt skips the steps before it with their results
loaded. A run with a repository resumes only on its pushed branch. The canvas
offers Resume/Re-run from here on parked runs.
This commit is contained in:
sam committed 2026-10-05 13:06:30 +11:00
1 parent 317d3782fa
commit 2d2cf28b2d
37 files changed
+606 -88

No files matched your search

+11
View File
@@ -60,6 +60,17 @@ type StepFinish struct {
// TokensUsed is the usage the step itself accounted. Stages record none;
// the agent runtime records its own calls' usage.
TokensUsed int64
// Results is the run's step results as JSON after a stage the run moves
// past; nil otherwise. A resumed attempt starts from them.
Results []byte
}
// Resume is where a retried attempt starts: at stage From, with the results
// recorded after stage After, the one before it. After is empty when From is
// the first stage. An empty From runs the workflow from its first stage.
type Resume struct {
From string
After string
}
// StepExecution is one recorded step: ListSteps' read, the dashboard run
+5
View File
@@ -64,6 +64,11 @@ type Task struct {
// RetryMode is the worktree mode for the next dispatch; empty means
// RefreshOntoBase.
RetryMode string `json:"retry_mode"`
// ResumeFrom is the stage this attempt starts at; empty runs every stage.
// ResumeResults are the step results (JSON, by step id) the attempt starts
// with, so steps it skips still answer their references.
ResumeFrom string `json:"resume_from,omitempty"`
ResumeResults json.RawMessage `json:"resume_results,omitempty"`
// WatchCommentID is the poll backstop's high-water mark over forge
// review-comment IDs for this task (pr-review-remediation.md decision
// 2's persisted per-task cursor; the comment-watch design it was