Add private input destination placement helpers

This commit is contained in:
2026-10-14 13:09:06 +00:00
parent ea55ab43ce
commit 667a536ae7
3 changed files with 292 additions and 3 deletions

View File

@@ -179,7 +179,7 @@ authorized. No feature code or current behavior contract changed.
## Stage 2 — Add private destination normalization and wrapping
Status: planned. Scope: pure private mechanics with bounded unit tests.
Status: complete. Scope: pure private mechanics with bounded unit tests.
1. Add a small engine helper file for normalized mapping-only destinations and
constructing placed document bodies. Follow decisions 2–7; keep helpers
@@ -195,8 +195,11 @@ Status: planned. Scope: pure private mechanics with bounded unit tests.
unchanged body coordinates, and bounded wrapper checks. Do not count helper
invocations or fix an allocation strategy in tests.
Validate: focused destination/path tests and the everyday check. Done: the
mechanism is usable privately; no loader accepts a new public field yet.
Validated with `go test ./internal/engine -run 'Destination|PlaceDocument'`
and `./scripts/check.sh` (go1.26.8 linux/amd64); both passed. The private
helpers normalize mapping-only destinations, preserve authored nodes and source
coordinates, and check per-document depth/node bounds before allocating wrappers.
No loader accepts a new public field yet.
## Stage 3 — Integrate private non-import input placement