11 Commits

Author SHA1 Message Date
alonso.torres
a44321fc4d 🐛 Refuse an update main that would nest a component inside itself
Nesting, duplicating and swapping refuse to put a component inside itself;
updating a main from a copy did not. A swap inside a variant's main reaches,
through sync, a copy of the swap's new component whose slot was switched to
that variant, so the copy holds its own component two levels down. Pushing
that copy into its main made each main hold the other, and the sync cascade
never settled.

Add update-main-nesting-loop?: the copy holds a copy of its component, or of
a component whose main holds one. An update main it matches changes
nothing, and the generator skips such targets as it skips looping swaps.

A fresh JVM library run (seed 20261101) found this: sync did not settle
after 200 passes. The regression fails before the fix (sync does not
settle) and passes after it: the update leaves the files unchanged and the
program runs. The full common JVM suite passes at seed 712: 2068 tests /
33874 assertions.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.898     0.50
Main into 100 copies         15.415     8.836     0.57
Main into 1000 copies       153.086    88.060     0.58
Three nesting levels         35.215    18.841     0.54
Dependency chain             68.931    37.993     0.55
Library update               83.083    43.555     0.52
Many plain shapes             4.837     2.206     0.46
Variant switch               32.052    20.015     0.62

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
9dc405b65e 🐛 Cancel a nested copy's parent turn in update main
Update main turned a copy back into its main's frame only when the copy
root authored no geometry. A nested copy that inherited its parent's turn
and then authored a resize still pushed the turn into its main, and sync
composed it again: 45 degrees became 90.

Sync composes a nested copy root with its parent's turn, so cancel exactly
that turn, relative to the main's parent, whatever the root authors. A
top-level copy root keeps the existing rule: it owns its turn only when it
authors its geometry.

The shrunk library program fails I9 before the fix and passes unchanged
after it; the earlier inherited-turn regression still passes. Goldens are
unchanged.

Full suites ran on the tree with the fixture fix, this update-main fix and
the grid rollout. Common JVM passes 2061 tests / 33765 assertions; JavaScript
passes 1997 / 32400; common lint and formatting pass. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 16138. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.866     0.48
Main into 100 copies         15.415     8.393     0.54
Main into 1000 copies       153.086    85.279     0.56
Three nesting levels         35.215    17.172     0.49
Dependency chain             68.931    34.199     0.50
Library update               83.083    42.833     0.52
Many plain shapes             4.837     2.064     0.43
Variant switch               32.052    19.599     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
80b65c8dbb 🐛 Author a pushed swap's constraints against its own main
Update main of a swap pushed into a main makes the swap a plain nested copy
of its own component. It kept the constraints of its old position, such as
an authored fixed scroll, without marking them as overrides, so the next
sync from its own main would reset them.

Mark the constraints group when the old position's constraints differ from
the new main's, as orientation already is. The update-main model predicts
the same from the swapped head before the update.

A fresh-seed JVM library run found this. Its shrunk program fails I4
before the fix and passes unchanged after it. Goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.895     0.50
Main into 100 copies         15.415     8.623     0.56
Main into 1000 copies       153.086    86.717     0.57
Three nesting levels         35.215    17.928     0.51
Dependency chain             68.931    35.381     0.51
Library update               83.083    43.344     0.52
Many plain shapes             4.837     2.118     0.44
Variant switch               32.052    18.854     0.59

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
d3f073fe82 🐛 Keep an inherited turn out of update main
A nested copy inside a turned parent inherits that turn as placement. Update
main pushed it into the copy's main as if the copy had authored it, and the
copy then composed the turn twice: 45 degrees became 90.

When the copy root does not author its geometry, turn the copy subtree back
into the main's frame before pushing its values. A root rotation the user
authored is still pushed as before.

A fresh-seed JVM structure run found this. The shrunk program fails I9
before the fix and passes unchanged after it, with the main unturned and
the copy at its original 45 degrees. Goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.876     0.49
Main into 100 copies         15.415     8.403     0.55
Main into 1000 copies       153.086    85.661     0.56
Three nesting levels         35.215    17.327     0.49
Dependency chain             68.931    37.617     0.55
Library update               83.083    46.058     0.55
Many plain shapes             4.837     2.174     0.45
Variant switch               32.052    20.413     0.64

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
c1be7835ff 🐛 Keep float noise out of switch geometry overrides
A variant switch carried geometry from the old copy when it differed from
the new copy, using exact equality. A copy turned like its new main, equal
up to 1e-14 after placement, kept a phantom geometry override.

Compare the carried points, selrect, size and rotation with float tolerance
before writing them. Other attributes keep exact comparison, and the
position data reset still writes its nil.

A random common JavaScript library run found this; its shrunk switch
program fails I2 before the fix and passes unchanged after it. Switch,
sync and golden suites pass; goldens are unchanged.

Full suites ran once on the tree with this fix and the related fixes that
follow it. Common passes lint, JVM, JavaScript and formatting: JVM 2059
tests / 33770 assertions; JavaScript 1995 / 32377. All six component
properties pass 40 programs each at seed 712 in both runtimes. Full rebuilt
frontend passes 1798 / 15737. Backend passes 1838 / 9293; exporter passes
16 / 40; consumer lint and formatting pass.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.897     0.50
Main into 100 copies         15.415     8.750     0.57
Main into 1000 copies       153.086    83.056     0.54
Three nesting levels         35.215    17.460     0.50
Dependency chain             68.931    33.955     0.49
Library update               83.083    43.915     0.53
Many plain shapes             4.837     2.075     0.43
Variant switch               32.052    19.674     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
9eda12b819 🐛 Place copy children through the constraints they author
Resizing a copy placed its children through their own constraints, but sync
then placed them again through the constraints of the main children they
pair with. A child that authored a scale, right or left-right constraint
went back to the main's left placement on the next sync, while partial sync
kept the resized result.

When sync places the main subtree like a resized copy, resize the main
children with the constraints their copy children author. The swapped head
placement step takes the head's authored constraints the same way. The
generated oracle predicts copy child geometry with the same rule.

A random common JavaScript structure run found this. Its shrunk program
fails I4 against the old oracle and I6 against the old sync. The direct
regression fails three of 15 assertions before the fix: each authored
constraint places the child on resize, and sync moves it back. Both pass
unchanged after the fix. Goldens are unchanged.

Full common passes lint, JVM, JavaScript and formatting: JVM 2054 tests /
33757 assertions; JavaScript 1990 / 32348. All six component properties pass
40 programs each at seed 712 in both runtimes. Full rebuilt frontend passes
1798 / 15737. Backend passes 1838 / 9293 (a pool-statistics race failed once
and passed on rerun); exporter passes 16 / 40. Consumer lint and formatting
pass. The final nil filter on authored constraints ran in the focused sync,
geometry and golden suites after the full runs.

Compare lower-quantile milliseconds with the saved baseline; keep that
baseline unchanged. The machine/JVM warning makes ratios rough. No world
is flagged.

World                      Baseline       Now    Ratio
Main into 10 copies           1.790     0.885     0.49
Main into 100 copies         15.415     8.615     0.56
Main into 1000 copies       153.086    87.402     0.57
Three nesting levels         35.215    18.043     0.51
Dependency chain             68.931    35.277     0.51
Library update               83.083    43.810     0.53
Many plain shapes             4.837     2.070     0.43
Variant switch               32.052    19.557     0.61

AI-assisted-by: claude-opus-5-5
2026-11-10 20:21:42 +01:00
alonso.torres
a4eea62bdc 🐛 Take nested swap constraints from their position source
Settle a nested swap's untouched constraint group from the replaced
position, including fixed-scroll. Carry compatible switch overrides first
so an inherited position cannot discard an authored constraint override.

Cover F224's reduced history in common and the async frontend, both
constraint axes, absent position fields, compatible carry and exact undo.
The complete original history and browser ShapeProxy replay also pass.

Validation: focused swap/variant/golden tests (123 tests, 1,764 assertions),
full common JVM/JS, frontend, backend and exporter suites; lint and format.
Golden data is unchanged.

Benchmark ratios against the unchanged baseline, with no regression flags:
mains 10/100/1,000: 0.53/0.58/0.63; three levels: 0.56; chain: 0.55;
library: 0.56; many shapes: 0.48; variant switch: 0.65.
The baseline uses another machine/JVM, so ratios are rough comparisons.

AI-assisted-by: GPT-6
2026-11-10 20:21:41 +01:00
alonso.torres
f54d1a288e 🐛 Skip numerically equal component sync writes
Compare integer and floating forms exactly for scalar values, points and
selection rectangles. A library update that only changes their numeric
representation must not create changes or an undo entry. Preserve every
nonzero difference, including real subpixel moves.

Add the reduced resize/library-sync regression and a subpixel control,
plus async frontend undo/redo replay. Review and update eight golden
states in case N: only equal integer/float representations changed.
The recreated seed-712 audit leaves all 61 syncs and undo depths unchanged.

Common JVM 1,914 tests/31,146 assertions and JS 1,845/29,810 pass.
Frontend 1,563/10,880, its added replay, backend 1,610/8,104 and exporter
14/32 pass. Lint and formatting pass. Exporter needs its test-only secret.

Benchmark ratios against the unchanged baseline: mains 10/100/1000
0.54/0.61/0.61, levels 0.53, chain 0.55, library 0.55, many shapes 0.62,
variant switch 0.65. No regression flag.

AI-assisted-by: gpt-6
2026-11-10 20:21:41 +01:00
alonso.torres
48a627e042 🚧 Save component stabilization follow-up
Expand generated component coverage with independent library histories,
meaningful mutation counts, varied geometry and variants, all text style
units, oracle corruption controls and pending-sync frontend replays.

Fix reflected descendants, partial size carry, WASM shape defaults,
deferred swap and sidebar text undo, grid visibility, explicit typography
ownership, metadata filtering and swapped placement through sync/detach.

Recorded validation after F219:
- Common JVM: 1,909 tests / 31,088 assertions; JS: 1,840 / 29,688.
- Frontend: 1,560 tests / 10,821 assertions.
- Backend: 1,610 tests / 8,104 assertions; exporter: 14 / 32.
- Applicable lint and formatting pass; golden data stays unchanged.

Benchmark ratios against the unchanged Phase 1e baseline:
- Main edits into 10/100/1,000 copies: 0.52/0.57/0.58.
- Three levels: 0.51; dependency chain: 0.52; library update: 0.58.
- Many shapes: 0.42; variant switch: 0.62. No regression flags.

This is a checkpoint. The fresh legacy-library gate at seed 712 fails
at program 351 (F221); its cause remains unclassified. The other four
large gates did not run. F220, F187, F214 and wider coverage remain open.

AI-assisted-by: gpt-6
2026-11-10 20:21:33 +01:00
alonso.torres
2b50fda318 ✨ Generate component programs across library files
Build a shared library world and route edits, updates and settlement across
working and library files. Check the independent override model, geometry,
propagation and exact undo for both files. Replay shrunk library failures
through the async frontend with the same target choices and barriers.

Keep common generation/shrinking and CLJS replay as the main regression
suite. Use the plugin for public API, WASM and measured-text smoke checks;
retain its existing fixed cases until equivalent coverage replaces them.

All four properties pass 5000 programs each with seed712, each in a full
run. Fresh swaps: 5009 assertions; library: 5008. Isolated Stage3: 55/379.
Live WASM, fonts, undo/redo and later propagation checks pass.
Full frontend: 1539 tests, 9312 assertions, including 39 generated replays.
Common JVM: 1851 tests, 30684 assertions; JS: 1782 tests, 29308 assertions.
Backend: 1610 tests, 8104 assertions; exporter: 14 tests, 32 assertions.
Plugin: 68 cases. Lint, formatting and unchanged goldens pass.

AI-assisted-by: GPT-6
2026-11-10 20:21:33 +01:00
alonso.torres
a25afbe2d6 🚧 Save Phase 4 random harness and grid fixes in progress
Save Stage 2 structure, text, geometry and layout generation, independent
oracle checks, frontend seeded replay and plugin visible-value checks.
Include pending grid sync and deletion fixes with focused regressions.

WIP validation: component sync 21 tests / 106 assertions; move shapes
6 tests / 33 assertions. Earlier plugin checks passed 68 full cases,
11 unit tests and types. The final generated replay, golden check,
5000-case gate, full suites and live WASM check remain unfinished.
Stages 3 (swaps/variants) and 4 (library files) have not started.

F124 benchmark ratios against Phase 1e: main 10/100/1000 copies
0.48/0.52/0.54; three levels 0.53; chain 0.56; library 0.52;
many shapes 0.42; variant switch 0.64. No regression flag.
The F125 deletion change still needs its final benchmark.

Save the detailed resume checklist and logs in the local stabilization
plan. Keep that workflow document out of the commit.

AI-assisted-by: GPT-6
2026-11-10 20:21:17 +01:00