Honor parsed sequence indexes in version protections

This commit is contained in:
2026-10-17 04:46:53 +00:00
parent 8a89806e44
commit 884215c403
3 changed files with 47 additions and 3 deletions

View File

@@ -188,10 +188,10 @@ func fragmentVersionClaimProjected(root *document.Node, rule *VersionRule, sourc
current = current.Mapping[index].Value
currentPath = currentPath.Key(segment.key)
case document.Sequence:
if segment.kind != pathSegmentIndex {
index, valid := schemaIndex(segment)
if !valid {
return current
}
index := segment.index
for _, assigned := range ranges {
if assigned.sourceIndex != sourceIndex || assigned.path.String() != currentPath.String() {
continue