runner: keep export handoffs nonterminal through recovery

This commit is contained in:
2026-10-20 21:19:26 +01:00
parent ca78b24f47
commit ec3eda9e05
28 changed files with 370 additions and 82 deletions
+14 -12
View File
@@ -37,18 +37,20 @@ type RunEventFrame struct {
Workspace string `json:"workspace,omitempty"`
// PipelineID, Name, Title and Version identify the run's pipeline and its
// operator-facing title, so a new run's row can be built without a fetch.
PipelineID int64 `json:"pipeline_id,omitempty"`
Name string `json:"name,omitempty"`
Title string `json:"title,omitempty"`
Version int `json:"version,omitempty"`
Status string `json:"status,omitempty"`
CancelRequested bool `json:"cancel_requested,omitempty"`
CleanupUnconfirmed bool `json:"cleanup_unconfirmed,omitempty"`
Outcome string `json:"outcome,omitempty"`
CurrentStage string `json:"current_stage,omitempty"`
CompletedSteps int `json:"completed_steps,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
FinishedAt string `json:"finished_at,omitempty"`
PipelineID int64 `json:"pipeline_id,omitempty"`
Name string `json:"name,omitempty"`
Title string `json:"title,omitempty"`
Version int `json:"version,omitempty"`
Status string `json:"status,omitempty"`
// On a lifecycle frame, zero/absence clears a prior export wait.
ExportPendingSequence int `json:"export_pending_sequence,omitempty"`
CancelRequested bool `json:"cancel_requested,omitempty"`
CleanupUnconfirmed bool `json:"cleanup_unconfirmed,omitempty"`
Outcome string `json:"outcome,omitempty"`
CurrentStage string `json:"current_stage,omitempty"`
CompletedSteps int `json:"completed_steps,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
FinishedAt string `json:"finished_at,omitempty"`
// Artifacts is the number of files recorded for the referenced step, so a
// client can surface artifact capture without reading the step.
Artifacts int `json:"artifacts,omitempty"`
+18 -15
View File
@@ -142,21 +142,24 @@ type RunSummary struct {
// Title is the operator-facing, bounded single-line description of what the
// run is for, generated from its prompt. It is never empty for a new run;
// historical rows predating the title column may omit it.
Title string `json:"title,omitempty"`
Version int `json:"version"`
ContentHash string `json:"content_hash"`
Status string `json:"status"`
CancelRequested bool `json:"cancel_requested,omitempty"`
CleanupUnconfirmed bool `json:"cleanup_unconfirmed,omitempty"`
Executing bool `json:"executing"`
Outcome string `json:"outcome"`
CurrentStage string `json:"current_stage"`
Workspace string `json:"workspace,omitempty"`
CreatedAt string `json:"created_at"`
FinishedAt string `json:"finished_at"`
Diagnostic string `json:"diagnostic"`
ResultPreview string `json:"result_preview,omitempty"`
CompletedSteps int `json:"completed_steps"`
Title string `json:"title,omitempty"`
Version int `json:"version"`
ContentHash string `json:"content_hash"`
Status string `json:"status"`
// ExportPendingSequence distinguishes a quiescent export handoff from a
// human decision while Status is waiting. It never implies agent execution.
ExportPendingSequence int `json:"export_pending_sequence,omitempty"`
CancelRequested bool `json:"cancel_requested,omitempty"`
CleanupUnconfirmed bool `json:"cleanup_unconfirmed,omitempty"`
Executing bool `json:"executing"`
Outcome string `json:"outcome"`
CurrentStage string `json:"current_stage"`
Workspace string `json:"workspace,omitempty"`
CreatedAt string `json:"created_at"`
FinishedAt string `json:"finished_at"`
Diagnostic string `json:"diagnostic"`
ResultPreview string `json:"result_preview,omitempty"`
CompletedSteps int `json:"completed_steps"`
// Model and StageModels are the launch-time overrides this run records so it
// stays reproducible: Model covers every model stage and StageModels overrides
// individual stages by key. They are empty for a run that used the pinned