A nested copy pasted out of its copy, where the main the copy refers to
had swapped that head, advanced its refs by level through the replaced
slot of the old component and passed on the swap, which left an invalid
file (`:ref-shape-not-found`, `:misplaced-swap-group`). Users reach it
by copying such a copy and pasting it on the page (F590).
When the references a pasted head skips include a swapped head, each of
its shapes now refers to its counterpart in the main of the component it
shows, the first of its content references there, and keeps the
overrides of those it skips, without the swap.
Found by the generated programs once they paste nested copies (a
variant program with a swap in a main).
Test (swap-group-test, fails before the fix):
`paste-out-of-a-copy-follows-a-swap-in-its-main`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.672 | 24.681 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 43.664 | 46.149 | 0.63 |
| library-update-into-copies | 83.083 | 51.625 | 55.322 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.582 | 3.817 | 0.53 |
| main-edit-into-10-copies | 1.79 | 1.063 | 1.179 | 0.59 |
| main-edit-into-100-copies | 15.415 | 10.715 | 11.354 | 0.7 |
| main-edit-into-1000-copies | 153.086 | 104.404 | 110.116 | 0.68 |
| variant-switch-into-copies | 32.052 | 21.823 | 24.319 | 0.68 |
AI-assisted-by: claude-opus-5-5
A nested copy pasted out of its copy advances its refs to the component
it copies and takes the touched groups of the references it skips, so it
keeps the values they gave it. The clipboard also took those of its new
reference: a pasted rect then overrode a fill its new reference itself
overrides, and stopped following that reference's later edits. A shape
with no touched group was also left an empty touched set, which an undo
then removed, so undo did not restore the state exactly (F589).
`advance-copied-objects` takes only the touched groups of the references
between the shape and its new one, and leaves no touched set when there
are none. The golden master's case AZ, which pastes such a copy, records
its states again: its pasted head no longer has an empty touched set.
Test (copying-and-duplicating-test, fails before the fix):
`a-pasted-nested-copy-takes-only-the-overrides-of-the-references-it-skips`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.2 | 22.701 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 43.557 | 45.725 | 0.63 |
| library-update-into-copies | 83.083 | 52.452 | 54.294 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.766 | 2.895 | 0.57 |
| main-edit-into-10-copies | 1.79 | 1.142 | 1.178 | 0.64 |
| main-edit-into-100-copies | 15.415 | 11.615 | 12.834 | 0.75 |
| main-edit-into-1000-copies | 153.086 | 106.297 | 109.039 | 0.69 |
| variant-switch-into-copies | 32.052 | 23.09 | 23.778 | 0.72 |
AI-assisted-by: claude-opus-5-5
A variant switch that carries a turn onto a flipped child gives it the
turn before or after its flips, whichever lies nearer the axes the child
had (`unskewed`). For an unflipped 45-degree turn given a horizontal flip
both lie equally far, and the tie went to the order the engines'
rounding favoured: with the WASM engine the switched child stored
`flipX·R45`, the same shape turned the other way, while its rotation and
flips say `R45·flipX`.
A tie within 1e-9 now takes the turn before the flips, as the function
already intends for axes that tell neither apart.
Found by the WASM replay of the pinned generated programs (program 87, a
switch onto a flipped variant), which passes with it.
Test (comp-expected-geometry-test, fails before the fix with the WASM
engine's axes): `an-unskewed-turn-that-tells-no-flip-apart-turns-before-it`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.123 | 22.948 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 41.395 | 43.459 | 0.6 |
| library-update-into-copies | 83.083 | 51.144 | 55.732 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.373 | 2.539 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.047 | 1.091 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.442 | 10.86 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 105.735 | 109.461 | 0.69 |
| variant-switch-into-copies | 32.052 | 21.661 | 23.984 | 0.68 |
AI-assisted-by: claude-opus-5-5
An ungroup in a grid main ungroups its copies too. A copy with its own
cells gave the shapes the ungroup brings into it its free cells in the
reverse of its own layer order. That matches sync only when the copy
keeps the reverse of its references' order, as under a main, whose grid
the layout update reorders by its cells. A copy of a copy refers to a
copy, which keeps the order the ungroup gives, so its shapes took each
other's cells (F581).
The copy now ranks them by where their references sit in the grid it
refers to; a main's grid is ranked as `ctl/reorder-grid-children` leaves
it. Shapes whose reference is not there follow, in the reverse of the
copy's own order.
Test (composable-gen-test, fails before the fix; the earlier ungroup
tests pass):
`an-ungroup-fills-a-grid-copy-of-a-copy-in-its-references-layer-order`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.348 | 22.994 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 44.01 | 45.457 | 0.64 |
| library-update-into-copies | 83.083 | 51.822 | 52.723 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.384 | 2.681 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.107 | 1.139 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.509 | 10.797 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 99.974 | 103.416 | 0.65 |
| variant-switch-into-copies | 32.052 | 21.852 | 22.437 | 0.68 |
AI-assisted-by: claude-opus-5-5
A masked group takes all its geometry from its mask. When a copy turned
the mask of a masked group, a sync gave the copy's group the geometry of
its main's group, square to the page, and fitted only the group's
parents, so the group no longer matched its turned mask; a reflow then
fitted it again, and settling and a full sync gave different files.
After a sync writes a masked group's attributes, the group fits its mask
again along with its parents.
Test: generated `a-synced-masked-group-fits-the-mask-its-copy-turned`
(fails before the fix).
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+--------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.245 | 23.118 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 43.743 | 44.839 | 0.63 |
| library-update-into-copies | 83.083 | 54.447 | 57.814 | 0.66 |
| main-edit-among-many-shapes | 4.837 | 2.742 | 2.876 | 0.57 |
| main-edit-into-10-copies | 1.79 | 1.077 | 1.135 | 0.6 |
| main-edit-into-100-copies | 15.415 | 10.488 | 11.093 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 106.222 | 112.37 | 0.69 |
| variant-switch-into-copies | 32.052 | 23.155 | 23.929 | 0.72 |
AI-assisted-by: claude-opus-5-5
Since F570 a flip moves a shape's radius tokens with the corners they
apply to. The composable model kept the tokens of a copy's authored
radius on the corners they named before the flip, so a flipped copy
that had set one corner by hand failed I9.
After each step and each settle, the model's authored radius takes the
tokens in the orientation the shape ends with
(`shadow/radius-orientation`). The token property passes at 300
programs.
Test: generated `a-flip-moves-the-radius-tokens-a-copy-authored`.
Harness only; the benchmark is not run.
Also in this commit:
- Block a shape the model moves into a blocked board. A move relocates a shape
as a nest does, and a shape relocated into a blocked parent is blocked, an
override on a copy. The composable model applied that to nests only, so moving
a copy into a board blocked by hand failed I2.
- Predict a mask's move through the group it moves. The composable model
predicts where a transformed shape lands. The mask of a masked group passes
its change to the group, so the prediction applied the change to the mask
alone and skipped the modifier tree. A flex that places the group puts it back
after the move, so moving the mask of such a group left it where it was, and
the prediction failed I9.
- Compare a pasted copy with the main its file accepted. The composable model
expects a copy pasted on the page to author the geometry it shows when that
differs from its main's. It read the main as loaded, so in a stale library
world, after the library resized a main the file had not accepted, a pasted
copy showing the accepted size was expected to author it, and the property
failed I3.
AI-assisted-by: claude-opus-5-5
A bool whose only child was a group kept, after ungrouping that group,
the content it had made of the group: the outlines of its shapes one
after the other, not the boolean result of them. The next refit of the
bool, such as the undo of a later edit of one of its shapes, recomputed
it, so that undo did not give back the state before the edit.
An ungroup now refits the group or bool around the ungrouped shape, with
the undo values of the refit.
Tests: `groups-test/ungrouping-a-group-in-a-bool-combines-its-shapes-again`
(fails before the fix), generated
`an-ungroup-in-a-bool-combines-its-shapes-again`.
The ungroup is outside the paths the component benchmark measures; it is
not run.
AI-assisted-by: claude-opus-5-5
The composable model carried a switched copy's geometry onto the new
head as a plain value, while the other carried shapes keep the parent
whose later resizes size them. Resizing the copy that holds the head then
scaled it through its constraint in production, and the model expected
its old size.
The head now carries its geometry with its parent too, its size only:
its place is its position's.
Test: generated `a-switched-head-in-a-copy-scales-with-its-parent`.
Harness only; the benchmark is not run.
Also in this commit:
- Draw 100 programs per random property on the JVM. The coverage check of a
random composition test asks each kind for 0.5% of the run's changes. At 50
programs a seed could draw a kind too few times: the stale library property
drew its child removal 4 times, all changing state, and failed its check while
its property passed. At 100 programs that seed passes, and the shares vary
less.
AI-assisted-by: claude-opus-5-5
Update main of a copy that swapped a nested copy, pushed inside a copy of
the main, puts the swapped shapes in the position's place and points them
at the position's subtree. Their differing content became overrides, but
their constraints did not: a pushed icon kept the copy's fixed scroll
while its new reference scrolls fixed, untouched and different from its
main.
A shape pushed below the head now marks its constraints group when its
constraints differ from those of its new reference, keeping what the copy
showed, as the head already does. The composable model expects that
override.
Test: generated
`an-update-main-of-a-swap-keeps-the-constraints-its-children-showed`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.399 | 22.081 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 41.679 | 43.499 | 0.6 |
| library-update-into-copies | 83.083 | 50.272 | 54.817 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.258 | 2.591 | 0.47 |
| main-edit-into-10-copies | 1.79 | 1.034 | 1.071 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.439 | 11.139 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 101.545 | 105.155 | 0.66 |
| variant-switch-into-copies | 32.052 | 23.541 | 24.772 | 0.73 |
AI-assisted-by: claude-opus-5-5
A radius token names a corner as its shape shows it, but a copy mirrored
unlike its main inherited the main's corners as they were. A token value
edit then rounded the corner the main keeps square: the copy's tokens
named its other corners.
A flip now moves a shape's radius tokens with the corners they apply
to, and a transform writes them without making them an override. Sync,
reset, update main and a switch carry tokens into the orientation the
destination ends with (`ctsr/tokens-in-orientation`,
`cll/oriented-by`). The composable oracle compares a copy's radius
group with its main's in the copy's orientation.
Tests: `token-apply-test/a-flip-moves-a-radius-token-with-its-corner`,
generated `a-token-edit-keeps-the-square-corner-of-a-mirrored-copy`.
Benchmark (bench-components, alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 22.352 | 23.145 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 44.184 | 45.036 | 0.64 |
| library-update-into-copies | 83.083 | 52.481 | 54.229 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.354 | 2.498 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.031 | 1.1 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.729 | 10.946 | 0.7 |
| main-edit-into-1000-copies | 153.086 | 103.496 | 105.968 | 0.68 |
| variant-switch-into-copies | 32.052 | 23.207 | 23.7 | 0.72 |
AI-assisted-by: claude-opus-5-5
The model kept the geometry a shape authored relative to the parent it
authored it in. A move keeps where and how the shape shows, so moved into
a turned board it was expected turned with it, where production keeps
its turn on the page. The model records the authored geometry again in
the shape's new parent after a move.
Harness only; the benchmark is not run.
Also in this commit:
- Draw fewer random programs in JS and check coverage on the JVM. The random
composition properties drew 50 programs in JS as on the JVM, which made the JS
run of the common tests take about two and a half hours. JS runs the same
model and production code, so it now draws 15 programs per property as a
parity check, and the coverage shares, which need the JVM's 50 programs to
tell, are asserted on the JVM only.
AI-assisted-by: claude-opus-5-5
An update main that adds a copy's new shape to the main makes the
differences between the pushed shape and its new reference authored. A
pasted shape holds empty fill and stroke lists where its main holds none,
so pushing it marked its fills and strokes overridden though nothing
shows differently. No fills or strokes and an empty list of them are the
same there.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 24.875 | 25.599 | 0.71 |
| edit-through-a-chain-of-dependents | 68.931 | 47.991 | 52.684 | 0.7 |
| library-update-into-copies | 83.083 | 60.901 | 62.895 | 0.73 |
| main-edit-among-many-shapes | 4.837 | 3.193 | 3.451 | 0.66 |
| main-edit-into-10-copies | 1.79 | 1.199 | 1.252 | 0.67 |
| main-edit-into-100-copies | 15.415 | 10.375 | 11.472 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 113.348 | 121.731 | 0.74 |
| variant-switch-into-copies | 32.052 | 23.113 | 24.522 | 0.72 |
AI-assisted-by: claude-opus-5-5
A fill child of a grid takes the size of its content, which the grid's
fill then fits to its cell. An absolute child is not filled by the grid,
and the content of a grid whose flex columns span its width is that width
and its padding, so an absolute fill board of a grid grew by its padding
at every layout pass and never settled.
An absolute child keeps its size.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.593 | 26.323 | 0.67 |
| edit-through-a-chain-of-dependents | 68.931 | 50.077 | 55.477 | 0.73 |
| library-update-into-copies | 83.083 | 50.157 | 52.815 | 0.6 |
| main-edit-among-many-shapes | 4.837 | 2.511 | 3.077 | 0.52 |
| main-edit-into-10-copies | 1.79 | 1.172 | 1.215 | 0.65 |
| main-edit-into-100-copies | 15.415 | 9.878 | 12.423 | 0.64 |
| main-edit-into-1000-copies | 153.086 | 123.768 | 175.446 | 0.81 |
| variant-switch-into-copies | 32.052 | 21.933 | 22.474 | 0.68 |
AI-assisted-by: claude-opus-5-5
Ungrouping a board in a grid main ungroups its copies alike. A copy with
its own cells placed the shapes the ungroup brought in by its own flow,
which adds tracks along its direction: a copy flowing in columns grew a
row its main did not have, so tracks it never overrode stopped following
its main's.
A copy with its own cells now first takes the tracks the ungroup left in
the grid it refers to, on the axes it does not override, then gives its
free cells to the new shapes in its main's layer order.
Benchmark (bench-components, run alone):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.032 | 22.764 | 0.63 |
| edit-through-a-chain-of-dependents | 68.931 | 43.547 | 51.026 | 0.63 |
| library-update-into-copies | 83.083 | 52.297 | 57.441 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.474 | 4.362 | 0.51 |
| main-edit-into-10-copies | 1.79 | 1.091 | 1.162 | 0.61 |
| main-edit-into-100-copies | 15.415 | 11.465 | 12.265 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 111.337 | 115.898 | 0.73 |
| variant-switch-into-copies | 32.052 | 22.186 | 27.148 | 0.69 |
AI-assisted-by: claude-opus-5-5
A bool shows its segments. Its transform and the order of its corners
say nothing its flags and segments do not: sync orients its children
from its turn and flips, and fitting it resets its transform. A turned
bool in a flipped board could store a transform that does not mirror,
or its corners in another order, depending on which step last fitted
it. Design snapshots now leave its transform out and take its corners
in any order.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A bool keeps its turn and flips when fitting it resets its transform, so
sync orients its children from them, choosing between the turn before
the flips and the flips before the turn by which is nearer the bool's
axes. A fitted bool's axes are the identity, which tells neither apart,
and the choice fell to the flips first: a flipped, turned copy bool gave
its child a half-turned orientation, which a sync of the settled state
did not. The turn now goes first on a tie, as a flip of a turned shape
stores it.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.783 | 25.354 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 51.070 | 52.568 | 0.74 |
| library-update-into-copies | 83.083 | 54.684 | 63.220 | 0.66 |
| main-edit-among-many-shapes | 4.837 | 2.978 | 3.782 | 0.62 |
| main-edit-into-10-copies | 1.79 | 1.212 | 1.281 | 0.68 |
| main-edit-into-100-copies | 15.415 | 12.907 | 13.628 | 0.84 |
| main-edit-into-1000-copies | 153.086 | 107.916 | 123.169 | 0.70 |
| variant-switch-into-copies | 32.052 | 25.136 | 29.877 | 0.78 |
AI-assisted-by: claude-opus-5-5
Run on the dashboard templates, the scan reported thousands of copies
that a sync would rewrite with the same geometry within a hundredth of a
pixel, the same path segments, or a text whose letters and styles show
the same in another spelling. It now compares geometry and path content
within a hundredth and text content by its override groups, so what it
reports is a difference a user can see.
The scan is a debugging tool outside sync; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Resizing a copy board scales a swapped head in it through its
constraints. The next sync of the head, as the root of its own component,
gave it its component's size back. As a sync that resizes a board already
does, a transform that resizes one now marks the geometry of each
untouched swapped head it gives another size, unless a layout sizes it,
so later syncs keep that size. The harness model authors the same size.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.800 | 28.893 | 0.68 |
| edit-through-a-chain-of-dependents | 68.931 | 48.458 | 60.725 | 0.70 |
| library-update-into-copies | 83.083 | 61.325 | 63.038 | 0.74 |
| main-edit-among-many-shapes | 4.837 | 2.523 | 2.669 | 0.52 |
| main-edit-into-10-copies | 1.79 | 1.180 | 1.214 | 0.66 |
| main-edit-into-100-copies | 15.415 | 11.228 | 11.628 | 0.73 |
| main-edit-into-1000-copies | 153.086 | 110.756 | 120.456 | 0.72 |
| variant-switch-into-copies | 32.052 | 24.565 | 28.627 | 0.77 |
AI-assisted-by: claude-opus-5-5
Ungrouping in a grid main brings the group's shapes into each copy as
well. A copy with its own cells gave them its free cells in the order
the main's grid flows them, while sync gives such a copy's new children
its free cells in the main's layer order, so the result depended on the
path. The ungroup now uses the main's layer order too.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.979 | 26.978 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 43.948 | 50.432 | 0.64 |
| library-update-into-copies | 83.083 | 51.875 | 58.852 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.911 | 3.140 | 0.60 |
| main-edit-into-10-copies | 1.79 | 1.160 | 1.245 | 0.65 |
| main-edit-into-100-copies | 15.415 | 11.340 | 11.833 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 110.971 | 121.066 | 0.72 |
| variant-switch-into-copies | 32.052 | 24.935 | 29.875 | 0.78 |
AI-assisted-by: claude-opus-5-5
A copy duplicated in place under a stale library differs from its
updated main, and the check that keeps a pasted copy's look marked its
geometry although its source had none marked. The check now applies only
to a copy that lands under a parent other than its source's. The harness
model authors a pasted copy's geometry where it lands when its source
authored it, and when another parent gave it its orientation or size.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.980 | 22.894 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 43.830 | 44.755 | 0.64 |
| library-update-into-copies | 83.083 | 53.028 | 54.143 | 0.64 |
| main-edit-among-many-shapes | 4.837 | 2.352 | 2.487 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.103 | 1.125 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.851 | 11.191 | 0.70 |
| main-edit-into-1000-copies | 153.086 | 108.036 | 112.301 | 0.71 |
| variant-switch-into-copies | 32.052 | 22.906 | 23.847 | 0.71 |
AI-assisted-by: claude-opus-5-5
A copy shape that authored its place in a plain board, then taken into a
grid board by an ungroup of its main, is placed by that grid. The model
still compared the place it had authored. A shape a layout places is no
longer held to an authored place.
Harness only; the benchmark is not run.
Also in this commit:
- The harness changes that check the next commit, "Mark a pasted copy's geometry
only when it changes parent".
AI-assisted-by: claude-opus-5-5
Switching a swapped head back to the variant its main holds syncs it from
the copy's root, which misses a move the copy's layout gave its parent:
a grid copy with its own gap moves its child boards, and the restored
head landed where the board would be without that gap. The restored head
now takes the place its main shape has in its actual parent, unless it
authors its geometry or a layout places it.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.030 | 27.413 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 42.850 | 57.976 | 0.62 |
| library-update-into-copies | 83.083 | 60.905 | 63.778 | 0.73 |
| main-edit-among-many-shapes | 4.837 | 3.209 | 4.225 | 0.66 |
| main-edit-into-10-copies | 1.79 | 1.162 | 1.511 | 0.65 |
| main-edit-into-100-copies | 15.415 | 11.296 | 12.963 | 0.73 |
| main-edit-into-1000-copies | 153.086 | 103.929 | 116.557 | 0.68 |
| variant-switch-into-copies | 32.052 | 22.613 | 25.676 | 0.71 |
AI-assisted-by: claude-opus-5-5
A nested copy inside a flipped or turned main shows the orientation its
parent gives it. Copied and pasted elsewhere, it kept that orientation
without marking its geometry, so the next sync turned it back to its
main's with no edit. Each new top copy of a paste or duplicate now goes
through the check a detached copy does: when it is not oriented and
sized as its main turned like its new parent, its geometry is marked as
its own. The harness model authors the same geometry.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 22.546 | 22.997 | 0.64 |
| edit-through-a-chain-of-dependents | 68.931 | 42.115 | 43.255 | 0.61 |
| library-update-into-copies | 83.083 | 52.064 | 54.230 | 0.63 |
| main-edit-among-many-shapes | 4.837 | 2.409 | 2.585 | 0.50 |
| main-edit-into-10-copies | 1.79 | 1.072 | 1.139 | 0.60 |
| main-edit-into-100-copies | 15.415 | 10.340 | 10.963 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 105.617 | 109.281 | 0.69 |
| variant-switch-into-copies | 32.052 | 22.217 | 22.754 | 0.69 |
AI-assisted-by: claude-opus-5-5
A paste kind joins the structure programs: the clipboard's copy of a top
copy, or of a shape a main holds, pasted at the page root. Nothing in
them leaves a copy level, so no ref is advanced. The model carries the
overrides of the copied subtree to the pasted one, as for a duplicate.
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
Sync adds the copies of a main's new children before it removes those of
the children the main lost. Grouping two children of a full grid main
gave each grid copy one flow child more than its cells for a moment, so
it grew a column; the removals left that column empty and the next sync
dropped it. A copy that does not override its cells now takes its main's
tracks on each axis it does not override (all of them on a reset) before
it takes its main's cells.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 20.772 | 21.537 | 0.59 |
| edit-through-a-chain-of-dependents | 68.931 | 41.197 | 42.556 | 0.60 |
| library-update-into-copies | 83.083 | 49.581 | 51.122 | 0.60 |
| main-edit-among-many-shapes | 4.837 | 2.181 | 2.405 | 0.45 |
| main-edit-into-10-copies | 1.79 | 1.108 | 1.158 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.273 | 10.948 | 0.67 |
| main-edit-into-1000-copies | 153.086 | 100.399 | 109.973 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.866 | 22.788 | 0.68 |
AI-assisted-by: claude-opus-5-5
Three kinds join the structure programs, and the programs built on them:
- move: a shape a main holds, or a nested copy head, moves to the page,
into a board or group of its own main or of another. The model gives
an override of its constraints the defaults of its new parent, as the
move resets them.
- rename: the assets panel's rename, with names that carry a path. The
component must take the normalized path and name, and its main root
the whole name.
- annotate: a component's annotation is set or removed. Only that edit,
or its undo or redo, may change an annotation.
The frontend interpreter realises the rename and the annotation through
their workspace events.
Harness only; the benchmark is not run.
Also in this commit:
- Ignore the layout-given size of a hidden layout child in the oracle. A hidden
shape leaves its layout's flow, so it keeps the size the layout last gave it
along its fill or auto axes, while a sync from its main can give it the
main's. The layout gives it its size again once it is shown. The oracle
expected the main's size, and the design snapshots of a settled and a fully
synced world differed by it. Those sizes are now nobody's to keep, as the
place of a hidden layout child already is.
AI-assisted-by: claude-opus-5-5
Moving a shape of a copy group that a layout places changes the group's
bounds, and the layout moves the group back: the moved shape ends where
it was and its siblings move the other way. Nothing was marked, so the
next sync put the siblings back and the user's move was lost.
When a transform moves some copy shapes of the outermost group or bool a
layout places and leaves others, every copy shape in that group now
authors its geometry. A transform of the whole group or of its board
marks nothing more. The harness model authors the same shapes, and
transforms of copy shapes in groups inside layouts are generated again.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 23.506 | 23.987 | 0.67 |
| edit-through-a-chain-of-dependents | 68.931 | 40.749 | 42.565 | 0.59 |
| library-update-into-copies | 83.083 | 49.609 | 50.752 | 0.60 |
| main-edit-among-many-shapes | 4.837 | 2.344 | 2.551 | 0.48 |
| main-edit-into-10-copies | 1.79 | 1.103 | 1.179 | 0.62 |
| main-edit-into-100-copies | 15.415 | 10.109 | 10.492 | 0.66 |
| main-edit-into-1000-copies | 153.086 | 103.527 | 107.994 | 0.68 |
| variant-switch-into-copies | 32.052 | 21.691 | 22.453 | 0.68 |
AI-assisted-by: claude-opus-5-5
An update main pushes a copy's grid direction into its main. When that
main is itself a grid copy with its own cells, sync orders its children
as they flow in those cells, but the update ordered them as the pushing
copy lists them. The next sync of that copy then reordered them with no
edit. The update now gives such a main the order of the copy's cell
flow.
Benchmark (lower quantile, ms):
| world | baseline | now | mean | ratio |
|------------------------------------+----------+---------+---------+-------|
| deepest-edit-through-three-levels | 35.215 | 21.632 | 22.076 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 42.236 | 44.386 | 0.61 |
| library-update-into-copies | 83.083 | 48.557 | 51.934 | 0.58 |
| main-edit-among-many-shapes | 4.837 | 2.443 | 2.556 | 0.51 |
| main-edit-into-10-copies | 1.79 | 1.129 | 1.149 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.085 | 10.387 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 101.224 | 103.687 | 0.66 |
| variant-switch-into-copies | 32.052 | 20.846 | 21.588 | 0.65 |
AI-assisted-by: claude-opus-5-5
A copy bool set to fill in a grid cell is sized by the grid, and its
shapes scale with it. The oracle expected them at their main's size and
place. The shapes of a group or bool whose size a layout owns are now
sized and placed by that layout too.
Test: the-shapes-of-a-copy-bool-a-grid-fills-are-sized-with-it; shape
structure programs pass (seed 9008, 300).
Harness only; the benchmark is not run.
Also in this commit:
- Compare the corners of a masked group in any order on undo. A masked group
takes the corners of its mask. When the mask is a bool, a sync that refits it
computes them again from its children in any order, and the undo of that sync
refits it the same way. The undo check already compares the corners of a bool
in any order; a masked group now follows its mask.
- Read the size of a copy path from its bounds in the harness model. A path
stores no width or height, so the model saw no change when a copy path that a
layout places was resized: its place is the layout's and its size values stay
nil. The model now reads a size change of a shape with no width from its
bounds, and expects the resize to mark it.
AI-assisted-by: claude-opus-5-5
The two programs deferred during the variant runs pass on the current
branch with every step executed, after the round 4 fixes. Generated
tests keep them passing.
Tests: a-flipped-turned-copy-switches-without-losing-its-geometry,
a-turned-pushed-copy-made-a-variant-keeps-a-valid-file.
Harness only; the benchmark is not run.
Also in this commit:
- The harness changes that check the next commit, "Read a bool's orientation
from its turn and flips when syncing".
AI-assisted-by: claude-opus-5-5
A nested copy that fills its flex parent while its main is turned gets
its size from the layout. Switching it to a variant without that layout
carried the size as an override, as both mains agree on their size and
its copy chain authors a turn, so it kept the layout's size for good.
A dimension the layout of the copy gave it before the switch is no
override: the copy takes the new variant's.
Test: a-switch-carries-no-size-the-old-layout-gave-a-child.
Switch, swap, sync and golden master tests pass (215); variant programs
pass (seed 9007, 300).
Benchmark (alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.013 | 20.948 | 0.57 |
| edit-through-a-chain-of-dependents | 68.931 | 39.641 | 40.924 | 0.58 |
| library-update-into-copies | 83.083 | 50.865 | 52.074 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.536 | 3.259 | 0.52 |
| main-edit-into-10-copies | 1.79 | 1.04 | 1.067 | 0.58 |
| main-edit-into-100-copies | 15.415 | 9.946 | 10.414 | 0.65 |
| main-edit-into-1000-copies | 153.086 | 99.227 | 101.039 | 0.65 |
| variant-switch-into-copies | 32.052 | 21.451 | 24.531 | 0.67 |
AI-assisted-by: claude-opus-5-5
A nested copy in a main that authors its height and scales vertically
has its height scaled when an update main resizes that main. The model
kept only the size as authored, as the copy's place in a plain main is
not an override, and compared it raw. An authored size now follows its
parent's later resizes through its constraints, though its place stays
unauthored.
Test: an-authored-size-follows-a-resize-of-its-main-through-its-constraint.
Structure, swap and scale programs pass (seed 9006, 150 each).
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
A grid copy that authors its cells gives its children without a cell
free cells at sync. It took them in the copy's order of its children,
which grid reordering changes, so a child given back by a shrunk track
and a child new from the main could take each other's cells. They now
take free cells in the order of the main shapes they refer to, as sync
adds children.
Test: a-grid-copy-gives-free-cells-to-children-in-their-main-order.
Grid, sync and golden master tests pass (399).
Benchmark (alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.19 | 22.83 | 0.6 |
| edit-through-a-chain-of-dependents | 68.931 | 42.408 | 44.279 | 0.62 |
| library-update-into-copies | 83.083 | 53.897 | 55.394 | 0.65 |
| main-edit-among-many-shapes | 4.837 | 2.367 | 2.548 | 0.49 |
| main-edit-into-10-copies | 1.79 | 1.031 | 1.103 | 0.58 |
| main-edit-into-100-copies | 15.415 | 10.483 | 10.835 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 100.626 | 107.239 | 0.66 |
| variant-switch-into-copies | 32.052 | 23.355 | 23.926 | 0.73 |
AI-assisted-by: claude-opus-5-5
A grid copy that authors its cells and has no free cell for a child its
main gains grew a column for it at the first sync. The next sync gave
the copy its main's columns again, took the grown column for a shrunk
inherited track, and fitted the child back into the inherited tracks,
stacking it in another child's cell.
When a copy's inherited tracks shrink, its default cells past them
(automatic, single, aligned by default) give their children back, which
take a free slot or a track the grid grows for them, as when they first
came. Cells with something of their own are fitted as before, and the
overflow is no longer fitted back into the inherited tracks. The grid
model does the same, and the oracle accepts the default tracks a grid
grows along its flow past its main's.
Tests: a-grid-copy-with-its-own-cells-grows-a-column-for-a-new-child-for-good,
a-grid-copy-keeps-an-aligned-cell-its-main-takes-a-column-from,
a-grid-copy-keeps-its-aligned-cell-when-its-main-adds-a-row.
Grid, sync and golden master tests pass (315); grid programs pass
(seed 9004, 300).
Benchmark (alone; a first run under load read 1.09 for the variant
switch world, which F526 does not reach):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 23.132 | 28.537 | 0.66 |
| edit-through-a-chain-of-dependents | 68.931 | 47.053 | 57.855 | 0.68 |
| library-update-into-copies | 83.083 | 55.445 | 64.964 | 0.67 |
| main-edit-among-many-shapes | 4.837 | 3.117 | 3.305 | 0.64 |
| main-edit-into-10-copies | 1.79 | 1.169 | 1.544 | 0.65 |
| main-edit-into-100-copies | 15.415 | 13.442 | 14.626 | 0.87 |
| main-edit-into-1000-copies | 153.086 | 119.198 | 141.449 | 0.78 |
| variant-switch-into-copies | 32.052 | 25.091 | 29.622 | 0.78 |
AI-assisted-by: claude-opus-5-5
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
Flipping the mask of a mask group in a copy makes the group follow it.
The model applied the mask's change twice, as the modifier tree passes
a mask's change to its group and back, and when the group's orientation
changed it placed the mask's authored geometry in the group, whose
bounds come from that mask, halving it.
The requested geometry of a group's mask applies its change once, and
authored geometry under a group or bool follows the board around it
when its parent's orientation changes, as elsewhere in the model.
Test: flipping-the-mask-of-a-copy-group-flips-the-group-for-good;
shape structure programs pass (seed 9002, 300).
Harness only; the benchmark is not run.
Also in this commit:
- Compare a bool by its children, not its segments, when checking undo. Undoing
an update main that pushed a flip into a main holding a bool gives the bool
back the same rectangle with its segments drawn the other way round. A bool
computes its segments from its children, in an order that depends on how it
computed them.
AI-assisted-by: claude-opus-5-5
A masked group takes all its geometry from its mask. When the mask of a
group in a copy authors a flip, the untouched group follows it; a later
sync gave the group its main's unflipped geometry, apart from its mask.
A masked group whose geometry sync changes in any way carries nothing
and takes its mask's geometry again, as a group a sync moves or resizes
fits its shapes again.
Test: flipping-the-mask-of-a-copy-group-flips-the-group-for-good.
The benchmark of the previous commit covers this one.
AI-assisted-by: claude-opus-5-5
A bool keeps its corners in one order whatever its flips. Sync places
the shapes of a copy shape that authors its geometry like it only when
its geometry differs from its main's, so a flipped bool in a copy
looked like its main, and sync gave its shapes their main's unflipped
geometry.
A group or bool also differs from its main when it mirrors differently,
read from its transform.
Test: syncing-the-shapes-of-a-flipped-copy-bool-keeps-them-flipped.
Benchmark (alone, shared with the next commit):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.498 | 21.134 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 40.257 | 42.557 | 0.58 |
| library-update-into-copies | 83.083 | 51.433 | 52.577 | 0.62 |
| main-edit-among-many-shapes | 4.837 | 2.145 | 2.365 | 0.44 |
| main-edit-into-10-copies | 1.79 | 1.012 | 1.093 | 0.57 |
| main-edit-into-100-copies | 15.415 | 10.535 | 10.754 | 0.68 |
| main-edit-into-1000-copies | 153.086 | 99.04 | 105.491 | 0.65 |
| variant-switch-into-copies | 32.052 | 22.662 | 23.464 | 0.71 |
AI-assisted-by: claude-opus-5-5
A border radius token names the corners as a flipped shape shows them:
applying and propagating it mirror each corner to the one the shape
stores. A radius edit took off the token of the corner it stores, so on
a flipped shape it took off the wrong one, and a later token edit set
the corner given by hand. The sidebar's single-corner edit mirrored the
corner too but wrote only the corner it names, so on a flipped rectangle
it changed nothing.
A radius edit takes off the token of the corner the shape shows, with
the same mirroring, and the sidebar's single-corner edit writes any
corner. The harness model does the same.
Tests: unapply-the-token-of-the-corner-a-flipped-shape-shows;
a-token-edit-sets-the-corners-of-a-flipped-copy-as-it-shows-them.
The benchmark of the previous commit covers this one.
AI-assisted-by: claude-opus-5-5
Removing the mask shape of a masked group in a main unmasks the group.
The deletion reaches the copies through the same deletion, which
ignores touched groups, but the step that unmasks a group that lost its
mask did not, so every copy's group came out unmasked and marked as
overriding its mask.
The unmask follows the deletion's ignore-touched option.
Test: removing-the-mask-of-a-main-unmasks-its-copies-without-overriding-them.
Benchmark (alone, shared with the next commit):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.715 | 24.396 | 0.62 |
| edit-through-a-chain-of-dependents | 68.931 | 48.192 | 53.222 | 0.7 |
| library-update-into-copies | 83.083 | 50.508 | 52.972 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.345 | 2.775 | 0.48 |
| main-edit-into-10-copies | 1.79 | 1.172 | 1.479 | 0.65 |
| main-edit-into-100-copies | 15.415 | 11.582 | 13.079 | 0.75 |
| main-edit-into-1000-copies | 153.086 | 102.539 | 133.903 | 0.67 |
| variant-switch-into-copies | 32.052 | 22.204 | 24.303 | 0.69 |
AI-assisted-by: claude-opus-5-5
A detach advances the references of the nested copies and makes
authored the place of a shape its new main would put elsewhere. It
measured the shapes of a group or bool from the group, whose bounds
differ from its main's when one of its shapes authors a move, so it
authored places nothing had moved, and authored the group's own
geometry for the same reason.
The shapes of a group or bool are measured in the board around it, as
a group takes its bounds from its shapes, and a group or bool never
authors its geometry there. The harness model does the same.
Test:
detaching-keeps-a-shape-of-a-copy-bool-unauthored-where-its-main-places-it.
Shape structure programs pass (seed 9001, 150).
The benchmark of the commit before the previous one covers this one.
AI-assisted-by: claude-opus-5-5
A copy that authors a grid column its main lacks takes its main's cells
fitted to its own tracks. The fitting gave the cell of that column a new
id at every sync, so the copies that follow it took a new id each time,
while one that authors its own cells kept the old one.
The cells a copy's own tracks add keep the ids of its cells in the same
place.
Test: syncing-a-copy-with-its-own-columns-keeps-the-ids-of-their-cells.
Focused grid, sync and golden master tests pass (315 tests).
The benchmark of the previous commit covers this one.
AI-assisted-by: claude-opus-5-5
An update main that pushes a turn into a main holding a group turns the
group and its shapes. Its undo restores the shapes first and fits the
group around them while the group still has the turned transform, which
writes the turned bounds into its width and height; the group's own undo
then restores only the attributes the update main changed, so the group
kept the turned size.
The undo of a shape's synced attributes fits the shape itself, after its
own undo, as well as its parents; only groups and bools are fitted.
Test: undoing-an-update-main-that-turns-a-group-gives-the-group-its-size-back.
Focused sync, undo, group and golden master tests pass.
Benchmark (alone, shared with the next two commits):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 20.59 | 22.349 | 0.58 |
| edit-through-a-chain-of-dependents | 68.931 | 41.197 | 42.87 | 0.6 |
| library-update-into-copies | 83.083 | 50.286 | 53.679 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.582 | 3.885 | 0.53 |
| main-edit-into-10-copies | 1.79 | 1.132 | 1.22 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.634 | 11.318 | 0.69 |
| main-edit-into-1000-copies | 153.086 | 100.406 | 125.813 | 0.66 |
| variant-switch-into-copies | 32.052 | 21.303 | 22.718 | 0.66 |
AI-assisted-by: claude-opus-5-5
The random histories never transformed a copy shape inside a group or a
bool. They now do, where the board around the group has no layout.
Inside a layout, a move of a group's shape makes the layout move the
group back, and its siblings with it, with nothing authored; that stays
out until it is decided.
The oracle learns:
- the shapes of a group or bool take their place from the board around
it, or from the nearest group or bool on the way that authors its
geometry;
- the geometry check leaves groups and bools out, as their bounds come
from their children, which it checks.
The frontend replay realises the token value edit as the token form
commits it, with its propagation.
Test: the-shapes-of-a-moved-copy-group-follow-it; shape structure
programs pass (seeds 8101 at 150, 8102 at 300).
Harness only; the benchmark is not run.
AI-assisted-by: claude-opus-5-5
When a shape in a group of a copy authors a move or a resize, the
untouched group's bounds follow it. Sync moved or resized the group
back to its main's bounds and carried its whole subtree with it, so the
shape lost the geometry it authored.
A group or bool takes its bounds from its children, which sync places
one by one: a move or resize of its bounds now carries nothing, and the
group fits its children again. A turn or flip still carries the subtree.
Tests: syncing-a-copy-group-keeps-the-place-its-shape-authors,
syncing-a-copy-group-keeps-the-size-its-shape-authors,
undoing-a-turn-of-a-copy-group-gives-the-groups-of-its-copies-their-bounds-back.
The full common suite passes.
The benchmark of the previous commit covers this one.
AI-assisted-by: claude-opus-5-5
A group takes its bounds from its children and resets its flip flags
while its transform keeps the mirror. Sync turns and flips the children
of a copy shape like the shape, composing the flips of the copy and of
its main through their flags, so a flipped group in a copy gave its
children a mirroring transform stored as a half turn without flips.
Sync reads whether a group or bool mirrors from its transform.
Test: syncing-the-shapes-of-a-flipped-copy-group-keeps-them-flipped.
The full common suite passes.
Benchmark (alone, shared with the next commit):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 24.408 | 25.288 | 0.69 |
| edit-through-a-chain-of-dependents | 68.931 | 49.305 | 51.709 | 0.72 |
| library-update-into-copies | 83.083 | 57.405 | 59.433 | 0.69 |
| main-edit-among-many-shapes | 4.837 | 2.779 | 2.943 | 0.57 |
| main-edit-into-10-copies | 1.79 | 1.176 | 1.221 | 0.66 |
| main-edit-into-100-copies | 15.415 | 11.968 | 13.13 | 0.78 |
| main-edit-into-1000-copies | 153.086 | 121.213 | 125.656 | 0.79 |
| variant-switch-into-copies | 32.052 | 24.938 | 26.57 | 0.78 |
AI-assisted-by: claude-opus-5-5
The random histories never applied a design token. The token programs
give the file an active set of three border radius tokens and add token
steps: apply a token to every corner of a rectangle or board, main or
copy; take one off; set a corner's radius by hand, which takes its token
off; and edit a token's value, which sets it on every shape that applies
it, without touching, as the token editor and its propagation do.
The model learns what tokens change:
- the tokens of a shape's corners go with its radius group, so a copy
that applies or takes off a token authors its radius;
- a token edit sets the authored corners that apply it; a token names
the corners as a flipped shape shows them, so they are set mirrored;
- a switch carries each corner's token, or its lack of one, with its
radius.
The undo and redo checks compare the tokens library by its exported
content, as undo gives it back with new modification times. The golden
master of case AY is recorded again for that: its token library is now
written as that content, key by key, with the same values.
A token edit does not reach the shapes deleted components store, so a
copy of a deleted main loses the edit at its next sync; no token edit is
made while a deleted component stores a shape that applies the token.
Tests: random-token-compositions, 200 programs pass;
a-token-edit-sets-the-corners-of-a-flipped-copy-as-it-shows-them,
switching-a-copy-carries-the-radius-tokens-it-applied,
switching-a-copy-carries-each-corner-token-with-its-radius.
Harness only; the benchmark is not run.
Also in this commit:
- Leave undone creations out of the harness sync comparisons. Undoing a new
variant set leaves its component deleted, its stored objects holding the
nested copies as they were. Undoing an earlier edit of a main restores the
main, but an undo starts no sync, so those stored copies keep the edit. Only
redo brings that component back, and redo restores the edit first, so no user
sees them. The I5 and I6 checks compare the settled file with a full sync,
which rewrites them.
AI-assisted-by: claude-opus-5-5
A nested copy head in a copy that is resized apart from its main keeps
its place as authored geometry when its constraint changes. Switching it
keeps that place and, keeping the touched groups, its constraints, but
the switch compared the place with its position placed through the
main's own constraints. Where the two matched it dropped the geometry
override, and the next sync of its parent moved the head through the
constraints it carries.
When a switch keeps the touched groups and the head authored its
constraints, the kept place is compared with its position placed
through those constraints, as sync places it. The harness model does
the same.
Test: switching-a-copy-head-keeps-the-place-its-own-constraint-kept.
Focused switch, swap and composable tests pass (288 tests).
Benchmark (alone):
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 23.06 | 29.353 | 0.65 |
| edit-through-a-chain-of-dependents | 68.931 | 46.664 | 61.416 | 0.68 |
| library-update-into-copies | 83.083 | 49.118 | 51.106 | 0.59 |
| main-edit-among-many-shapes | 4.837 | 2.744 | 3.366 | 0.57 |
| main-edit-into-10-copies | 1.79 | 1.306 | 2.48 | 0.73 |
| main-edit-into-100-copies | 15.415 | 11.34 | 12.203 | 0.74 |
| main-edit-into-1000-copies | 153.086 | 130.776 | 191.745 | 0.85 |
| variant-switch-into-copies | 32.052 | 22.084 | 26.522 | 0.69 |
AI-assisted-by: claude-opus-5-5
A group takes its bounds from its children. Creating a bool inside a
group left the group with its old bounds, though the bool's result can
be smaller: a difference of a 12 px shape and a 20 px one inside a 30 px
group kept the group at 30 px in the main, while sync gave the copies'
groups the bool's 12 px. Creating a bool now refreshes the groups around
it, as masking does.
Tests: a-bool-made-in-a-group-gives-the-group-its-bounds;
a-bool-made-in-a-main-group-gives-the-copy-groups-its-bounds (the shape
structure program of gate seed 660536824).
Benchmark (scripts/bench-components, ms, lower 2.5% quantile), with a
3 GB heap, alone:
| :world | :baseline | :now | :mean | :ratio |
|------------------------------------+-----------+---------+---------+--------|
| deepest-edit-through-three-levels | 35.215 | 21.558 | 23.752 | 0.61 |
| edit-through-a-chain-of-dependents | 68.931 | 43.004 | 48.489 | 0.62 |
| library-update-into-copies | 83.083 | 50.926 | 53.941 | 0.61 |
| main-edit-among-many-shapes | 4.837 | 2.427 | 2.862 | 0.5 |
| main-edit-into-10-copies | 1.79 | 1.121 | 1.214 | 0.63 |
| main-edit-into-100-copies | 15.415 | 10.652 | 11.179 | 0.69 |
| main-edit-into-1000-copies | 153.086 | 105.051 | 119.813 | 0.69 |
| variant-switch-into-copies | 32.052 | 23.083 | 25.483 | 0.72 |
AI-assisted-by: claude-opus-5-5
A group or bool takes its corners from its children, so its stored turn
and flips say nothing its corners do not: the oracle failed a copy group
whose main turned for a flip flag at its expected corners. It no longer
compares a group's or bool's turn and flips once its corners match. And
the oracle placed a copy child of a bool from the bool's stored transform,
which need not carry the bool's flip; it now places children of groups
and bools from the board around them, as the snapshot measures them.
Tests (programs of the shape structure property):
a-copy-group-whose-main-turns-matches-its-corners-whatever-its-flips;
a-copy-shape-in-a-bool-takes-its-place-from-its-board-when-the-main-flips.
Harness only; the benchmark is not run.
Also in this commit:
- Allow a group's recomputed bounds the bool tolerance when checking undo. A
group computes its bounds again from its children, as a bool does: undoing an
unmask gave a turned mask group 0.01 high its bounds back about 1e-6 apart,
beyond the undo check's 1e-10. A group now takes the 1e-4 tolerance of bools
and paths.
AI-assisted-by: claude-opus-5-5