alonso.torres c544a9445d 📎 Reflow the layouts a swap or switch changes in the harness
The frontend's component swap, which a variant switch uses too, sends a
layout update for the parents the swap returns and for the new subtree.
The harness swap and switch nodes reflowed nothing, so a switch in a page
copy of a flex main left a sibling of the switched head in its old place,
and the next move of that sibling took the layout's correction as its own
geometry override.

The swap and switch nodes now reflow the layouts among those parents and the
new subtree. They do not mark the changes for the runner's pass over every
layout after sync, which the frontend does not do for a swap.

Generated regression: a four-step nest, switch, duplicate and move program
that failed I2 (seed 159775967, round 9) now passes.

Golden masters af and ak recorded again on purpose: they start with a swap
in a grid copy, whose two children now take their cells instead of the
stale place they had; the main a later update-main pushes them into
follows. Only geometry changes.

Harness only; the benchmark is not run.

Also in this commit:

- Draw 50 programs in each random composition coverage test. The seven random
  composition tests check that every operation kind supplies its share of
  meaningful changes. With 20 programs some seeds draw too few steps whose
  precondition holds (a redo with an undone library change, a grid direction on
  a grid, a resize that changes anything), so the suite failed now and then
  although every program passed. The four seeds that failed pass with 50
  programs.

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:47 +01:00
..