batchstore: set result to status message on failure

On failure, result is empty and only status carries the error.
Callers (subagent_spawn, oq) now always have a useful value in
result regardless of success or failure.
This commit is contained in:
Levi Neely 2026-04-16 20:54:27 +02:00
parent 181e629009
commit e277937619
1 changed files with 1 additions and 0 deletions

View File

@ -224,6 +224,7 @@ func (s *BatchStore) runJob(ctx context.Context, job *batchJob) {
} else {
job.status = "failed: " + err.Error()
}
job.result = job.status
plog.Info("batch job %s failed: %v", job.id, err)
return
}