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

@@ -162,7 +162,13 @@ history regression checking source chronology and previous-origin links.
## 3. Container Explanations Take The Last Descendant Replacement's Origin
Priority: P2. Status: open.
Priority: P2. Status: complete.
Completion: explanation uses the model's direct query-scoped contribution when
available and reserves operation fallback for paths without that contribution.
`TestOverlayExplanationUsesQueryScopedOrigin` failed before the fix and now
checks root, enclosing mapping, and leaf locations. The full ordinary suite and
`git diff --check` passed, including removed/replaced descendant coverage.
Relevant code: `historySelectionForApplication` in
[explain.go](../../internal/engine/explain.go), lines 183–207; and descendant