Use main for the main provenance layer

This commit is contained in:
2026-10-27 15:15:39 +00:00
parent 9833ca3aa3
commit 1ce147c9f6
51 changed files with 120 additions and 106 deletions

View File

@@ -29,7 +29,7 @@ func TestNestedCLIOverridePreservesRetainedInputPresence(t *testing.T) {
definition := Definition[config]{Resolve: func(value *config, resolution *Resolution) error {
for _, key := range []string{"count", "zero", "enabled"} {
info, ok := resolution.InputInfo(Keys("settings", "nested", key))
if !ok || !info.Explicit || info.Origin.Layer != LayerBase {
if !ok || !info.Explicit || info.Origin.Layer != LayerMain {
t.Errorf("retained %s input info = %#v, %v", key, info, ok)
}
}
@@ -54,7 +54,7 @@ func TestNestedCLIOverridePreservesRetainedInputPresence(t *testing.T) {
}
for _, key := range []string{"count", "zero", "enabled"} {
info, ok := result.Metadata().Lookup(Keys("settings", "nested", key))
if !ok || !info.Explicit || info.Origin.Layer != LayerBase || len(info.Origin.Locations) != 1 || info.Origin.Locations[0].SourceID != "source-1" {
if !ok || !info.Explicit || info.Origin.Layer != LayerMain || len(info.Origin.Locations) != 1 || info.Origin.Locations[0].SourceID != "source-1" {
t.Errorf("retained %s metadata = %#v, %v", key, info, ok)
}
}
@@ -112,7 +112,7 @@ func TestPostDecodeOverrideLifecycleMatchesOrdinaryAndLayeredLoads(t *testing.T)
if result.Config.Count != 5 || result.Config.Derived != 8 {
t.Errorf("%s resolved configuration = %#v", name, result.Config)
}
if got := historyLayers(result.Metadata().History(Keys("count"))); !reflect.DeepEqual(got, []Layer{LayerDefault, LayerBase, LayerCLI, LayerResolution}) {
if got := historyLayers(result.Metadata().History(Keys("count"))); !reflect.DeepEqual(got, []Layer{LayerDefault, LayerMain, LayerCLI, LayerResolution}) {
t.Errorf("%s count history layers = %#v", name, got)
}
info, ok := result.Metadata().Lookup(Keys("count"))