Retain authoritative pipeline and campaign load results

This commit is contained in:
2026-11-20 04:17:29 +00:00
parent a3c58141a0
commit 16a4f7ee12
11 changed files with 187 additions and 35 deletions

View File

@@ -255,7 +255,7 @@ func MarshalEffectivePipeline(cfg *PipelineConfig) ([]byte, error) {
func effectivePipelineOwners(cfg *PipelineConfig) (map[string][]string, error) {
owners := make(map[string][]string)
if cfg == nil || cfg.resolution == nil {
if cfg.ConfigKitResult() == nil {
return owners, nil
}
paths, err := pipelineMetadataPaths(cfg)
@@ -263,13 +263,14 @@ func effectivePipelineOwners(cfg *PipelineConfig) (map[string][]string, error) {
return nil, err
}
pathsByID := pipelineSourcePaths(cfg)
metadata := cfg.ConfigKitResult().Metadata()
for _, value := range paths {
info, ok := cfg.resolution.configkitMetadata.Lookup(configkit.Keys(value.segments...))
info, ok := metadata.Lookup(configkit.Keys(value.segments...))
sources := []string{pipelineDefaultOwnershipSource}
if ok {
sources = ownershipSources(info.Origin, pathsByID)
if info.Origin.Layer == configkit.LayerResolution {
for _, change := range cfg.resolution.configkitMetadata.History(configkit.Keys(value.segments...)) {
for _, change := range metadata.History(configkit.Keys(value.segments...)) {
if change.Origin.Layer != configkit.LayerResolution {
continue
}