fix: recover run runtime state and logs

This commit is contained in:
npc0-hue
2026-08-07 12:01:26 +08:00
parent 3818fa0344
commit b789925ae5
23 changed files with 297 additions and 78 deletions
+6
View File
@@ -69,6 +69,12 @@ func ValidateRunLifecycleReport(report domain.RunLifecycleReport) error {
violations = appendProgressViolations(violations, report.Progress)
violations = appendMessageLength(violations, "message", report.Message)
violations = appendMessageLength(violations, "errorCode", report.ErrorCode)
if report.ManagedProcessID != "" && report.ObservationSeq == 0 {
violations = append(violations, "observationSeq is required with managedProcessId")
}
if report.ObservationSeq > 0 && report.ManagedProcessID == "" {
violations = append(violations, "managedProcessId is required with observationSeq")
}
if len([]byte(report.ExecutionResult.Content)) > maxJobChannelMessageLength*256 {
violations = append(violations, "executionResult.content is too large")
}