Preserve empty smoke error messages in aggregate reports

This commit is contained in:
2026-10-18 13:28:29 +00:00
parent 0fe77baa29
commit 1d0085450a
4 changed files with 25 additions and 10 deletions

View File

@@ -101,7 +101,7 @@ type smokeAggregateDTO struct {
type smokeResultDTO struct {
Kind promptkit.SmokeTestKind `yaml:"kind"`
Report *smokeReportDTO `yaml:"report"`
Error string `yaml:"error,omitempty"`
Error *string `yaml:"error,omitempty"`
}
type smokeResult struct {
@@ -122,7 +122,8 @@ func encodeSmokeResults(results []smokeResult) ([]byte, error) {
Report: smokeReportFromNative(result.Report),
}
if result.Err != nil {
entries[index].Error = result.Err.Error()
message := result.Err.Error()
entries[index].Error = &message
}
}
return encodePromptYAMLBytes(smokeAggregateDTO{Tests: entries})