fix workspace output and cleanup uncertainty

This commit is contained in:
2026-08-11 04:46:48 +02:00
parent c7f7a6e1b0
commit 69cc47c13f
12 changed files with 358 additions and 91 deletions
@@ -654,6 +654,9 @@ func publishCandidateBytes(x *hostExport, result Result, path string, b []byte)
return nil
}
if err := safeio.WriteCanonicalExclusive(path, b, 0o600); err != nil {
if errors.Is(err, safeio.ErrIndeterminateFile) {
return errors.New("candidate output state is indeterminate; reconcile the destination and private stages before retrying")
}
return errors.New("unsafe output file")
}
return nil