Publish inspection through one frozen history model
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user