24614 Commits

Author SHA1 Message Date
alonso.torres
4f6c8e7932 🐛 Place reset replacement children in the main frame
Reset clears the parent's geometry override, but replacing a swapped
child cloned its new children through the parent's old rotation. Drop
that override from the whole sync context so existing and new children
use the main's orientation in the same undo group.

F185: portable checks at 45 and 90 degrees fail six assertions before the
fix and pass all fourteen after it. Original and shrunk programs pass.
The focused suite passes 139 tests / 2590 assertions with unchanged goldens.
Live WASM checks reset placement, exact undo/redo, later sync and no
phantom overrides at both angles. Frontend passes 1538 tests / 9253
assertions; plugin 68 cases, lint/format and isolated Stage 3 checks pass.
Common JVM/JS, backend and exporter suites pass.

Phase 1e benchmark ratios: mains 10/100/1000 .50/.55/.57, levels .50,
chain .50, library .52, many shapes .42, variant switch .60.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
30c833d2e3 🐛 Sync restored components after variant name changes
Restoring a variant whose container has gone converts its variant value
into its main name. Report the restored component id to the normal sync
cascade: its main is absent from the old page objects, so ordinary shape
change detection misses it. Copies receive the new name in the restore's
undo group, while authored name overrides remain intact.

F183: the portable regression fails one assertion before the fix and
passes all six after it. Original and shrunk programs pass. The focused
suite passes 138 tests / 2576 assertions with unchanged goldens. Live
WASM checks direct, nested and indirect copies, custom names and undo/redo.
Frontend passes 1536 tests / 9179 assertions; plugin 68 cases, lint and
formatting pass. The isolated Stage 3 check passes 53 tests / 373 assertions.
Common JVM/JS, backend and exporter suites pass.

Phase 1e benchmark ratios: mains 10/100/1000 .50/.56/.57, levels .51,
chain .51, library .52, many shapes .50, variant switch .62.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
b6de2582b1 🐛 Settle swapped placement when a parent turns
A swapped head can inherit a position frame with a different size from
its content. Turning its parent then leaves the head and child away from
the placement that full sync computes. Settle that derived placement in
the primary transform builder for SVG, WASM and shared test operations.
Preserve authored geometry and keep the correction in the same undo group.

F182: portable regression fails four assertions before the fix and passes
all twelve after it. The original and shrunk library programs pass. The
focused suite passes 137 tests / 2570 assertions with unchanged goldens.
Frontend passes 1535 tests / 9141 assertions; lint and formatting pass.
Live WASM checks at 45 and 90 degrees pass undo, redo and later sync.
Common JVM/JS, backend, exporter and all 68 plugin cases pass.

Phase 1e benchmark ratios: mains 10/100/1000 .49/.57/.61, levels .52,
chain .55, library .58, many shapes .59, variant switch .67.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
560208ce74 🐛 Refuse duplicates that expand component nesting loops
A finite repeated component tree can cut recursion with a swapped child.
Duplicating another child in its main opens an unblocked branch that sync
keeps expanding. Check component nesting against the actual destination
before generating duplicate changes, and keep safe shapes in mixed batches.
ALT duplication at the page root remains allowed.

Use the same eligibility in workspace duplication, pure nodes and generated
candidates. The portable regression fails three assertions before the fix
and passes all five afterward. The original library seed 712 case 1601
and its reduced switch/nest/duplicate program pass. Focused regression and
golden checks pass 123 tests, 2492 assertions; goldens are unchanged.
Live WASM verifies refusal, ALT duplication, undo/redo and later stable sync.

Component benchmark ratios: mains 0.47/0.55/0.55; levels 0.51;
chain 0.53; library 0.58; many shapes 0.52; variant switch 0.74.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
58e23f3f2c 🐛 Carry variant overrides through deleted near mains
Copies still use stored main data after its component is deleted. Follow
that data both when collecting inherited groups and when matching variant
children, so a switch keeps inherited size, orientation and child fills.

Portable live/deleted controls fail four assertions before the fix and
pass all 16 afterward, including repeat sync and exact undo. Library
seed 712 case 1462 and its 12-step shrink both pass. Focused regression
and golden checks pass 148 tests, 2593 assertions; goldens are unchanged.
Live WASM verifies height 80, rotation 45, child fill, groups, undo/redo
and later main opacity propagation.

Component benchmark ratios: mains 0.51/0.58/0.56; levels 0.50;
chain 0.51; library 0.59; many shapes 0.48; variant switch 0.71.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
fcab7a85d1 🐛 Carry child geometry through parent rotations received by sync
When sync turns a parent, turn its subtree as derived placement before
walking the children. Geometry overrides keep their size and relative
angle, including swapped children. Read current builder objects throughout
the walk so later syncs do not transform stale records again.

Normalize matrix axis directions for this turn: constraints already handle
resize, and minimum-size matrix scale must not resize children twice.

Portable regression fails for ordinary and swapped geometry overrides.
Expanded controls cover parent turns of 45/135 degrees and authored child
angles of 0/10 degrees, points, flags, retained size, repeat sync and undo.
Broad focused/golden checks: 204 tests, 2314 assertions. Latest controls
and shrunk program: 2 tests, 89 assertions. Goldens remain unchanged.
Initialize the container when direct sync receives an empty builder.
Register the geometry namespace in the JavaScript runner and read record
fields with get in the older flip control. Geometry: 9 tests, 149
assertions on both runtimes. Full common JS: 1768 tests, 29215 assertions.
Full frontend: 1532 tests, 9039 assertions. Lint and formatting pass.
Live WASM verifies both roles, retained placement and later style sync.

Component benchmark ratios: mains 0.51/0.56/0.64; levels 0.62;
chain 0.55; library 0.53; many shapes 0.45; variant switch 0.60.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
1b54d036ee 🐛 Restore existing component nesting when undoing a move
Sync and swapped children can leave finite repeated component nesting.
Moving a copy out succeeds, but undo rejects its old position under the
normal component-loop guard. Record restore-component-nesting only on
inverses whose original position already repeats a component.

Normal forward moves retain that guard. The applier still rejects physical
object-tree cycles and changes to copy structure. The new optional change
field defaults to the current behavior and changes no stored shape data.

Portable regression: exact undo fails before the fix. Five assertions now
pass, including redo, normal loop refusal and object-cycle refusal using
the generated inverse. Focused JVM and golden checks: 195 tests, 2189
assertions. Both original shrunk programs pass. Live WASM undo/redo restores
complete snapshots. Common/frontend lint and formatting pass.

Component benchmark ratios: mains 0.57/0.62/0.67; levels 0.80;
chain 0.82; library 0.56; many shapes 0.55; variant switch 0.91.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
76b4d69114 🐛 Sync content from the restored position after a swap back
A swap back relinks to its near position and clears the swap marker.
Sync through the enclosing copy that owns those refs so its content
overrides reach the restored head and children. Keep carried overrides
and unrelated sibling overrides intact.

Portable regression: three failures before the fix, then all assertions
pass, including exact undo. Focused JVM and golden checks: 183 tests,
2143 assertions. The original and newly shrunk library programs pass.
Live WASM verifies plain and variant swaps, later propagation, carried
opacity and an unrelated sibling override. Common/frontend lint and fmt pass.

Component benchmark ratios: mains 0.61/0.80/0.85; levels 0.71;
chain 0.73; library 0.52; many shapes 0.53; variant switch 0.62.
All worlds pass the unchanged baseline gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
3452946a93 ✨ Extend generated component checks to structure and geometry
Cover text, layouts, nesting, duplication and transforms with independent
geometry and override predictions. Compare raw design geometry within a
pixel tolerance and keep exact undo snapshots. Add corrupt-state controls
and replay shrunk programs through the async frontend.

Route pure-runner changes by file so later library scenarios can share
ordered sync and inverse changes. Refresh every frontend file on replay.

Final-generator MVP and structure gates each pass 5000 scenarios, seed712.
Isolated stage check: 40 tests, 156 assertions. The full working-tree
frontend run passes 1528 tests and 8877 assertions.
Existing golden changes record reviewed fixes; raw undo stays strict.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
0b625a9ab6 🐛 Keep orientation inherited from the old variant on switch
A switch keeps the old root orientation even when its main supplied it.
Record that retained choice as geometry when it differs from the new
expected placement. Continue inheriting placement from enclosing copies
when the switch carries no root geometry override.

Portable regression: three failures before the fix; now passes through
full sync. Focused JVM checks: 182 tests, 2137 assertions. Existing goldens
match. Full frontend: 1528 tests, 8877 assertions. Live WASM passes.

Component benchmark ratios: mains 0.58/0.57/0.60; levels 0.49;
chain 0.50; library 0.60; many shapes 0.46; variant switch 0.65.
All worlds pass with task stress JVMs paused. An earlier run during
concurrent JVM startup exceeded the timing gate; the baseline is unchanged.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
dca1b16636 🐛 Author pushed content against its new nested reference
When a pushed swap takes a position with the same component, preserve
content differences as overrides on the promoted head and descendants.
The source copy clears its overrides and follows the promoted subtree.

Portable regression: three failures before the fix; now passes, including
full sync and exact undo. Focused JVM suites: 121 tests, 638 assertions.

Component benchmark ratios: mains 0.61/0.78/0.69; levels 0.53;
chain 0.50; library 0.56; many shapes 0.75; variant switch 0.61.
All worlds pass the baseline performance gate.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
2f96cd97f7 🐛 Compare pushed swaps against the updated parent frame
Use the parent's pushed geometry when deciding whether a promoted swap
needs an orientation override. Its original container still has the old
rotation, which can create a phantom geometry group during update-main
of a rotated parent (F172).

The portable regression fails its touched assertion before the fix. All
54 swap tests pass 214 assertions, the library-308 shrink passes, and the
pure golden master matches 1149 assertions without recording. Common and
frontend lint and format pass.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.49/0.58/0.59,
three levels 0.54, chain 0.52, library 0.56, many shapes 0.48, variant
switch 0.63. No regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
7ab78a4b48 🐛 Replay rotation nodes as relative turns in the frontend
Pass delta? to increase-rotation when interpreting a Rotate node. Common
turns by the node's angle; the event default instead sets an absolute
rotation, so a 45-degree turn followed by 90 degrees ended at 90 (F171).

The standalone async regression fails before the fix. The full frontend
suite passes 1524 tests and 8683 assertions, including generated replay,
undo checks and existing goldens without recording. Lint and format pass.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
524bc6a5ab 🐛 Compose child flip flags through parent placement
Keep the source and parent-frame flip composition when placing component
content through a rotated parent. A fresh large matrix turn can otherwise
set both child flip flags even though the user only rotated (F170).
Preserve nil/false representation when the parent does not flip an axis.

The portable regression fails two flag assertions before the fix. Eight
geometry tests pass 61 assertions, the original library shrink passes, and
the pure golden master matches all 1149 assertions without recording.
Common and frontend lint and format pass.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.58/0.74/0.57,
three levels 0.49, chain 0.49, library 0.52, many shapes 0.47, variant
switch 0.61. No regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
bb4d4f3570 🐛 Handle empty flex layouts when calculating line positions
Skip per-line stretch division and baseline placement when a flex layout
has no lines. Removing a component's final child then resizing a copy
could divide by zero on the JVM (F169).

The public layout regression fails four assertions before the fix. It
covers row and column layouts with six content alignments. Fresh flex,
swap and variant suites pass 125 tests and 596 assertions, and the shrunk
structure program passes. Pure goldens match all 1149 assertions.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
607e969574 🐛 Keep inherited orientation when pushing a swapped child
When update-main turns a swap into a plain nested copy, retain its
orientation as a geometry override if it differs from its own component's
expected parent placement. Otherwise a later full sync discards the
rotation inherited from the replaced position (F168).

The portable regression fails three assertions before the fix. Both
0-degree and 45-degree cases now pass, including exact undo. Fresh swap,
variant and flex suites pass 125 tests and 596 assertions. The pure golden
master matches all 1149 assertions without recording.

Benchmark ratios against Phase 1e: main 10/100/1000 copies 0.52/0.62/0.56,
three levels 0.48, chain 0.56, library 0.51, many shapes 0.43, variant
switch 0.60. No regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
34c6c798b8 🐛 Stop inherited content overrides at swapped references
Walk content refs through intermediate swapped heads when collecting
inherited touched groups. Following the replaced position instead crosses
into another component and gives copies phantom geometry overrides (F165).
Position advancement keeps its separate position-ref walk.

A portable three-level regression fails both chain and touched assertions
before the fix. Swap-group, file and variant suites pass 124 tests and
588 assertions; the shrunk library seed-712 program passes as well.
Common lint and format pass.

Benchmark lower-quantile ratios against Phase 1e: main 10/100/1000 copies
0.48/0.55/0.57, three levels 0.48, chain 0.47, library 0.49, many shapes
0.46, variant switch 0.57. No regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
957a7fada8 🐛 Run all registered common JavaScript test namespaces
Include the generated and oracle component tests, remote-sync regressions,
and schema-check tests in the execution list, as well as the requires.
Previously full JS runs silently skipped them and focused runs rejected
these namespaces as unknown (F166).

The focused generated command reproduces the registration failure before
the change. The registered full JS run passes 1733 tests and 29293
assertions with 100 scenarios per property, seed 712.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
a86cd5f076 🐛 Place children after carrying variant geometry overrides
A switch can retain the copy root's resized geometry while leaving its
untouched children in the old frame. After geometry carry, sync the new
subtree from the updated builder objects so constraints place its children
without adding overrides. Reuse the direct component sync entry point.

The portable rotated-root regression fails before the fix with a 30px
child offset. Swap and variant suites pass 108 tests / 539 assertions;
the pure golden master matches 1149 assertions unchanged. Full frontend:
1517 tests / 8436 assertions. Live ws1 WASM retains the resized root and
child placement, with no exception or pending reflow.

Benchmark ratios: main 10/100/1000 copies 0.48/0.56/0.57;
three levels 0.49; chain 0.48; library 0.50; many shapes 0.45;
variant switch 0.61. No slowdown flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
70aa539efe 🐛 Preserve resize overrides across rotated variant switches
A clean target can acquire tiny size drift while taking the old copy's
rotation. Exact main-size comparisons then discard a valid resize.
Compare geometry with its float tolerance, including fixed layout sizes
and composite bounds; keep nongeometry values exact.

The portable rotation/resize regression fails both height and selrect
checks before the fix. Cover ordinary and fixed layout sizing, and
check child placement from the original library shrink separately.
The full variant suite passes on JVM and JS: 56 tests / 337 assertions.

Benchmark lower-quantile ratios against the Phase 1e baseline:
main 10/100/1000 copies 0.52/0.60/0.60; three levels 0.51;
chain 0.52; library 0.54; many shapes 0.46; variant switch 0.65.
No slowdown flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
c19572b736 🐛 Restore sibling order when undoing component child removals
Bulk removal inverses move siblings back in original order. Component
sync records each removal's current index; inverse sync falls back to
the original main container when the builder lacks it (F158).

A six-permutation deletion test and a main-swap sync test fail before the
fix. Focused suites pass 70 tests and 242 assertions; two inverse-sync
regressions also pass. Common lint and format pass. The controlled
benchmark has no flags: mains 0.51/0.59/0.58; levels 0.54; chain 0.58;
library 0.55; many shapes 0.51; switch 0.63. The first measurement under
concurrent stress load flagged main-100 at 1.17 and was rerun in isolation.

AI-assisted-by: GPT-6
2026-10-30 09:50:18 +01:00
alonso.torres
e7e4fc6274 🐛 Restore parent sync state when undoing child structure edits
Add, remove and move inverses restore the copy parent's remote-synced
flag with its touched groups. Swapping a child clears that flag during
delete; undo must restore the original parent state (F157).

Swap and add/remove regressions fail before the change. The focused swap
suite passes 49 tests and 191 assertions; common lint and format pass.
Benchmark ratios: mains 0.49/0.57/0.62; levels 0.53; chain 0.57; library
0.69; many shapes 0.62; switch 0.62, no regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
d40a652c26 🐛 Remove the empty override field after clearing a swap
When removing the last swap group, drop touched instead of retaining an
empty set. A main clone then uses the same representation as set-touched;
a later move and undo can restore its exact prior state (F156).

The unit and move regressions fail before the change. The swap suite and
original shrunk program pass 48 tests and 184 assertions. Common lint and
format pass. Benchmark ratios: mains 0.49/0.56/0.79; levels 0.66; chain
0.82; library 0.78; many shapes 0.92; switch 1.02, no regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
6e1ee1fe9a 🐛 Keep inherited placement untouched during a plain swap
Compare retained orientation with the position source in copy-parent
coordinates, including cached deleted mains. A rotation inherited from
that source does not author a geometry override (F154).

The focused regression fails before the change. Swap and variant suites
pass 100 tests and 510 assertions; common lint and format pass. Benchmark
ratios: mains 0.47/0.53/0.55; levels 0.51; chain 0.64; library 0.64;
many shapes 0.96; switch 0.68, with no regression flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
84a0e6a94c 🐛 Keep update-main and deferred text sync in one undo group
Use the same explicit group for inverse sync and every copy sync. Text
reflow can finish after the update transaction closes; one undo must still
restore the main, its copies and the source overrides together (F152).

The five-operation text regression fails before this change. All 12
frontend generated replays pass: 865 assertions. Common and frontend lint
and format pass. Shared benchmark ratios: mains 0.47/0.53/0.55; levels
0.51; chain 0.64; library 0.64; many shapes 0.96; switch 0.68, no flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
e18e8d70f1 🐛 Remove invalid swaps when a main detaches a nested head
A swapped copy must follow structural changes when its position ceases
to be a component head. Walk that shape normally during sync, remove
its component metadata and swap group, and replace its former component
children with the detached main shape's children.

The regression fails three assertions before the fix. The swap suite
passes 44 tests and 177 assertions, including exact undo. The shrunk
generated detach scenario also passes with its structural model update.

Benchmark vs Phase 1e: main 10/100/1000 0.50/0.57/0.64; levels 0.52;
chain 0.52; library 0.60; many shapes 0.55; switch 0.65. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
a481184c6d 🐛 Clear source overrides after pushing a swapped subtree
When update-main clones a swapped subtree into the main, the new main
owns its authored groups. Clear those groups from every source shape
when relinking it to the clone, instead of clearing only swap-group.

The regression fails on retained source flags before the fix. All five
assertions now pass, including retained geometry and opacity values,
new-main groups and exact undo. The swap suite passes 43 tests and 173
assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.57/0.65/0.73; levels 0.59;
chain 0.59; library 0.61; many shapes 0.65; switch 0.68. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
60db04f42b 🐛 Keep inherited root orientation through a variant switch
Use the root's effective touched groups after the reference-chain merge
when preserving its orientation. A near main may author the rotation
while the selected copy remains untouched. Checking only the selected
shape drops that inherited override during the switch.

The portable regression fails before the fix and passes four assertions
afterwards. Focused swap and generated checks pass 42 tests and 165
assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.56/0.58/0.67; levels 0.61;
chain 0.57; library 0.53; many shapes 0.69; switch 0.70. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
c6c105210c 🐛 Keep authored root orientation as a switch override
A switch places the new root in the old orientation before carrying
attributes. When rotation is already equal, the carry step emits no
write and drops its geometry group. Preserve that group for retained
authored root orientation so later sync keeps the visible result.

Extend the rotation regression to check touched and later sync: two
assertions fail before the fix. Focused checks pass 43 tests and 166
assertions, including the two previously shrunk generated regressions.

Benchmark vs Phase 1e: main 10/100/1000 0.64/0.65/0.97; levels 0.49;
chain 0.59; library 0.58; many shapes 0.89; switch 0.60. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
1579271d7e 🐛 Keep a plain swap's inherited orientation through sync
A plain swap also retains orientation inherited from its old component.
Record that retained orientation as geometry when it differs from the
new component's expected placement. Parent-derived orientation stays
untouched and size-only overrides still clear.

The regression fails before the fix. The swap suite passes 41 tests /
162 assertions; the seeded MVP property also passes 100 scenarios.

Benchmark vs Phase 1e: main 10/100/1000 0.54/0.57/0.66; levels 0.60;
chain 0.62; library 0.67; many shapes 0.83; switch 0.77. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
f1b180a634 🐛 Preserve swapped placement when its content main rotates
Prepare the content subtree in the swapped head's orientation before
syncing it. A content main rotation must not replace the orientation of
the position this head occupies in its enclosing component.

The focused regression fails two assertions before the fix. Geometry,
reset, swap and oracle suites pass 77 tests / 312 assertions. The original
generated failure also passes after the fix.

Benchmark vs Phase 1e: main 10/100/1000 0.51/0.57/0.57; levels 0.49;
chain 0.49; library 0.54; many shapes 0.72; switch 0.64. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
fc75575528 🐛 Order grid children when adding a shape
Record grid children in cell order before asynchronous reflow. This
keeps changes and their undo independent of the reflow schedule.

Red child-order regression reproduced. Focused geometry, reset, swap
and runner suites pass 121 tests / 540 assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.51/0.64/0.65; levels 0.50;
chain 0.57; library 0.53; many shapes 0.47; switch 0.59. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
a8f20d40b6 🐛 Keep parent orientation when resetting a nested copy
Resetting a selected nested copy must compose its parent placement even
when that parent remains a component copy.

Red regression reproduced; reset suite passes 16 tests / 63 assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.51/0.64/0.65; levels 0.50;
chain 0.57; library 0.53; many shapes 0.47; switch 0.59. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
8e18c62860 🐛 Ignore dot product roundoff when detecting shape flips
A right-angle turn can produce a tiny negative dot product. Compare it
relative to the axis lengths before treating the turn as a reflection.

Red regression reproduced at small, normal and large sizes. Focused
geometry, reset, swap and runner suites pass 121 tests / 540 assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.51/0.64/0.65; levels 0.50;
chain 0.57; library 0.53; many shapes 0.47; switch 0.59. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
8f9c8897e7 🐛 Keep authored rotation through a plain component swap
Retain geometry touched when a plain swap keeps authored orientation,
so a later sync preserves it. Size-only and content overrides still clear.

Red regression reproduced; swap suite passes 39 tests / 154 assertions.

Benchmark vs Phase 1e: main 10/100/1000 0.51/0.64/0.65; levels 0.50;
chain 0.57; library 0.53; many shapes 0.47; switch 0.59. No flags.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
811a60d355 🔧 Allow machine precision geometry noise in composable undo checks
Keep snapshots exact and compare only shape geometry within an absolute
1e-10 tolerance. Reflow recomputed 0.01 as 0.010000000000005116 after undo.
Opacity, touched groups and other authored fields still compare exactly.
Fix the false positive F130 and document the narrow exception.

The regression failed before the fix. Focused comparison and structural
undo checks pass 2 tests with 9 assertions, including negative controls.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
9ef99672b4 🐛 Compose child flip flags from the roots during geometry sync
Keep the roots' relative flip state when placing the source subtree.
Several small rotations must give the same child flags after a full sync;
recomputing one large turn could toggle both axes. Fix F139.

The direct regression failed nil/nil to true/true before the fix. Focused
geometry and oracle suites pass 20 tests, 88 assertions.
Benchmark ratios against Phase 1e: main 10/100/1000 0.57/0.64/0.60;
three levels 0.67; chain 0.56; library 0.60; many shapes 0.50;
variant switch 0.64. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
20343e1c8b 🐛 Record user undo changes before starting derived component sync
Hand applied transitions to the component watcher only after the workspace
records their undo entry. Keep the handoff synchronous with the captured
prior file data. This preserves transaction order when nesting triggers
several component syncs. Fix F137.

The minimal replay failed both undo and redo before the fix; its 4 checks
now pass. Existing sync scenarios pass their behavior and undo checks;
60 golden digests need review for the accumulated Phase 4 fixes.
Common benchmark ratios against Phase 1e: main 10/100/1000
0.46/0.52/0.53; levels 0.47; chain 0.51; library 0.51; many 0.49;
switch 0.61. This handoff changes no common benchmark code.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
b38290aa62 🐛 Queue moved component copies before syncing their new dependents
A copy moved from a rotated parent can need its own component's sync even
when that main did not change. Include the moved heads among the sync
inputs so the new parent's copies receive the settled geometry. Fix F135.

The minimal regression failed before the fix. Geometry suite: 6 tests,
55 assertions, green; the shrunk seed 712 case also passes.
Benchmark ratios against Phase 1e: main 10/100/1000 0.46/0.52/0.53;
three levels 0.47; chain 0.51; library 0.51; many shapes 0.49;
variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
679c247f74 🐛 Preserve remote sync state in inverse child add and delete changes
Make structural inverses ignore touched so undoing derived propagation
keeps the parent's remote-synced flag. Fix F132.

Both add and delete regressions pass exact undo/redo comparisons. Runner
suite: 43 tests, 107 assertions, all green.
Benchmark ratios against Phase 1e: main 10/100/1000 0.46/0.52/0.53;
three levels 0.47; chain 0.51; library 0.51; many shapes 0.49;
variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
b0f2489696 🐛 Remap nested grid reset cells through their near-main references
Use each paired child's shape-ref directly. Resolving it through its own
component can select a different nesting level and move the child into an
earlier auto cell. Fix F134.

The regression moved column 2 to column 1 before the fix; all 3 assertions
now pass. Benchmark ratios against Phase 1e: main 10/100/1000
0.46/0.52/0.53; three levels 0.47; chain 0.51; library 0.51;
many shapes 0.49; variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
0d255f3f40 🐛 Keep nested copies in a detached parent's orientation during sync
Express the source subtree in its ordinary parent's orientation before
syncing a surviving nested copy. Detaching a rotated outer instance no
longer makes a later main edit turn the nested copy back. Fix F131.

The focused regression failed on points and rotation before the fix.
Geometry/reset suites: 19 tests, 111 assertions, all green.
Benchmark ratios against Phase 1e: main 10/100/1000 0.46/0.52/0.53;
three levels 0.47; chain 0.51; library 0.51; many shapes 0.49;
variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
f96e9a1539 🐛 Normalize newly allocated grid cells in the same assignment pass
Assign positions after adding overflow cells so a second assignment leaves
the grid unchanged. This keeps main and copy cell metadata in agreement.
Fix F129. The red regression now passes; layout suite: 60 tests, 344 asserts.

Benchmark ratios against Phase 1e: main 10/100/1000 0.46/0.52/0.53;
three levels 0.47; chain 0.51; library 0.51; many shapes 0.49;
variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
e610caddc6 🐛 Preserve untouched parent grid cells during component swaps
Restore the original cell metadata after replacing a child in place, and
ignore touched while assigning the new instance. Later main cell moves
can then reach the swapped copy. Fix F128.

The regression failed before the fix. Swap suite: 37 tests, 137 assertions.
Benchmark ratios against Phase 1e: main 10/100/1000 0.46/0.52/0.53;
three levels 0.47; chain 0.51; library 0.51; many shapes 0.49;
variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
fd5e7cad6e 🐛 Clear source grid cells when relocating children
Recalculate cell positions in the previous grids after moving children.
The destination update alone left cell references to shapes that moved.

Validation: reset and move suites, 21 tests / 92 assertions. The grid
move regression failed before the fix and checks exact undo.

Benchmark ratios against Phase 1e: main 10/100/1000 copies
0.54/0.56/0.60; three levels 0.52; chain 0.52; library 0.55;
many shapes 0.58; variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
c954a7fa2a 🐛 Resolve deleted near mains when resetting nested copies
Include cached deleted mains when resolving the position of a nested
copy. Reset previously passed nil to container lookup and threw.

Validation: reset and move suites, 21 tests / 92 assertions. The new
reset regression failed before the fix and checks undo and redo.

Benchmark ratios against Phase 1e: main 10/100/1000 copies
0.54/0.56/0.60; three levels 0.52; chain 0.52; library 0.55;
many shapes 0.58; variant switch 0.61. No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
4d7c802ff2 🚧 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-10-30 09:50:08 +01:00
alonso.torres
705dbd296e 🐛 Match component orientation with its relative transform
Apply the relative orientation matrix directly. Large rotations also
change flip flags, so applying flips before rotation can add 180 degrees.
The text regression fails before this fix at 135 and 225 degrees.

Validation: geometry suite, 4 tests / 50 assertions; existing golden
cases and worlds, 1098 assertions. No existing golden digest changed.

Benchmark lower-quantile ratios against Phase 1e:
main 10/100/1000 copies 0.51/0.59/0.58; three levels 0.53;
chain 0.61; library 0.53; many shapes 0.54; variant switch 0.70.
No regression flag.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
4f7e9f7e19 🐛 Accept zero and negative property-test environment seeds
Require an integer seed while retaining positive counts. Seed zero is a
valid test.check replay seed and must behave like the explicit option.

Validation: PENPOT_GEN_SEED=0 schema and runner suites pass,
44 tests / 119 assertions. The regression failed before the fix.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00
alonso.torres
72b4d1fb24 🐛 Keep missing-shape diagnostics readable with mixed labels
Sort labels by their printed value so keyword and fallback string labels
can appear in the same diagnostic. The failing regression now passes.

Validation: schema and runner suites, 44 tests / 119 assertions.

AI-assisted-by: GPT-6
2026-10-30 09:50:08 +01:00