Keep source provenance out of prepare reuse decisions
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
prepareSemanticConfigVersion = 2
|
||||
prepareSemanticConfigVersion = 3
|
||||
transcribeSemanticConfigVersion = 1
|
||||
mergeSemanticConfigVersion = 1
|
||||
)
|
||||
@@ -36,7 +36,6 @@ type prepareAudioSelection struct {
|
||||
|
||||
type prepareStableInputSelection struct {
|
||||
Kind string `json:"kind"`
|
||||
Source string `json:"source"`
|
||||
Present bool `json:"present"`
|
||||
}
|
||||
|
||||
@@ -160,15 +159,12 @@ func prepareStableInputSemantics(cfg *config.Config) []prepareStableInputSelecti
|
||||
}
|
||||
|
||||
func prepareStableInput(kind string, resolved config.ResolvedInputFile, fallback string) prepareStableInputSelection {
|
||||
source := strings.TrimSpace(resolved.Source)
|
||||
if source == "" {
|
||||
source = "session_config"
|
||||
}
|
||||
path := resolved.Path
|
||||
if strings.TrimSpace(path) == "" {
|
||||
path = fallback
|
||||
}
|
||||
return prepareStableInputSelection{Kind: kind, Source: source, Present: strings.TrimSpace(path) != ""}
|
||||
// Source ownership remains provenance; resume validates the selected payloads.
|
||||
return prepareStableInputSelection{Kind: kind, Present: strings.TrimSpace(path) != ""}
|
||||
}
|
||||
|
||||
func cloneFloat64(value *float64) *float64 {
|
||||
|
||||
@@ -23,9 +23,6 @@ func TestPrepareSemanticConfigSensitivity(t *testing.T) {
|
||||
{name: "previous session", mutate: func(env *Env) {
|
||||
env.Config.Session.PreviousSessionID = "2026-04-26"
|
||||
}},
|
||||
{name: "stable input owner", mutate: func(env *Env) {
|
||||
env.Config.StableInputs.PartyFile.Source = "campaign_config"
|
||||
}},
|
||||
})
|
||||
|
||||
assertSemanticFingerprintUnchanged(t, prepareStage{}, initialSemanticEnv(), []struct {
|
||||
@@ -37,6 +34,10 @@ func TestPrepareSemanticConfigSensitivity(t *testing.T) {
|
||||
env.Config.Pipeline.Spool.Root = "/different/spool"
|
||||
env.Config.Pipeline.Cache.Root = "/different/cache"
|
||||
}},
|
||||
{name: "stable input owner", mutate: func(env *Env) {
|
||||
env.Config.StableInputs.PartyFile.Source = "party_file"
|
||||
env.Config.StableInputs.SpeakersFile.Source = "campaign_config"
|
||||
}},
|
||||
{name: "absolute stable source path", mutate: func(env *Env) {
|
||||
env.Config.StableInputs.PartyFile.Path = "/relocated/party.yml"
|
||||
env.Config.StableInputs.PartyFile.ConfigPath = "/relocated/campaign.yml"
|
||||
|
||||
Reference in New Issue
Block a user