Prepare paired safe snapshots for diffs

This commit is contained in:
2026-10-09 12:20:15 +00:00
parent c20ea4b916
commit ade5d6a273
3 changed files with 377 additions and 1 deletions

View File

@@ -194,7 +194,7 @@ whole-map scans or new persistent inspection state.
## Stage 4 — Build paired safe snapshots for compatible shapes
Status: planned. Scope: compatible mapping/sequence/scalar traversal and absence.
Status: complete. Scope: compatible mapping/sequence/scalar traversal and absence.
1. Add private paired traversal in `internal/engine/diff_snapshot.go`, passing
the reported region path and Stage 3's lookup. Build safe owned containers
@@ -215,6 +215,13 @@ Validate: `go test ./internal/engine -run 'Diff|Effective|Snapshot'` and the
everyday check. Done: compatible paired masking preserves presence and public
content, while existing standalone rendering remains unchanged.
Evidence: the focused engine tests and `./scripts/check.sh` passed. The check
completed formatting, whitespace, `go test ./...`, `go vet ./...`, and
`go build ./...` on `go1.26.8 linux/amd64`. Tests confirm one-sided
classification protects both sides, absent subtrees retain absence and public
siblings, compatible sequences preserve each side's length, retained trees are
unchanged, and unsupported intermediate shapes return no nodes.
## Stage 5 — Complete structural-replacement masking
Status: planned. Scope: the fallback rule and its shape-sensitive regressions.