Allow artifact-only continuation from imported products
This commit is contained in:
@@ -14,11 +14,20 @@ func validateBoundedPrerequisites(plan BoundedPlan, m *manifest.Manifest, cfg *c
|
||||
return nil
|
||||
}
|
||||
coverage := suppliedCompletion(cfg, m)
|
||||
hasTranscript := coverage["transcribe"]
|
||||
supplied := hasSuppliedBaseline(m)
|
||||
for _, name := range plan.PrefixNames() {
|
||||
if coverage[name] || (hasTranscript && (name == "prepare" || name == "render" || name == "extract")) {
|
||||
if coverage[name] {
|
||||
continue
|
||||
}
|
||||
if supplied {
|
||||
// Imported products replace producer history as the starting point.
|
||||
// Selected consumers validate their actual inputs. Publication and
|
||||
// post-publication actions retain their own execution prerequisites.
|
||||
switch name {
|
||||
case "prepare", "transcribe", "merge", "polish", "normalize", "trim", "render", "extract", "analyze":
|
||||
continue
|
||||
}
|
||||
}
|
||||
status := "absent"
|
||||
if m != nil && m.Stages != nil && m.Stages[name] != nil {
|
||||
stageStatus := m.Stages[name].Status
|
||||
|
||||
@@ -119,9 +119,13 @@ func buildSessionPlan(ctx context.Context, cfg *config.Config, input *executionI
|
||||
return nil, err
|
||||
}
|
||||
report := &sessionPlanReport{Campaign: config.CampaignID(cfg.Campaign), SessionID: cfg.Session.SessionID, Stages: []plannedStage{}, Publication: []plannedPublication{}}
|
||||
if m != nil && !input.plan.Contains("prepare") && suppliedCompletion(cfg, m)["transcribe"] && projectionNeedsReferences(projection) {
|
||||
if m != nil && !input.plan.Contains("prepare") && hasSuppliedBaseline(m) && projectionNeedsReferences(projection) {
|
||||
report.ReferencePreparation = &preparationAssessment{Outcome: "planned", Reason: "reference-only preparation before downstream work"}
|
||||
current, checkErr := referencePreparationCurrent(ctx, cfg, m, store, effective)
|
||||
requirements, requirementErr := referenceHistoryRequirements(cfg, effective, projection)
|
||||
if requirementErr != nil {
|
||||
return report, requirementErr
|
||||
}
|
||||
current, checkErr := referencePreparationCurrent(ctx, cfg, m, store, effective, requirements)
|
||||
if checkErr != nil {
|
||||
return report, checkErr
|
||||
}
|
||||
@@ -133,10 +137,6 @@ func buildSessionPlan(ctx context.Context, cfg *config.Config, input *executionI
|
||||
report.ReferencePreparation.Outcome = "blocked"
|
||||
report.ReferencePreparation.Reason = validationErr.Error()
|
||||
}
|
||||
requirements, requirementErr := artifacts.CollectPreviousArtifactRequirements(configuredScriptoriumArtifacts(cfg), effective)
|
||||
if requirementErr != nil {
|
||||
return report, requirementErr
|
||||
}
|
||||
if strings.TrimSpace(cfg.Session.PreviousSessionID) == "" {
|
||||
for _, requirement := range requirements {
|
||||
if requirement.Required {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
// unavailablePlannedBuiltIns reports selected real inputs that neither exist
|
||||
// nor have a producer scheduled by this projection.
|
||||
func unavailablePlannedBuiltIns(cfg *config.Config, m *manifest.Manifest, projection *workProjection) []string {
|
||||
if cfg == nil || cfg.Pipeline == nil || cfg.Session == nil || m == nil || !suppliedCompletion(cfg, m)["transcribe"] {
|
||||
if cfg == nil || cfg.Pipeline == nil || cfg.Session == nil || !hasSuppliedBaseline(m) {
|
||||
return nil
|
||||
}
|
||||
paths := artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root).SessionPathsFor(cfg.Session.Campaign, cfg.Session.SessionID)
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
)
|
||||
|
||||
// prepareBoundedReferences makes current references available before downstream
|
||||
// checks when a supplied transcript replaces the normal preparation prefix.
|
||||
// checks when supplied products replace the normal preparation prefix.
|
||||
func prepareBoundedReferences(runtime *invocationRuntime) error {
|
||||
if runtime.plan.Contains("prepare") || !suppliedCompletion(runtime.cfg, runtime.manifest)["transcribe"] {
|
||||
if runtime.plan.Contains("prepare") || !hasSuppliedBaseline(runtime.manifest) {
|
||||
return nil
|
||||
}
|
||||
if !stagesContainAny(runtime.stages, "polish", "trim", "extract", "analyze") {
|
||||
@@ -34,17 +34,19 @@ func prepareBoundedReferences(runtime *invocationRuntime) error {
|
||||
}
|
||||
env := *runtime.env
|
||||
env.Force = false
|
||||
current, err := referencePreparationCurrent(runtime.ctx, runtime.cfg, runtime.manifest, runtime.artifactStore, runtime.effectiveArtifacts)
|
||||
env.ReferenceOnly = true
|
||||
requirements, err := referenceHistoryRequirements(runtime.cfg, runtime.effectiveArtifacts, projection)
|
||||
if err != nil {
|
||||
return fmt.Errorf("reference preparation requirements: %w", err)
|
||||
}
|
||||
env.PreparePreviousRequirements = requirements
|
||||
current, err := referencePreparationCurrent(runtime.ctx, runtime.cfg, runtime.manifest, runtime.artifactStore, runtime.effectiveArtifacts, requirements)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if current {
|
||||
return nil
|
||||
}
|
||||
requirements, err := artifacts.CollectPreviousArtifactRequirements(configuredScriptoriumArtifacts(runtime.cfg), runtime.effectiveArtifacts)
|
||||
if err != nil {
|
||||
return fmt.Errorf("reference preparation requirements: %w", err)
|
||||
}
|
||||
if len(requirements) > 0 && strings.TrimSpace(runtime.cfg.Session.PreviousSessionID) != "" && runtime.env.ObjectStore == nil {
|
||||
runtime.env.ObjectStore, err = runtime.dependencies.newObjectStore(runtime.ctx, runtime.cfg)
|
||||
if err != nil {
|
||||
@@ -52,7 +54,9 @@ func prepareBoundedReferences(runtime *invocationRuntime) error {
|
||||
}
|
||||
}
|
||||
priorInputs := append([]manifest.InputRecord(nil), runtime.manifest.Inputs...)
|
||||
result, err := stage.PrepareReferences(runtime.ctx, runtime.env, runtime.manifest)
|
||||
// Preserve any lazily composed history store on the reference environment.
|
||||
env.ObjectStore = runtime.env.ObjectStore
|
||||
result, err := stage.PrepareReferences(runtime.ctx, &env, runtime.manifest)
|
||||
if err != nil {
|
||||
return fmt.Errorf("prepare references: %w", err)
|
||||
}
|
||||
@@ -75,7 +79,7 @@ func prepareBoundedReferences(runtime *invocationRuntime) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func referencePreparationCurrent(ctx context.Context, cfg *config.Config, m *manifest.Manifest, store artifacts.Store, effective artifacts.EffectiveArtifactSet) (bool, error) {
|
||||
func referencePreparationCurrent(ctx context.Context, cfg *config.Config, m *manifest.Manifest, store artifacts.Store, effective artifacts.EffectiveArtifactSet, requirements []artifacts.PreviousArtifactRequirement) (bool, error) {
|
||||
if recordedStageStatus(m, "prepare") != manifest.StatusSucceeded {
|
||||
return false, nil
|
||||
}
|
||||
@@ -83,7 +87,7 @@ func referencePreparationCurrent(ctx context.Context, cfg *config.Config, m *man
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
env := &stage.Env{Config: cfg, ArtifactStore: store, EffectiveArtifacts: effective}
|
||||
env := &stage.Env{Config: cfg, ArtifactStore: store, EffectiveArtifacts: effective, ReferenceOnly: true, PreparePreviousRequirements: requirements}
|
||||
semantic, err := currentStageSemanticConfig(prepare, env)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@@ -95,6 +99,28 @@ func referencePreparationCurrent(ctx context.Context, cfg *config.Config, m *man
|
||||
return validation != nil && validation.Resumable, nil
|
||||
}
|
||||
|
||||
func referenceHistoryRequirements(cfg *config.Config, effective artifacts.EffectiveArtifactSet, projection *workProjection) ([]artifacts.PreviousArtifactRequirement, error) {
|
||||
var keys []string
|
||||
for _, item := range projection.Stages {
|
||||
if item.Name != "analyze" || item.Decision.action != stageActionRun {
|
||||
continue
|
||||
}
|
||||
if item.Analysis == nil {
|
||||
return artifacts.CollectPreviousArtifactRequirements(configuredScriptoriumArtifacts(cfg), effective)
|
||||
}
|
||||
for _, work := range item.Analysis.ExecutionOrder {
|
||||
keys = append(keys, work.Key)
|
||||
}
|
||||
}
|
||||
requirements, err := artifacts.PreviousArtifactRequirementsForKeys(configuredScriptoriumArtifacts(cfg), keys)
|
||||
// An explicit empty set distinguishes no planned history from the ordinary
|
||||
// preparation default, which collects the full structural target closure.
|
||||
if requirements == nil {
|
||||
requirements = []artifacts.PreviousArtifactRequirement{}
|
||||
}
|
||||
return requirements, err
|
||||
}
|
||||
|
||||
func projectionNeedsReferences(projection *workProjection) bool {
|
||||
needsReferences := false
|
||||
for _, item := range projection.Stages {
|
||||
|
||||
@@ -83,6 +83,160 @@ func TestBoundedAnalysisPreparesReferencesForSuppliedTranscript(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBoundedAnalysisConsumesSuppliedProductsWithoutTranscripts(t *testing.T) {
|
||||
for _, extraction := range []bool{false, true} {
|
||||
name := "configured artifact"
|
||||
if extraction {
|
||||
name = "extraction product"
|
||||
}
|
||||
t.Run(name, func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
pipeline, campaign, session := writeValidConfigFilesWithScriptoriumArtifacts(t, t.TempDir())
|
||||
cfg, err := config.LoadWithSessionOptions(pipeline, campaign, session, config.SessionLoadOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg.Session.Inputs.AudioDir = ""
|
||||
cfg.Session.Inputs.AudioFiles = nil
|
||||
cfg.Session.Inputs.AudioS3 = nil
|
||||
source, relative, body := artifacts.ConfiguredArtifactSourceID("parent"), "artifacts/parent.md", "supplied parent\n"
|
||||
cfg.ArtifactCatalog.Artifacts = map[string]config.ScriptoriumArtifactConfig{
|
||||
"parent": {PromptID: "parent", OutputPath: relative, Inputs: map[string]config.ScriptoriumInputConfig{
|
||||
"old_history": {Source: artifactpolicy.PreviousSessionSourceID("parent"), Required: true},
|
||||
}},
|
||||
}
|
||||
if extraction {
|
||||
source, relative, body = artifacts.ExtractionArtifactSourceID("entities"), "artifacts/entities.json", `{"entities":[]}`
|
||||
cfg.Pipeline.Notarius = &config.NotariusConfig{Enabled: true, Outputs: map[string]config.NotariusOutputConfig{"entities": {LaneID: "entities"}}}
|
||||
}
|
||||
cfg.ArtifactCatalog.Artifacts["child"] = config.ScriptoriumArtifactConfig{
|
||||
Enabled: true, PromptID: "child", OutputPath: "artifacts/child.md",
|
||||
Inputs: map[string]config.ScriptoriumInputConfig{
|
||||
"parent": {Source: source, Required: true},
|
||||
"party": {Source: artifactpolicy.SourceInputParty, Required: true},
|
||||
},
|
||||
}
|
||||
if !extraction {
|
||||
child := cfg.ArtifactCatalog.Artifacts["child"]
|
||||
child.DependsOn = []string{"parent"}
|
||||
cfg.ArtifactCatalog.Artifacts["child"] = child
|
||||
}
|
||||
paths := artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root).SessionPathsFor(cfg.Session.Campaign, cfg.Session.SessionID)
|
||||
path := filepath.Join(paths.Root, relative)
|
||||
mustWriteTestFile(t, path, body)
|
||||
sum, err := artifacts.SHA256File(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
m := manifest.New(cfg.Session.SessionID, time.Now().UTC())
|
||||
m.Campaign = cfg.Session.Campaign
|
||||
m.SuppliedProducts = &manifest.SuppliedProductCollection{Version: manifest.SuppliedProductVersion, Products: map[string]manifest.SuppliedProduct{
|
||||
source: {Path: relative, Checksum: sum, Size: int64(len(body))},
|
||||
}}
|
||||
saveBoundedManifest(t, cfg, m)
|
||||
plan := mustBoundedPlan(t, "analyze", "analyze")
|
||||
effective, err := resolveEffectiveArtifacts(cfg, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
preview, err := buildSessionPlan(ctx, cfg, &executionInput{plan: plan}, nil, effective, commandDependencies{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(preview.InputIssues) != 0 || preview.ReferencePreparation == nil || preview.ReferencePreparation.Outcome != "planned" {
|
||||
t.Fatalf("preview %+v", preview)
|
||||
}
|
||||
if len(preview.Stages) != 1 || len(preview.Stages[0].Analysis.Execute) != 1 || preview.Stages[0].Analysis.Execute[0].Key != "child" {
|
||||
t.Fatalf("analysis preview %+v", preview.Stages)
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(paths.InputsDir, "party.yml")); !os.IsNotExist(err) {
|
||||
t.Fatalf("plan wrote references: %v", err)
|
||||
}
|
||||
runner := &scriptorium.FakeRunner{}
|
||||
result, err := executePlan(ctx, cfg, plan, RunOptions{Env: &Env{Scriptorium: runner}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(runner.RunRequests) != 1 || runner.RunRequests[0].InputPaths["parent"] != path || runner.RunRequests[0].InputPaths["party"] != filepath.Join(paths.InputsDir, "party.yml") {
|
||||
t.Fatalf("requests %+v", runner.RunRequests)
|
||||
}
|
||||
saved, err := (&manifest.LocalStore{}).Load(ctx, result.ManifestPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if saved.Stages["prepare"].Metadata["audio_prepared"] != false || saved.Stages["transcribe"] != nil || saved.Stages["extract"] != nil {
|
||||
t.Fatalf("fabricated producer evidence: %+v", saved.Stages)
|
||||
}
|
||||
if current, err := referencePreparationCurrent(ctx, cfg, saved, artifacts.NewLocalStore(cfg.Pipeline.Workspace.Root), effective, []artifacts.PreviousArtifactRequirement{}); err != nil || !current {
|
||||
t.Fatalf("reference-only reuse = %v, %v", current, err)
|
||||
}
|
||||
// Available imported inputs do not substitute for another required file.
|
||||
child := cfg.ArtifactCatalog.Artifacts["child"]
|
||||
child.Inputs["missing"] = config.ScriptoriumInputConfig{Source: artifacts.ArtifactTranscriptFinalTrimmed, Required: true}
|
||||
cfg.ArtifactCatalog.Artifacts["child"] = child
|
||||
input := &executionInput{plan: plan}
|
||||
input.Force.Value = true
|
||||
preview, err = buildSessionPlan(ctx, cfg, input, nil, effective, commandDependencies{})
|
||||
if err != nil || preview == nil || !strings.Contains(strings.Join(preview.InputIssues, " "), artifacts.ArtifactTranscriptFinalTrimmed) {
|
||||
t.Fatalf("missing actual input preview %+v, %v", preview, err)
|
||||
}
|
||||
if _, err := executePlan(ctx, cfg, plan, RunOptions{Force: true, Env: &Env{Scriptorium: runner}}); err == nil || !strings.Contains(err.Error(), artifacts.ArtifactTranscriptFinalTrimmed) {
|
||||
t.Fatalf("missing actual input error = %v", err)
|
||||
}
|
||||
if len(runner.RunRequests) != 1 {
|
||||
t.Fatal("generated output despite missing required input")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestBoundedAnalysisContinuesAfterLastSuppliedProductIsReplaced(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
pipeline, campaign, session := writeValidConfigFilesWithScriptoriumArtifacts(t, t.TempDir())
|
||||
cfg, err := config.LoadWithSessionOptions(pipeline, campaign, session, config.SessionLoadOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg.Session.Inputs.AudioDir = ""
|
||||
cfg.ArtifactCatalog.Artifacts = map[string]config.ScriptoriumArtifactConfig{
|
||||
"session_recap": {Enabled: true, PromptID: "recap", OutputPath: "artifacts/session_recap.md", Inputs: map[string]config.ScriptoriumInputConfig{
|
||||
"party": {Source: artifactpolicy.SourceInputParty, Required: true},
|
||||
}},
|
||||
}
|
||||
remote := &storage.FakeBackend{}
|
||||
seedCommittedRestoreSnapshot(t, cfg, remote, "20260519T010203Z-a1b2c3d4", map[string][]byte{"artifacts/session_recap.md": []byte("supplied recap\n")})
|
||||
if _, err := restoreSessionState(ctx, cfg, RestorePlanOptions{}, normalizeCommandDependencies(restoreCommandDependencies(remote))); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
plan := mustBoundedPlan(t, "analyze", "analyze")
|
||||
runner := &scriptorium.FakeRunner{}
|
||||
result, err := executePlan(ctx, cfg, plan, RunOptions{Force: true, Env: &Env{Scriptorium: runner}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
saved, err := (&manifest.LocalStore{}).Load(ctx, result.ManifestPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(saved.SuppliedProducts.Products) != 0 || saved.Stages["transcribe"] != nil {
|
||||
t.Fatalf("replacement baseline %+v", saved)
|
||||
}
|
||||
effective, err := resolveEffectiveArtifacts(cfg, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
preview, err := buildSessionPlan(ctx, cfg, &executionInput{plan: plan}, nil, effective, commandDependencies{})
|
||||
if err != nil || preview == nil || len(preview.InputIssues) != 0 || len(preview.Stages[0].Analysis.Execute) != 0 {
|
||||
t.Fatalf("local checkpoint preview %+v, %v", preview, err)
|
||||
}
|
||||
if _, err := executePlan(ctx, cfg, plan, RunOptions{Env: &Env{Scriptorium: runner}}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(runner.RunRequests) != 1 {
|
||||
t.Fatalf("ordinary continuation regenerated a local checkpoint: %+v", runner.RunRequests)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFullRunWithSuppliedTranscriptPreparesAndRendersSelectedVariant(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
pipeline, campaign, session := writeValidConfigFilesWithScriptoriumArtifacts(t, root)
|
||||
|
||||
@@ -42,6 +42,13 @@ func suppliedCompletion(cfg *config.Config, m *manifest.Manifest) map[string]boo
|
||||
return covered
|
||||
}
|
||||
|
||||
// hasSuppliedBaseline identifies an import context, including after its supplied
|
||||
// products become local checkpoints. It grants no product availability or stage
|
||||
// completion: selected consumers still resolve and validate their actual inputs.
|
||||
func hasSuppliedBaseline(m *manifest.Manifest) bool {
|
||||
return m != nil && m.SuppliedProducts != nil && manifest.ValidateSuppliedProducts(m.SuppliedProducts) == nil
|
||||
}
|
||||
|
||||
// retireSuppliedForAttempt prevents older supplied completion from returning
|
||||
// after a selected producer begins replacement work.
|
||||
func retireSuppliedForAttempt(cfg *config.Config, m *manifest.Manifest, name string) {
|
||||
|
||||
@@ -30,11 +30,23 @@ func CollectPreviousArtifactRequirements(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sort.Strings(artifactNames)
|
||||
return PreviousArtifactRequirementsForKeys(artifactsCfg, artifactNames)
|
||||
}
|
||||
|
||||
// PreviousArtifactRequirementsForKeys collects history for an already planned
|
||||
// set of generation work. It does not expand historical dependencies of reused
|
||||
// products. Structural prerequisite collection uses the wrapper above.
|
||||
func PreviousArtifactRequirementsForKeys(
|
||||
artifactsCfg map[string]config.ScriptoriumArtifactConfig,
|
||||
artifactNames []string,
|
||||
) ([]PreviousArtifactRequirement, error) {
|
||||
byName := map[string]PreviousArtifactRequirement{}
|
||||
|
||||
for _, artifactName := range artifactNames {
|
||||
artifactCfg := artifactsCfg[artifactName]
|
||||
artifactCfg, ok := artifactsCfg[artifactName]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("analysis artifact %q is not configured", artifactName)
|
||||
}
|
||||
|
||||
inputNames := sortedScriptoriumInputKeys(artifactCfg.Inputs)
|
||||
for _, inputName := range inputNames {
|
||||
|
||||
@@ -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