Share prompt instructions and simplify validation helpers
This commit is contained in:
@@ -92,3 +92,16 @@ const (
|
||||
WorkCompleted WorkState = "completed"
|
||||
WorkInterrupted WorkState = "interrupted"
|
||||
)
|
||||
|
||||
// ExecutionRecoveries classifies execution counts; callers decide whether their
|
||||
// operation succeeded before recording these reasons.
|
||||
func ExecutionRecoveries(counts ExecutionCounts) []RecoveryReason {
|
||||
var reasons []RecoveryReason
|
||||
if counts.StructuralRepairs > 0 {
|
||||
reasons = append(reasons, RecoveryOutputRepaired)
|
||||
}
|
||||
if counts.TransientRetries > 0 {
|
||||
reasons = append(reasons, RecoveryServiceRecovered)
|
||||
}
|
||||
return reasons
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user