Preserve explicitness across resolution shape changes

This commit is contained in:
2026-10-26 14:36:15 +00:00
parent 28ef9b6200
commit a893c7716c
7 changed files with 125 additions and 13 deletions

View File

@@ -217,6 +217,10 @@ func TestApplyResolutionMetadataPreservesOverlappingDeltaOrder(t *testing.T) {
fields: map[string]FieldInfo{"/group/item/leaf": {Origin: oldOrigin}},
history: make(map[string][]Change),
}
entry := resolutionInput{metadata: Metadata{
fields: map[string]FieldInfo{"/group/item/leaf": {Explicit: true, Origin: oldOrigin}},
effectivePaths: effectivePathIndex(final),
}}
resolved := resolutionResult{
final: final,
deltas: []documentDelta{{path: Keys("group")}, {path: Keys("group", "item")}},
@@ -226,7 +230,7 @@ func TestApplyResolutionMetadataPreservesOverlappingDeltaOrder(t *testing.T) {
},
}
applyResolutionMetadata(metadata, resolved)
applyResolutionMetadata(metadata, resolved, entry)
field := metadata.fields["/group/item/leaf"]
if field.Origin.Operation != childOrigin.Operation {