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

@@ -523,17 +523,17 @@ func TestLoadMetadataReflectsDefaultsInputAndDetachedRecords(t *testing.T) {
t.Fatalf("kept = %#v, %v", kept, ok)
}
set, ok := metadata.Lookup(Keys("nested", "set"))
if !ok || !set.Explicit || set.Origin.Layer != LayerBase || len(set.Origin.Locations) != 1 {
if !ok || !set.Explicit || set.Origin.Layer != LayerMain || len(set.Origin.Locations) != 1 {
t.Fatalf("set = %#v, %v", set, ok)
}
nullable, ok := metadata.Lookup(Keys("nullable"))
if !ok || !nullable.Explicit || !nullable.Null || nullable.Origin.Layer != LayerBase {
if !ok || !nullable.Explicit || !nullable.Null || nullable.Origin.Layer != LayerMain {
t.Fatalf("nullable = %#v, %v", nullable, ok)
}
if metadata.IsExplicit(Keys("nested", "kept")) || !metadata.IsExplicit(Keys("nested", "set")) {
t.Fatal("explicit presence disagrees with lookup")
}
if history := metadata.History(Keys("nested", "set")); len(history) != 2 || history[0].Origin.Layer != LayerDefault || history[1].Origin.Layer != LayerBase || len(history[1].Previous) != 1 {
if history := metadata.History(Keys("nested", "set")); len(history) != 2 || history[0].Origin.Layer != LayerDefault || history[1].Origin.Layer != LayerMain || len(history[1].Previous) != 1 {
t.Fatalf("history = %#v", history)
}