Allow artifact-only continuation from imported products
This commit is contained in:
@@ -34,6 +34,9 @@ func PrepareReferences(ctx context.Context, env *Env, m *manifest.Manifest) (*St
|
||||
}
|
||||
|
||||
func prepareNeedsAudio(env *Env, m *manifest.Manifest) bool {
|
||||
if env != nil && env.ReferenceOnly {
|
||||
return false
|
||||
}
|
||||
if env == nil || env.Config == nil || env.Config.Session == nil || env.ArtifactStore == nil || m == nil || env.Force {
|
||||
return true
|
||||
}
|
||||
@@ -241,7 +244,7 @@ func prepareInputs(ctx context.Context, env *Env, m *manifest.Manifest, acquireA
|
||||
}
|
||||
}
|
||||
|
||||
previousRequirements, err := collectPreparePreviousRequirements(env.Config, env.EffectiveArtifacts)
|
||||
previousRequirements, err := preparePreviousRequirements(env)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("prepare: resolve previous artifact requirements: %w", err)
|
||||
}
|
||||
@@ -441,6 +444,13 @@ func countAudioInputs(inputs []manifest.InputRecord) int {
|
||||
return count
|
||||
}
|
||||
|
||||
func preparePreviousRequirements(env *Env) ([]artifacts.PreviousArtifactRequirement, error) {
|
||||
if env.PreparePreviousRequirements != nil {
|
||||
return env.PreparePreviousRequirements, nil
|
||||
}
|
||||
return collectPreparePreviousRequirements(env.Config, env.EffectiveArtifacts)
|
||||
}
|
||||
|
||||
func collectPreparePreviousRequirements(cfg *config.Config, effective artifacts.EffectiveArtifactSet) ([]artifacts.PreviousArtifactRequirement, error) {
|
||||
if cfg == nil || cfg.Pipeline == nil || cfg.Pipeline.Scriptorium == nil {
|
||||
return nil, nil
|
||||
|
||||
@@ -28,6 +28,7 @@ func ValidateReferenceSources(ctx context.Context, env *Env, m *manifest.Manifes
|
||||
}
|
||||
copyEnv := *env
|
||||
copyEnv.Force = false
|
||||
copyEnv.ReferenceOnly = true
|
||||
_, err := currentPrepareSourceInputs(ctx, ©Env, m)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ func buildPrepareSemanticConfig(env *Env) (prepareSemanticConfig, error) {
|
||||
return prepareSemanticConfig{}, fmt.Errorf("prepare semantic configuration requires resolved pipeline and session config")
|
||||
}
|
||||
cfg := env.Config
|
||||
requirements, err := collectPreparePreviousRequirements(cfg, env.EffectiveArtifacts)
|
||||
requirements, err := preparePreviousRequirements(env)
|
||||
if err != nil {
|
||||
return prepareSemanticConfig{}, fmt.Errorf("resolve previous artifact requirements: %w", err)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ type Env struct {
|
||||
ManifestStore manifest.Store
|
||||
Reporter logging.Reporter
|
||||
Force bool
|
||||
ReferenceOnly bool // Preparation checks and materialization exclude audio.
|
||||
// Nil uses the selection's structural prerequisite closure. Bounded reference
|
||||
// preparation supplies the history needed by its actual generation plan.
|
||||
PreparePreviousRequirements []artifacts.PreviousArtifactRequirement
|
||||
|
||||
WhisperX whisperx.Client
|
||||
Seriatim seriatim.Runner
|
||||
|
||||
Reference in New Issue
Block a user