📎 Pin the deferred F408 and F414 programs as tests

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
This commit is contained in:
alonso.torres 2026-11-13 15:49:42 +01:00
parent 9943472e86
commit f924b93a82
2 changed files with 19 additions and 12 deletions

View File

@ -814,18 +814,13 @@
(n/edit-grid target :cell (assoc (select-keys cell [:row :column]) :props props)))
(:transform :library-transform) (let [action (nth [:move :width :height :rotate :flip-x :flip-y]
(mod (or (nth tuple 2 nil) 0) 6))
value (or (nth tuple 3 nil) 0)
shape (:shape selected)]
;; resizing a copy bool stays out until its
;; stored orientation is reliable (F518)
(when-not (and (#{:width :height} action)
(= :bool (:type shape)) (:shape-ref shape))
(n/transform-shape target action
(case action
:move [(* 5 (inc (mod value 4))) (* -3 (inc (mod value 3)))]
(:width :height) (+ 80 (* 20 (mod value 6)))
:rotate (* 45 (inc (mod value 4)))
nil))))
value (or (nth tuple 3 nil) 0)]
(n/transform-shape target action
(case action
:move [(* 5 (inc (mod value 4))) (* -3 (inc (mod value 3)))]
(:width :height) (+ 80 (* 20 (mod value 6)))
:rotate (* 45 (inc (mod value 4)))
nil)))
:library-edit (n/change-property target property value)
:library-add-child (n/add-child target (keyword (str "library-generated-" (count (:applied situation))))
:width 20 :height 20 :x 10 :y 10)

View File

@ -2612,6 +2612,18 @@
[:rotate 23 0 0 0] [:style 26 29 1] [:combine 25 0 0 0] [:variant-property 0 0 0 0]
[:switch 16]]}))))
(t/deftest a-flipped-turned-copy-switches-without-losing-its-geometry
(t/is (map? (cg/run {:world [2 2 {:variants true :text-styles true :layout nil :variant-diff false
:layout-item-margins false :grid-square false :rich-variants true
:layout-children false :grid-empty false :layout-copies true :text true}]
:ops [[:transform 0 4 0 17] [:rotate 0 0 0 0] [:switch 0]]}))))
(t/deftest a-turned-pushed-copy-made-a-variant-keeps-a-valid-file
(t/is (map? (cg/run {:world [3 2 {:variants true :text-styles true :layout nil :variant-diff false
:layout-item-margins false :grid-square false :rich-variants true
:layout-children false :grid-empty false :layout-copies true :text true}]
:ops [[:rotate 7 0 0 0] [:update-main 0 0 0 0] [:make-variant 19 0 0 0] [:style 0 29 4 0]]}))))
(t/deftest settling-a-bool-in-a-grid-copy-twice-keeps-its-shapes-in-place
(t/is (map? (cg/run {:world [3 0 {:variants true :rich-variants true :text true :layout :grid
:layout-copies true :layout-children true}]