Keep source provenance out of prepare reuse decisions

This commit is contained in:
2026-11-20 13:40:55 +00:00
parent 32ff928786
commit 846f8470dc
4 changed files with 104 additions and 10 deletions

View File

@@ -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 {

View File

@@ -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"