Show progress for each preflight profile

This commit is contained in:
2026-11-27 04:04:30 +00:00
parent 2eae2a4af2
commit 7ba1846e63
5 changed files with 35 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ func classifyStructuredOutput(report *pk.SmokeTestReport, err error) Verificatio
}
// VerifyStructuredOutput checks selected profiles sequentially and retains native evidence.
func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []string) ([]ProfileVerification, error) {
func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []string, progress func(string)) ([]ProfileVerification, error) {
var results []ProfileVerification
var failures []error
for _, id := range profiles {
@@ -69,6 +69,9 @@ func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []
failures = append(failures, err)
break
}
if progress != nil {
progress(id)
}
report, err := engine.SmokeTest(ctx, pk.SmokeTestRequest{Kind: pk.SmokeTestStructuredOutput, ProfileID: id})
status := classifyStructuredOutput(report, err)
results = append(results, ProfileVerification{ProfileID: id, Status: status, Report: report, Err: err})