Reuse supplied completion in plans and runs
This commit is contained in:
@@ -9,11 +9,16 @@ import (
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/manifest"
|
||||
)
|
||||
|
||||
func validateBoundedPrerequisites(plan BoundedPlan, m *manifest.Manifest) error {
|
||||
func validateBoundedPrerequisites(plan BoundedPlan, m *manifest.Manifest, cfg *config.Config) error {
|
||||
if !plan.HasExplicitBounds() {
|
||||
return nil
|
||||
}
|
||||
coverage := suppliedCompletion(cfg, m)
|
||||
hasTranscript := coverage["transcribe"]
|
||||
for _, name := range plan.PrefixNames() {
|
||||
if coverage[name] || (hasTranscript && (name == "prepare" || name == "render" || name == "extract")) {
|
||||
continue
|
||||
}
|
||||
status := "absent"
|
||||
if m != nil && m.Stages != nil && m.Stages[name] != nil {
|
||||
stageStatus := m.Stages[name].Status
|
||||
@@ -58,5 +63,5 @@ func inspectBoundedPrerequisites(ctx context.Context, cfg *config.Config, plan B
|
||||
if !present {
|
||||
m = nil
|
||||
}
|
||||
return validateBoundedPrerequisites(plan, m)
|
||||
return validateBoundedPrerequisites(plan, m, cfg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user