Record the random tree's padding nodes and span add/remove scenarios

This commit is contained in:
iris-ai committed 2026-09-14 13:48:53 -04:00
1 parent e442481a30
commit d5486b124a
1 file changed
+19 -7
+19 -7
View File
@@ -9,7 +9,7 @@ Canonical `main` is **`ca2b4b2`** (#17, the headless rig). Sixteen slices are
in; #16's size work and #17's rig both merged on 2026-09-14. in; #16's size work and #17's rig both merged on 2026-09-14.
**#18 `split/18-position-chain`** is open, worktree `/home/bob/repos/iris-pr18`, **#18 `split/18-position-chain`** is open, worktree `/home/bob/repos/iris-pr18`,
head `2272634`, ten commits. LAYOUT.md §2's O(1) subtree movement, the head `4178dfb`, eleven commits. LAYOUT.md §2's O(1) subtree movement, the
`Remap` retirement, and then the three changes the owner chose on 2026-09-14: `Remap` retirement, and then the three changes the owner chose on 2026-09-14:
the slot carries a box, slots are opt-in, and a widget's region is held in the the slot carries a box, slots are opt-in, and a widget's region is held in the
coordinates of the slot it draws in. coordinates of the slot it draws in.
@@ -91,12 +91,24 @@ A live resize does land where a cold start does, byte for byte, on `tabs` and
compositor and a single output, so two at once resize each other's window and compositor and a single output, so two at once resize each other's window and
screenshot the wrong thing. screenshot the wrong thing.
**Rigs added.** `iris::random` grows the tree (spans in every direction, **Rigs added.** `iris::random` grows a seeded tree -- spans in every direction
stacks, rects with varying opacity, text wrapping and overflowing, a declared holding two to four children, stacks, padding with each of its four sides its
size over half of it, stopping at a depth), `examples/random.rs` draws one -- own number, rects with varying opacity, text both wrapping and overflowing, a
`IRIS_SEED` and `IRIS_DEPTH` pick it -- and `tests/generated.rs` compares warm declared size over half of it, stopping at a depth. `examples/random.rs` draws
against cold under a size change, a resize, and both. It found the one (`IRIS_SEED`, `IRIS_DEPTH`), and `tests/generated.rs` grows each seed twice
non-terminating marking above immediately. -- once and then changed, once with the change built in -- and compares every
widget's box. Eight scenarios: a size change, a resize, both, and five ways of
changing what a span holds (every other child out, all but the first out,
three on at once, the first out and three on, one out of the middle and one on
the end). The ignored sweep is 100 seeds across all eight, 800 comparisons.
Two things it needs that are easy to get wrong. Three spare leaves are grown
beside every span whether they end up in it or not, and detached children are
held until the comparison is over: a tree that makes fewer widgets, or frees
one whose id is then handed to the next, stops lining up index for index and
every comparison after the first difference is against the wrong widget. And
each shuffle asserts the tree actually changed before comparing, so a case
that quietly did nothing fails rather than passes.
### The plan after #18, agreed with the owner on 2026-09-14 ### The plan after #18, agreed with the owner on 2026-09-14