Index stable history trees during normalization

This commit is contained in:
2026-10-27 03:08:34 +00:00
parent 3f389662e9
commit 9ff873f54c
6 changed files with 30 additions and 89 deletions

View File

@@ -37,9 +37,10 @@ func (builder *historyBuilder) observeTypedCheckpoint(phase historyPhase, root *
beforeRoot := builder.scratch
paths := unionCLIHistoryPaths(beforeRoot, root)
lookup := buildDocumentLookup(beforeRoot, root)
for _, path := range paths {
beforeNode, before := documentAtPath(beforeRoot, path)
afterNode, after := documentAtPath(root, path)
beforeNode, before := documentAtPathWithLookup(beforeRoot, path, lookup)
afterNode, after := documentAtPathWithLookup(root, path, lookup)
sensitive := beforeNode != nil && beforeNode.Sensitive || afterNode != nil && afterNode.Sensitive
builder.addObservation(historyObservation{
path: path, phase: phase, payload: payload,