Select and check downstream preflight targets

This commit is contained in:
2026-11-27 16:41:09 +00:00
parent 2db2554d1e
commit b9b154e59e
5 changed files with 165 additions and 1 deletions

View File

@@ -79,3 +79,28 @@ func buildInspectionTargets(cfg *config.Config, sessionID string, trim bool, key
}
return targets, nil
}
// executionDownstreamTargets selects checks only for projected work.
func executionDownstreamTargets(cfg *config.Config, sessionID string, projection *workProjection) (preflight.Targets, error) {
targets, err := executionInspectionTargets(cfg, sessionID, projection)
if err != nil {
return preflight.Targets{}, err
}
result := preflight.Targets{Scriptorium: targets}
for _, item := range projection.Stages {
if item.Name == "polish" && item.Decision.action == stageActionRun {
result.Polish = true
}
}
return result, nil
}
// validationDownstreamTargets selects checks for enabled functionality regardless of reuse.
func validationDownstreamTargets(cfg *config.Config, sessionID string) (preflight.Targets, error) {
targets, err := validationInspectionTargets(cfg, sessionID)
if err != nil {
return preflight.Targets{}, err
}
// Polish is a canonical pipeline stage and has no enable/disable setting.
return preflight.Targets{Polish: true, Scriptorium: targets}, nil
}