Terminalize handled invocation failures
This commit is contained in:
@@ -121,6 +121,15 @@ func (m *Manifest) MarkStageFailed(name string, at time.Time, message string) {
|
||||
m.UpdatedAt = at
|
||||
}
|
||||
|
||||
// RecordFailure records an invocation failure without changing session progress.
|
||||
func (m *Manifest) RecordFailure(at time.Time, message string) {
|
||||
if m == nil {
|
||||
return
|
||||
}
|
||||
m.LastError = &ErrorRecord{Message: strings.TrimSpace(message), At: timePtr(at)}
|
||||
m.UpdatedAt = at
|
||||
}
|
||||
|
||||
// MarkStageSkipped marks a stage as skipped and records the skip reason.
|
||||
func (m *Manifest) MarkStageSkipped(name string, at time.Time, reason string) {
|
||||
s := m.ensureStage(name, at)
|
||||
|
||||
@@ -21,6 +21,12 @@ type Store interface {
|
||||
Save(ctx context.Context, path string, m *Manifest) error
|
||||
}
|
||||
|
||||
// RunStore persists invocation-scoped run manifests.
|
||||
type RunStore interface {
|
||||
CreateRun(ctx context.Context, sessionID, campaign, runID string, force bool, requestedStages []string) (*RunManifest, error)
|
||||
SaveRun(ctx context.Context, path string, m *RunManifest) error
|
||||
}
|
||||
|
||||
// LocalStore stores manifests as JSON on the local filesystem.
|
||||
type LocalStore struct{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user