Project sequence evidence through item mappings

This commit is contained in:
2026-10-23 18:07:15 +00:00
parent 7b04dc6a50
commit f6b02dec03
10 changed files with 374 additions and 66 deletions

View File

@@ -165,10 +165,11 @@ func fragmentVersionClaimWithIndex(root *document.Node, rule *VersionRule, sourc
return current
}
if assigned, found := ranges[sequenceRangeKey{sourceIndex: sourceIndex, path: currentPath.String()}]; found {
if index < assigned.start || index >= assigned.end {
projected, ok := assigned.inputForOutput(index)
if !ok {
return nil
}
index -= assigned.start
index = projected
}
if index < 0 || index >= len(current.Sequence) {
return nil