Publish inspection through one frozen history model

This commit is contained in:
2026-10-26 17:36:36 +00:00
parent 8155465322
commit 12fd0a7191
20 changed files with 203 additions and 247 deletions

View File

@@ -40,7 +40,7 @@ func (r *Inspection) Explain(path Path) (Explanation, bool) {
if r == nil || r.final == nil || !path.valid() {
return Explanation{}, false
}
model := r.metadata.historyModel
model := r.history
if model == nil {
return Explanation{}, false
}
@@ -48,7 +48,7 @@ func (r *Inspection) Explain(path Path) (Explanation, bool) {
if len(selections) == 0 && !model.hasObservedShape(path) {
return Explanation{}, false
}
explanation := Explanation{Path: path.clone(), Effective: valueSnapshotWithLookup(r.final, path, r.secrets, r.immutableLookup)}
explanation := Explanation{Path: path.clone(), Effective: valueSnapshotWithLookup(r.final, path, r.secrets, model.documentLookup)}
if info, ok := r.metadata.Lookup(path); ok {
explanation.Origin = cloneOrigin(info.Origin)
}