Keep explanation origins scoped to the query

This commit is contained in:
2026-10-27 03:05:15 +00:00
parent 906ca34b6d
commit 3f389662e9
3 changed files with 53 additions and 4 deletions

View File

@@ -181,11 +181,13 @@ func historySelectionForPayload(selections []historySelection, ref historyPayloa
}
func historySelectionForApplication(model *historyModel, selections []historySelection, phase historyPhase, applicationRef historyPayloadRef) (historySelection, bool) {
if direct, ok := historySelectionForPayload(selections, applicationRef); ok {
return direct, true
}
// Only removed/replaced paths lacking a direct contribution need an
// operation fallback. A descendant's location cannot describe its container.
var selected historySelection
found := false
if direct, ok := historySelectionForPayload(selections, applicationRef); ok {
selected, found = direct, true
}
var payloads []historySourcePayload
switch phase {
case historyPhaseSources: