alonso.torres e22ca8b7ce 📎 Compare groups and bools and their shapes by corners in the harness
A bool's stored flip flags and transform drift apart, so neither sync
nor the model can read its orientation. The model and the oracle now
compare a group or bool, and the shapes it holds, by their corners in
any order, without their turn and flips, whether or not the authored
values record corners. Their corners are ordered by angle around their
centre: an order by position to the hundredth of a pixel swapped the
corners of an empty bool, 0.01 px wide, with float noise.

Resizing a copy bool after its main was flipped leaves settled and
fully synced files apart (F518, deferred until a bool keeps a reliable
orientation); the generator skips resizes of copy bools until then.

Tests: a-copy-bool-and-its-shapes-are-compared-by-their-corners,
an-empty-bool-in-a-copy-keeps-its-corners-in-one-order.

Harness only; the benchmark is not run.

Also in this commit:

- Leave a group's flip flags out of the harness undo check. Undoing a text style
  edit fits the group around the text again, and fitting a group clears its flip
  flags by design, though its corners and transform still show the flip. The
  undo check now leaves the flip flags of groups and bools out and compares
  their corners.
- Round corner angles before they wrap in the harness corner order. The harness
  orders the corners of groups, bools and their shapes by angle around their
  centre. A corner level with the centre, as in a square turned 45 degrees, fell
  at 0 or just under a full turn as noise fell, and its order flipped. Angles
  are now rounded before they wrap.
- Read the size of a bool from its selrect in the update main check. The harness
  check of an update main compared the sizes of the parent of a pushed shape by
  their width and height, and crashed when that parent was a bool, which has no
  width or height of its own. Sizes are read from the selrect.
- Order the corners of groups in the harness design snapshot. The settled and
  fully synced files of a bool made in a variant main whose copies are turned
  differed only by noise: up to 5e-6 px in the bool, which computes its geometry
  in single precision. But the design snapshot ordered only a bool's corners,
  not a group's, and the angle order, to the millionth of a radian, flipped a
  corner level with the bool's centre under that noise.
- Author no size for a swapped head a layout places in the harness. Switching a
  nested head in a filling grid copy to a wider variant grows the grid. The
  model took the grown copy for a sync resize and made the untouched swapped
  head author the size the resize gives it, though the layout sizes it, not its
  constraints. Heads a layout places are left out.

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