Chapter 31: Iron gates, bicycles and a lifting bridge Frozen 21 October 2026 at 01:11 BST (game main at 214f068). Line numbers refer to the frozen copies in research/update-2026-10-21-R5d/ (visual-handoff-full-at-freeze.md, decor-owner-decisions.md). Covers Decor R6a tray groups (13 October), stage R2 Ironwork (R2a, R2b, R2c and the stage close, 13 October), stage R3 Street life (R3a, R3b, R3c, the stage close and milestone M-R2, 13 October), the bike look fix BK1 (14 October) and stage R4 Waterside (R4a, R4b, R4c and the stage close, 13 and 14 October), with the owner answers and the orchestrator rulings of 13 and 14 October. Excerpts are given in the order of the work. Status was checked against docs/decor-orchestration-handoff.md (frozen copy, not quoted). Local Trash folders are given as "the macOS Trash". SOURCE: docs/visual-handoff.md (frozen 21 October 2026), lines 1882-1976 (Decor R6a Tray groups, type-to-filter, recents) 1882: **Decor R6a Tray groups, type-to-filter, recents (13 October 2026):** Opus 5.5 ran this on the Mac, 01:21-02:01 (docs/decor-controls-ui-plan.md part "R6a", stage R6 UI, step `34-R6`, part a; the overnight run). The part tray now draws group headers, filters by typing, and shows the last six kinds placed. Every card has a `group`, and the Details and Garden trays draw a small Silkscreen header over each group in one flow. With the tray open, letters filter every card by title. A Recent row of the last six kinds placed sits in the tray's title line and is kept in `preferences.cfg`. Save format unchanged (version 2): `group` is catalog data, not scene data, so no save-format stop. Snapshot: `build/backup-feel/34-R6/` (= HEAD 26d1d02, `a/head.txt`); live = snapshot at start (`a/diff-live-vs-pre-at-start.txt` empty). Evidence: `artifacts/decor/34-R6/a/` (`a/` below). 1883: - **Files** (`a/part.diff`; backups in `a/backup/`; at the end only these differ from the snapshot, `a/diff-live-vs-pre-at-end.txt`): 1884: - `scripts/catalog_entry.gd`: `group` (optional, default empty). The unused `attachment`, `footprint` and `accent` fields are left alone. 1885: - `scripts/catalog_library.gd`: `group_order`. 1886: - `data/catalog.tres`: a group on all 44 cards, and the order list. 1887: - `scripts/editor_ui.gd`: 1888: - title line → `tray_title_row` (title, Recent label, chips); 1889: - flow in `tray_body` (top band); 1890: - `refresh_catalog` and `_grouped_entries`; 1891: - `_fit_tray`: grouped height, three rows at ≥1000 px; 1892: - `tray_key`, `set_tray_filter`, `_clear_filter`; 1893: - `set_recents`, `push_recent`, `_fit_recents`; 1894: - `_tray_runs`, `_tray_header_layout`, `tray_headers`, `_draw_tray_headers`; 1895: - `toast` and `gentle` leave the line to a live filter. 1896: - `scripts/main.gd`: 1897: - `ui.tray_key(event, selected_id != 0)` before the key match; 1898: - `note_recent` after a part, a freehand wall (stroke or circle) or a pipe is placed (moves and copies do not count); 1899: - recents read at start only when `prefs_live`; 1900: - capture flags `--tray`, `--recents=`, `--tray-filter=`. 1901: - `scripts/user_prefs.gd`: `recents(known)`, `set_recents`, `RECENTS_MAX` 6, under `("tray", "recents")`. 1902: - `tests/test_ui.gd`: `r6a_checks`. 1903: - **Groups.** 1904: - Details: Lighting (lantern, wall lantern, string lights); Signs (neon, wide neon, neon strip); Rooftop (antenna, flag, tank, chimney, ventilator); Services (pipe, ladder, cabinet, window, balcony, awning, **street bin**); Waterside (boat, quayside railing, mooring post). 1905: - Garden: Trees (3), Beds and pots (6), Furniture (5), Climbers and ironwork (vine, draping ivy, iron fence). 1906: - Architecture: Buildings (townhouse, tower) and Walls (stone wall, freehand wall). 1907: - Connections: one group (Crossings), so no header is drawn. Landscape keeps its flat tray. 1908: - **Planned group with no card today, not drawn: Street.** The bin sits in Services, because a one-card Street would break "every group has two cards". R3 moves it by setting one field. 1909: - The plan's other future kinds (hanging sign, A-board, fingerpost, weathervane, railing variants, buoy, pots, nets, quay steps) only need their `group` set. 1910: - A header goes on the group's first run of cards that has room for its words, otherwise on its first run. 1911: - A catalog with no groups keeps today's flat tray (test). 1912: - **Type to filter, and the shortcut-letter ruling (stop condition "report the options"):** 1913: - **Option 1, the plan's rule as written:** only V, R, G and D stay shortcuts. Then P with the tray open starts a filter instead of photo mode, which breaks R5a: 5 test_camera failures, "R5a setup: P enters photo mode with the house selected" and the 4 that follow from it. Reproduced in `a/probe/plan-keys-test_camera.log.out` (544 checks, 5 failures; tree `a/probe/plan-keys-tree`, `a/probe/plan-keys.diff`). 1914: - **Option 2, taken:** a letter that would act keeps acting until a filter is live. V, R, G, D, P and F always act, because each does something with or without a selection (F frames the town). H and L act only while a part is selected; without a selection they are no-ops, so then they start a filter. Every other letter starts the filter, and once it is live every letter, including R and P, is part of it. 1915: - **Option 3, not taken:** keep all eight letters as shortcuts. Then no filter could start with F, H, L or P (lantern, ladder, pipe, pot, fence and so on). 1916: - Matching is by title, case-insensitive, across every card in every category, including Landscape. Results are headed by category. Esc clears the filter; Backspace removes one letter, and taking it down to nothing clears it. Cmd/Ctrl keys never reach the filter. 1917: - The status line shows "Find: lan · Esc clears" and keeps it while the filter is live; other messages wait until it clears, but errors still show. The title reads "Find: lan". 1918: - Picking a card or a recent clears the filter and closes the tray. A filter with no match says so in the tray. 1919: - **Recents:** 1920: - Text chips in the title line (Pixelify 11, 15 px tall), so they cost no height. Each shows the kind's title, its tooltip is the card description, and a click chooses the kind. 1921: - Newest first, each kind once, at most six. The tray shows as many as fit beside the title and drops the oldest first. 1922: - Only an interactive session reads or writes the file. A hand-edited list keeps only known kinds, once each; a value that is not a list reads as none. 1923: - **Tests:** 1924: - Test-first on the unchanged code: test_ui **561 checks, 26 failures** (`a/testfirst/test_ui.log.out`). 1925: - After: test_ui **590/0**, test_camera 544/0, test_scene 1709/0 (`a/suites/`). 1926: - New checks: 1927: - every card has a group, in the plan's group; 1928: - every drawn group has two or more cards; 1929: - header texts and order, with no header clipped or drawn over a card, at 1100x700 and 1600x1000; 1930: - the title line and the recents row pass the P10r clipping helper; 1931: - the tray stays within 38% of the window height; 1932: - two whole rows and every card within one scroll at 1100x700; up to three rows at 1000 px tall; 1933: - no groups gives today's flat tray, 248 px; 1934: - one thumbnail render per kind; 1935: - R or Shift+R with the tray open and no filter turns the ghost (+/−45°); 1936: - "lan" leaves Stone island, Lantern and Wall lantern; 1937: - once a filter is live, R is a letter; Backspace and Esc behave as above; 1938: - P still enters photo mode, F starts no filter, H starts one only with nothing selected, L with a lantern selected links it; 1939: - filtering across categories ("boa" finds the boat); picking a match closes the tray; 1940: - recents follow placement, the file round-trip, the six cap, hand-edited lists, and a new editor showing the stored recents; 1941: - an automated run never writes the person's file. 1942: - **Full suite** (`a/suite/suite_all.out`; `tools/suite_all.sh` a, b, then `VERIFY_RES=2880x1800` v; AC, 80%, Low Power Mode 0): **48 suites, 27,200 checks, 0 failures** (R1d fix2 had 27,109; +91, all in test_ui 499 → 590). 1943: - `--verify` 2880x1800 exit 0 on try 1 (24 s), `PIXELPUNK_INTEGRATION []`. Its only ERROR is the inherited `terrain_flowers.svg`. 1944: - The known flake test_creature_reactions did not fire (rerun 6,871/0). The suite rewrote `artifacts/building-tools/tests.json` as every run does. 1945: - **Changed expectations (old → new):** 1946: - Plan test "'lan' leaves lantern, wall lantern and planter" → Lantern, Wall lantern, **Stone island**. The match is by title, as the plan's design says. Planter's title is "Flower box", so it does not match; Stone island's does. 1947: - Plan "shortcut letters V, R, G, D" → V, R, G, D, P, F, plus H and L while a part is selected (the ruling above). 1948: - Plan "three rows when the window is taller than 1000 px" → at least 1000 px (UI units), so 1600x1000 shows three. 1949: - Details tray at 1600x1000: 248 px with a scroll → 370 px, all 21 cards, no scroll. At 1100x700: 248 → 266 px (the 38% cap). 1950: - No existing assertion changed. 1951: - **Captures** (`a/capset.sh` / `a/caps.sh`, frozen clock, harbour-day and harbour-night, at 1100x700, 1600x1000 and 2880x1724; one sitting 01:40-01:47 in the order pre-1, post-1, pre-2 (pre-1 1100x700 at 01:40, then a live probe in `a/probe/cap1`, then pre-1 at the other sizes), every view on try 1; AC, 80%, LPM 0, load 2.4-3.1 in `cap/*/capture-meta.txt`): 1952: - States: `+details` (`--tool=lantern --tray`), `+garden` (`--tool=tree --tray`), `+land` (day), and in post-1 `+recents` (six) and `+filter` (`--tray-filter=lan`). 1953: - "Before" is `a/pre-tree` with a capture-only `--tray` patch (`a/pre-tree-capture-patch.diff`). In the unchanged code `--tool` closes the tray. 1954: - Sheets, all six looked at: `a/sheet/r6a--.png` (`a/sheet/README.txt`; pre/post Details, pre/post Garden, recents, filter). 1955: - Metrics (`a/metrics/cmp.txt`, `a/cmp.js`): 1956: - Noise pair pre-1/pre-2: editor.png 0.60-1.17% of pixels, courtyard.png 0.90-1.76%. 1957: - **courtyard.png pre → post: within noise** at >8 levels (0.22-0.37% against noise 0.24-0.35%). Any-difference is 0.86-2.25%, against noise up to 1.76%: night 1100x700 is 2.23/2.25% in both legs, but only 0.30/0.33% beyond 8 levels. 1958: - The Landscape tray's editor.png is unchanged (0.61-0.85% against noise 0.63-0.84%). 1959: - The Details and Garden editor.png change on 6.6-18.9% of pixels. 1960: - Draw calls and objects are identical in every view. 1961: - **Expected journey deltas: none.** The journey's editor.png runs with the tray closed, and courtyard.png does not change. 1962: - **Acceptance, measured:** 1963: - **A Details card reachable in at most one scroll at 1100x700: met.** The tray is 266 px tall, 4 card rows with 2 whole at scroll 0, a 216-px viewport, 428 px of content, and a largest scroll of 212 px (0.98 of a page) (`a/suites/test_ui.log.out`, "R6a note"). At 2880x1724: 3 rows, 2 shown. At 1600x1000: no scroll. The code before R6a also passed this check (`a/testfirst`). 1964: - **Thumbnail render count unchanged: met.** 44 renders for 44 kinds after opening every category, and still 44 after four filters and six recents (test). Recents are text, not renders. 1965: - **Review:** Opus 5.5 in a fresh context, 13 October 2026 02:01-02:05 (`a/review/`: run.sh, probe.gd, runs.txt): **verdict done, no must-fix.** Scope: only the seven expected files differ from `34-R6`. Keys: `tray_key` runs after `_photo_input` and returns false for V, R, G, D, P, F, for H and L with a selection, for any Cmd/Ctrl/Alt key, and for Esc, Backspace and Space while no filter is live; a focused LineEdit typed "xyrp" kept its text with the filter empty and photo mode off. Recents only after a finished placement, wall stroke or pipe (not moves, duplicates, undo, load or a cancelled adapt), capped at six, unknown kinds dropped. Capture flags read only inside the automation block (`main.gd:588`). Reviewer's own runs: test_ui 590/0, test_camera 544/0 with every R5a check passing; the tray numbers, the header clipping check (P10r helper) and 44 thumbnails for 44 kinds confirmed; suite after the last edit. Notes, carried to R6e (feedback polish): clicking the open category's button hides the tray with the filter still set (invisible; reopening clears it); Esc with a live filter clears the filter before main's Esc chain, so it would not cancel a grip drag typed over. Orchestrator rulings on the shortcut letters, the title match, three rows from 1000 px and the street bin are in owner-decisions.md (13 October). Orchestrator: closed 02:06. 1966: - **Not done, and why:** 1967: - The Street group waits for R3, as above. 1968: - Space joins a live filter only if a focused button has not taken it as ui_accept first. 1969: - Letters are read from `keycode`/`unicode` (layout-dependent like every shortcut until R5b). 1970: - Recents on a narrow tray (Connections) show only one or two chips. 1971: - The filter does not search descriptions. 1972: - No bench: there is no new per-frame work, and draw counts are identical. 1973: - Tooltips were not captured. 1974: - No commit, push or export. `a/pre-tree` and `a/probe/plan-keys-tree` are left in place. 1975: - **Platforms:** Mac run; Windows not run. SOURCE: docs/visual-handoff.md (frozen 21 October 2026), lines 1749-1881 (Decor R2a Placeable iron gate) 1749: **Decor R2a Placeable iron gate (13 October 2026):** Opus 5.5 ran this on the Mac, 02:05-02:58 (docs/decor-controls-ui-plan.md part "R2a", stage R2 Ironwork, step `30-R2`, part a; owner E5: gate takeover of railing runs, freehand walls and house fences). A new kind `gate` (card "Iron gate", Garden, group Climbers and ironwork): two capped stone posts (the quay railing's) and one leaf under 1.4 m or a pair, of painted-metal bars with a double scroll and spear tips; width 1 to 3 m through the shared length grips; low or tall; flat, arch or arch-and-lantern top; one leaf ajar; three paints. Dropped in a railing run, a freehand wall's line or a house's wrapped fence, that host takes it over, derived at release and never saved. Save format unchanged (version 2): every param optional, nothing derived saved or in undo, so no stop condition. Snapshot: `build/backup-feel/30-R2/` (= HEAD 805d09d, `a/head.txt`); live = snapshot at start (`a/diff-live-vs-pre-at-start.txt` empty). Evidence: `artifacts/decor/30-R2/a/` (`a/` below). 1750: - **Files** (`a/part.diff`, 1508 lines; backups in `a/backup/`, byte-equal to the snapshot; at the end only these 15 differ from it, `a/diff-live-vs-pre-at-end.txt`): 1751: - `scripts/scene_state.gd`: `gate` in `KINDS` and `DECOR_PARTS` (E1; not in `REFERENCE_PARTS`); `GATE_*` constants; `LENGTH_PARTS.gate` (1, 3, 1.6) and `LENGTH_KEYS` / `length_key` (`part_length` reads the kind's key); `gate_width`, `gate_leaf`, `gate_top`, `gate_ajar`, `gate_leaves`, `gate_post_top`, `gate_arch_rise`, `gate_box`; `dimensions` (width + 0.4, post top + 0.22 or the arch's crown + finial, 0.4 deep or the ajar leaf's swing); `restore` floats `gate_width`; `validate_document` checks the four params. 1752: - `scripts/architecture.gd`: `gate` arm → `iron_gate(batch, o, posts)` and `_gate_leaf`; `GATE_PAINTS` (black, green, rose); `quay_fence` draws `quay_fence_cut` when its copy carries cuts, else exactly as before; `quay_fence_layout`, `GATE_POST_CLEAR` 0.36; `fence_panels` marks the takeover (`gate` false, `iron`, `clip`, `spans`) and `fittings` leaves out the panels and posts under the iron gate; `_under_gate`; the freehand-wall builder cuts `Openings.iron_gaps`, drops the path gaps they overlap and stands its pillars at the gate's posts (placed first, so a wall end or corner pillar beside one gives way). 1753: - `scripts/composition.gd`: `gate_takeovers(state)` (rule order run, wall, fence; `GATE_LINE` 0.15, `GATE_RISE` 0.6, `GATE_ALIGN` 0.99, `GATE_POST` 0.15), `_gate_on_line`, `gate_claim_of`, and the revert switch `GATE_TAKEOVERS` (true). 1754: - `scripts/openings.gd`: `iron_gaps(o, piece, state)` (the wall cutter's gate cut). `scripts/ivy.gd`: ivy keeps off an iron gap. 1755: - `scripts/magnets.gd`: `GATE_SNAP` 0.6, `gate_line` (nearest run, wall or building-fence line, turned the least way, place along the line kept, a guide). 1756: - `scripts/main.gd`: `GATE_KEYS`; a gate dropped on a freehand wall stands on the ground in its line (parent 0); the gate magnet in `object_candidate` (Ctrl places as drawn, `snapping_active`); gate keys only on gates and cleared on `select_id`; the length drag writes the kind's key (`gate_width`), "m wide" toast. 1757: - `scripts/world_view.gd`: gate mesh key by width, height, top and ajar plus `_Gp`; a cut railing's key `_Gc`; the copies carry `gate_posts` / `gate_cuts`; a cluster's signature takes the gates claiming that building or wall (appended only when there is one, so no gate = the old signature); `GATE_PICK_BIAS` 0.25 (a gate is picked before the run or wall it stands in); unused gate and cut meshes pruned like pipe routes. 1758: - `scripts/editor_ui.gd`: Width, Height, Top, Leaves and Paint rows and a help line. `scripts/creatures.gd`: `_gate_caps`; the caps of a gate's own posts are cat nap spots (kind `post`, rank as a ledge; its box keeps other spots clear, as a houseboat's). `scripts/dusk.gd`: `gate` in `LAMP_KINDS`. `scripts/build_audio.gd`: gate → metal. 1759: - `data/catalog.tres`: the gate card (load_steps 46 → 47). `tests/test_decor.gd`: the R2a fixture (`r2a_checks`). `tests/test_ui.gd`: `R6A_MEMBERS.gate`. 1760: - **Design readings (for the review):** 1761: - **Param names:** `gate_width`, `gate_height`, `gate_top`, `gate_ajar`, not the plan's `width`, `height`, `top`, `ajar`. Those names already mean a bridge's int width and a building's float height in the shared inspector params, `select_id` merges a part's params into them, and `restore` converts `width` to int and `height` to float by name. With the plan's names a selected tall gate would put "tall" into the next building's height. 1762: - **Run takeover:** a gate whose two post centres lie within 0.15 m of a quayside railing's line (parallel within cos 0.99) cuts every railing it overlaps. Each gate post is drawn by the first railing whose 3 m holds it, as one of its stone posts; the railing's own end posts within 0.36 m of a gate post give way; its rails run post to post and stop at the gate. A post past the run's end stays the gate's. (Fix pass: a railing the gate stops just short of is cut too when a gate post is within 0.36 m of its end post.) 1763: - **Wall takeover:** samples strictly between the posts are cut to the ground; the wall's pillars stand at the gate's post centres; a path gap that overlaps the gate is replaced by it, timber gate and pillars too. So a 3 m road through the wall with a 2.2 m gate keeps 0.4 m of wall each side. The arch springs from the gate's own post height, inside the taller pillars. 1764: - **Fence takeover:** the iron gate draws its own posts. The panels under it give way and half-covered panels stop at its posts. The fence's thin posts within 0.2 m of the gate's span are left out. ~~Every timber gate on that fence goes~~ (fix pass, ruling 13 October): the gate takes over only the road crossings its span overlaps, or the single nearest crossing when it overlaps none; every other crossing keeps its timber gate. 1765: - **Ctrl:** no saved flag. The magnet is skipped, and a gate left off a line (more than 0.15 m) takes nothing over; one drawn exactly on a line with Ctrl is still taken over. 1766: - The takeover is derived on every sync, so it also shows live during a drag (the plan says "at release"); the release is what is measured. 1767: - **Tests:** 1768: - Test-first on the snapshot's code (scratch tree with the new test file, `a/testfirst.sh`): test_decor **471 checks, 14 failures**, all R2a (`a/testfirst/test_decor.log.out`; the gate's functions missing, then one named failure per block). 1769: - After (`a/suites/`, `a/run_suites.sh`): 1770: - test_decor **550/0**; 1771: - test_scene 1709/0, test_building_tools 958/0, test_chemistry 425/0, test_clutter 3279/0, test_ui 590/0; 1772: - test_creatures 250/0, test_dusk 461/0, test_starters 393/0, test_ivy 237/0, test_warmup 53/0, test_build_audio 191/0, test_links 534/0. 1773: - New checks: 1774: - the card; no params = 1.6 m low flat closed; validation of the four params (bad values refused); JSON round trip byte for byte; 1775: - geometry inside the box at widths 1.0, 1.2, 1.6, 3.0 × low and tall × every top × ajar or not; every material in `BuildAnim.MATERIALS`; 1776: - one leaf at 1.0 and 1.2 m, two at 1.6 and 3.0; painted metal only (the lantern's bare metal is just its cage); three paints; ajar swings a leaf off the line; 1777: - lantern top one emitter, flat and arch none, `gate` in `LAMP_KINDS`, and the view's lantern-gate mesh carries one lamp; 1778: - **run:** a 6 m run takes the gate over, posts 0, bars cut (painted vertices drop), the gate draws no stone; posts drawn at x -8.82, -6.8, -5.2 and -3.18 with no two within 0.3 m; moved off it, the run is whole; 0.4 m off the line, no takeover; over the run's end, one post stays the gate's; 1779: - **wall:** the timber gate replaced (0 timber vertices); open between the posts; pillars at both posts; a plain stretch cut; moved away, the timber gate and the wall's stone come back vertex for vertex; 1780: - **fence:** the gate becomes the fence's gate (posts 3); `fence_panels` hangs no timber gate and draws no timber; panels under it give way; no fence post near the gate's span; moved away, the timber gate and the fence come back as they were; 1781: - **save:** drawing changes nothing in the scene, and no derived key is in the save. The view draws the gate post-less (`_Gp0`) and both railings cut (`_Gc`). The gate is picked before the run. The switch is on. Moved away, the cut meshes are forgotten; 1782: - **width drag:** arrows at both posts plus the turn grip; +0.6 m → 2.2 m with the left post fixed; one undo step, written as a float `gate_width` with no `length`; undo byte for byte; clamped at 3 m; Esc cancels; 1783: - **magnet:** Ctrl keeps the gate at 20° 0.4 m off the line with no takeover; without Ctrl it goes onto the line, along it, taken over, one "place part" step; 1.2 m off it is placed as drawn; dropped on a freehand wall it stands on the ground in the wall's line and the wall takes it over; 1784: - **inspector:** the rows, the gate's own values, Top as one undo step, Leaves; a building chosen next keeps a numeric height; 1785: - metal sound; the cat's two post-cap spots, on the caps. 1786: - The plan's file list puts gate tests in test_chemistry and test_building_tools too. All of them are in test_decor (E1: the new kinds' own fixture); those suites run unchanged and pass. 1787: - **Full suite** (`a/suite/suite_all.out`; `tools/suite_all.sh` a, b, then `VERIFY_RES=2880x1800` v, in the foreground after the last script edit; AC, 80%, Low Power Mode 0): **48 suites, 27,293 checks, 0 failures** (R6a had 27,200; +93, all in test_decor). `--verify` 2880x1800 exit 0 on try 1 (25 s), `PIXELPUNK_INTEGRATION []`; its only ERROR is the inherited `terrain_flowers.svg`. The known flake test_creature_reactions did not fire (rerun 6,871/0). The suite rewrote `artifacts/building-tools/tests.json` as every run does. 1788: - **Changed expectations (old → new):** 1789: - Catalog 44 → **45 cards** (Garden 17 → 18). Thumbnail renders 44 → **45** (the R6a one-render-per-kind check passes at 45). 1790: - `KINDS` +1; `DECOR_PARTS` [] → ["gate"]; `LENGTH_PARTS` +gate; `Dusk.LAMP_KINDS` +gate; `Creatures.NAP_RANK` +post (rank 1). 1791: - `DioramaState.part_length` reads `LENGTH_KEYS` (boat unchanged). 1792: - World pick: a gate that has taken over a host wins against a hit up to 0.25 m nearer (fix pass: a lone gate gets no bias). 1793: - No existing assertion changed. Courtyard and Harbour pins (test_starters 393/0, test_scene 1709/0) hold: no house fence, wall or railing changes without an iron gate (`gate_takeovers` returns empty when no gate exists, and every new branch is gated on it). 1794: - **Captures** (`a/caps.sh`, frozen clock, 1600x1000; one sitting 02:41-02:45 in the order pre-1, after, pre-2, every view on try 1; AC, 80%, LPM 0, `a/cap/power.txt`): 1795: - Scene `a/scenes/gates.json` (built by `a/probe/scenes.gd`, each gate laid by the magnet; the takeovers are printed in `a/probe/scenes.log.out`): (A) alone, tall, arch, green, ajar; (B) lantern top across the joint of a 12 m run (host run, posts 0); (C) arch, 2.2 m, in a freehand wall where a road crosses it (host wall); (D) flat black across a house's fence at the road to its door (host fence). 1796: - "Before" is `gates-pre.json` (the same scene without the gates) in `a/pre-tree`. Also `courtyard.json` (`SampleScene.courtyard()`), harbour-day, harbour-night and quarter-day. 1797: - Sheets, all looked at (`a/metrics.sh`): 1798: - `a/sheet/r2a-gates-day.png`, `r2a-gates-night.png`: before | after for run, wall, fence and alone; 1799: - `a/sheet/r2a-after-contact.png`: overview day and night, then each placement; 1800: - `a/sheet/r2a-existing.png`. 1801: - **Metrics** (`a/metrics/`): 1802: - Noise pair pre-1/pre-2: harbour-day 15.2% of pixels, harbour-night 8.2%, quarter-day 8.1%, courtyard-day 18.8%. 1803: - The existing views have **integer counts identical** pre → after (draw calls, objects, lights). Frame change is within the pair for harbour-day (12.7 / 7.9%), quarter-day (7.2 / 3.8%) and courtyard-day (21.2 / 10.5%, against 18.8%). Harbour-night is above it: 19.6 / 16.6% against 8.2%, >8 levels 4.2 / 3.6% against 1.1%. In the region table that change sits in the sky (zenith 23.8%, horizon band 23.4%) and the water, not on the railings (0.3%). Harbour has no gate and its counts are identical, so this is read as animation noise, not a change. 1804: - Gate views: +7 to +16 draw calls and objects, +1 emitter and light. foliage.ivy 105 → 115: the wall's ivy is re-derived once the road gap gives way to the gate (visible in the wall view). 1805: - **Expected journey deltas: none.** No journey scene holds a gate; the journey's Harbour and quarter views have identical counts. 1806: - **Release cost, railing run only and before both fix passes (02:39; superseded for the wall and fence by review2 and by Fix pass 2 below)** (`a/bench/`: `takeover.json` on the Harbour fixture: a gate placed 0.3 m off the south run, laid into it by the magnet across railings 125/126, then dragged by its body 6 m along the run, so every release re-derives the cuts. Live tree vs `a/bench/notake-tree` = the live tree with `Composition.GATE_TAKEOVERS = false` (`notake-tree.diff`: that one line), alternating, 3 runs each, `dragall.sh`, `feel_drag_report.js`; AC, 80%, LPM 0, load 1.8 to 3.1 (about 2.3 typical), `a/bench/power.txt`): 1807: - Body release median **live 35.51 ms vs takeovers off 34.98 ms: +0.53 ms**, within the P7 D25 +2 ms budget. 1808: - Body step-total p95 19.28 vs 19.43; same final document digest in both trees. 1809: - Place release 173.1 vs 179.8 ms (first placement, first mesh builds; noise). 1810: - Headless, `gate_takeovers` costs 0.015 ms with no gate and 0.078 ms with one gate in a run (`a/probe/harbour.log.out`). 1811: - Superseded drafts (a control path hidden from the fixture camera by freehand wall 14 and the run) are in `a/bench/superseded/`, not measurements. 1812: - **Acceptance, measured:** 1813: - **The four placements read as one piece of ironwork each with no doubled posts: met.** 1814: - Run: the run's posts are the gate's (test: 4 posts, none within 0.3 m; sheet). The doubled stone posts at the run's own railing joints are older; shared corner posts are R2b's. 1815: - Wall: the pillars at its posts; fence: its own posts, the fence's left out; alone: its own posts. 1816: - **Release cost within +2 ms: met for all three hosts after Fix pass 2.** The +0.53 ms first recorded here was the railing run only, measured before both fix passes. Review2 (`a/review2/`) then measured the wall at +4.86 ms and house 7's fence at +26.64 ms. After Fix pass 2 (`a/fix2/bench/`, 3+3 interleaved, AC): run **+0.16 ms** (35.73 vs 35.57), freehand wall 15 **+1.92 ms** (37.45 vs 35.53; over 6+6, +1.54 ms), house 7's fence **+1.09 ms** (36.48 vs 35.39). After Fix 3 (the wall prefilter widened to hold the smoothed line), wall 15 **+1.58 ms** median over 6+6 (36.72 vs 35.14, `a/fix3/bench/`). 1817: - **Review:** three fresh-context Opus 5.5 reviews (`a/review/`, `a/review2/`, `a/review3/`), three fix rounds; closed by the orchestrator 13 October. 1818: - Review 1 (02:58-03:05): must-fix, an iron gate cleared every timber gate on a house fence, and doubled posts at a railing joint. Rulings recorded in `artifacts/decor/owner-decisions.md` (fence crossings, post clearance, pick bias, param names, live preview measured before close). → Fix pass. 1819: - Review 2 (03:29-03:42, recheck plus adversarial cost): Fix pass findings closed (probes rerun, plus two gates on one fence, a gate over two crossings, two gates in one run). Drag fine everywhere (p95 19-22 ms against 53.7). Must-fix: release over +2 ms on the wall (+4.86 ms) and on the fence (+26.64 ms, the whole house cluster rebuilt); the entry's +0.53 ms was the run only and pre-fix. → Fix pass 2. 1820: - Review 3 (04:20-04:33, final recheck): 120/120 exactness cases identical to a whole-cluster build (fence slide across crossings with undo ×8 and redo ×8; fence → wall → run → open ground; delete; two gates on one fence; house resized and moved; wall points moved; a road painted across the fence; top, ajar and height changed; save → load with 4 gates, no derived keys). No leftover or doubled `GateSplit` nodes; 0 on the gate-free Harbour. Wall release +1.64 ms (9+9 median, `a/review3/bench/summary9.txt`). Grow-in: landing animates nothing, leaving a fence 2 pieces (a new fence 143), and the overlay uses settled materials, so nothing is left at scale 0. Must-fix: the wall prefilter tested the gate against the box of the wall's control points; the smoothed line bulges past it (2.00 m on a 16 m closed square, 2.50 m on 20 m, 1.92 m past a sharp end corner), so a gate on the bulge, e.g. mid-side of a square enclosure, was not taken over (`a/review3/prefilter-run2.log.out`: loop16 32 of 268 positions wrong, loop20 54/342, flick26 13/201, flick28 16/214). Railing prefilter: 0 of 2,400 wrong. → Fix 3. 1821: - Orchestrator rulings at close (reversible): the +2 ms budget holds for a gate slid along or between hosts; the first placement onto a house fence rebuilding the house once (place release about 206 vs 179 ms) is accepted as a one-off edit and carried to the R2 stage close; the overlay not growing in when a gate lands is accepted; one draw call per overlay material is accepted. 1822: - **Fix 3** (13 October, 04:31-04:46, applied by the orchestrator itself after the two agent fix rounds, recorded as a ruling; `a/fix3/`, `fix.diff`, backups in `a/fix3/backup/`): 1823: - `scripts/composition.gd` `_wall_line_box`: the wall prefilter bounds the smoothed line by the control points' box grown by the longest Bezier handle, max |p(i+1) − p(i−1)| / 6 (each uniform Catmull-Rom span lies in the hull of p1, p1 + (p2 − p0)/6, p2 − (p3 − p1)/6, p2), then by 1 m + w/2 as before. 1824: - Test (`tests/test_decor.gd` `r2a_bulge_checks`): a gate on the bulge of a 16 m closed square's east side and of its south side is the wall's. Test-first on the fix-2 code **575 checks, 2 failures**, exactly the new ones (`a/fix3/testfirst/test_decor.log.out`). After: **575/0**. 1825: - Review3's prefilter probe rerun on the live tree (`a/fix3/prefilter.gd`, `run.sh`, `prefilter.log.out`): **0 mismatches** on every shape (runs 0/2400; bend 0/57, flick20 0/164, flick26 0/201, flick28 0/214, loop 0/264, loop16 0/268, loop20 0/342); on each flick the magnet's apex gate is the wall's. 1826: - Full suite (`a/fix3/suite/`, a, b, then `VERIFY_RES=2880x1800` v, after the last script edit at 04:33:39; first suite log 04:34:33): **48 suites, 27,318 checks, 0 failures** (+2, test_decor), counted per suite from `a/fix3/suite/suites/*.log.out` against fix 2's (every suite identical but test_decor). The TALLY line in `a/fix3/suite/suite_all.out` reads 18,112 because an outer redirect overwrote part a's lines in that file; the per-suite logs are complete. `--verify` exit 0 on try 1 (25 s), `PIXELPUNK_INTEGRATION []`. test_creature_reactions 6,871/0 and rerun 6,871/0. 1827: - Wall release spot-check (`a/fix3/bench/wall6.sh`, review3's recipe, 6+6 interleaved against `a/fix2/bench/notake-tree`, valid as the control because `_wall_line_box` is read only when takeovers are on): takeover 36.73, 36.70, 36.68, 36.72, 36.75, 36.88 (median 36.72) against control 35.64, 35.10, 35.09, 35.34, 35.19, 35.04 (median 35.14): **+1.58 ms median, +1.51 mean**, within +2 ms; every run try 1, 04:44-04:46, AC 80%, LPM 0, load 2.2 (`wall6.out`, `summary.txt`, `drag/power.txt`). 1828: - The same wrong "within a metre" assumption in `DioramaState.wall_crossings` (B2c, pre-existing) is out of R2a's scope; flagged as a separate task. 1829: - **Fix pass** (13 October, 03:05-03:30, Opus 5.5; `a/fix1/`, `fix.diff`; backups in `a/fix1/backup/`). The review found: (1) must-fix, an iron gate anywhere on a house fence removed every timber gate on it (`architecture.gd` `panel.gate = false` on every panel); (2) must-fix, a gate post at or just inside a railing joint left the neighbouring railing's end post 0.18 m away, two posts z-fighting (`composition.gd` skipped railings the gate does not overlap); (3) small, `GATE_PICK_BIAS` also helped lone gates; (4) an empty bullet under Not done. Fixed: 1830: - (1) `fence_panels` groups the gated panels into crossings; each iron gate clears only the crossings its span overlaps, or the nearest one (centre to centre in plan) when it overlaps none. 1831: - (2) `gate_takeovers` also cuts a railing when a gate post is within `GATE_POST_CLEAR` of that railing's end post (x ±1.32), so the end post gives way. 1832: - (3) `WorldView._gate_hosted`: the bias only for a gate whose takeover host is not empty. 1833: - (4) the bullet removed. 1834: - Tests (test_decor, `r2a_fence_roads_checks`, `r2a_joint_checks`, `r2a_pick_checks`): test-first on the R2a code **561 checks, 5 failures**, exactly the new ones (`a/fix1/testfirst/test_decor.log.out`). After: test_decor **561/0**; test_building_tools 958/0, test_scene 1709/0, test_chemistry 425/0, test_clutter 3279/0, test_ui 590/0 (`a/fix1/suites/`). 1835: - The new checks: three roads cross an 8 x 4 house's fence. A gate at road 1 leaves road 2 and the east side their timber gates (drawn). A gate on the back fence takes only the nearest crossing (east). Moved away, all three come back. The joint sweep: each gate post swept ±0.6 m in 0.01 m steps across the run's joint and both ends, at widths 1.0, 1.6 and 3.0 (2,178 positions). No two posts are closer than 0.36 m, and each gate post is drawn once. A lone gate 0.2 m behind a lantern does not take the lantern's click. 1836: - The reviewer's probes, re-run unchanged (`a/fix1/probe/`, `run.sh`): 1837: - probe: crossings left after a gate at road 1 [] → road 2 and east (4 panels); gate on the back fence [] → both south roads (east taken); run sweep closest posts 0.180 → 0.360 m at all three widths (0.36 is the run's own joint pair, R2b), gate posts drawn once; box sweep unchanged (none out of box). 1838: - probe2: unchanged (wall picks, post keys, lamp before a lone gate → lantern). 1839: - Captures (`a/fix1/caps.sh`, one sitting 03:16-03:18, every view try 1, AC 80%, LPM 0, `a/fix1/cap/power.txt`): pre (`a/pre-tree`), unfixed (`a/fix1/unfixed-tree`, R2a as reviewed) and after (live). Views: gates.json run and fence, day and night; the three-road house `a/fix1/scenes/roads.json` (built by `a/fix1/probe/scenes.gd`, with a 1.0 m gate on a railing joint), house and joint, day. Sheets, looked at: `a/fix1/sheet/r2a-fix1-unfixed-after.png`, `r2a-fix1-pre-after.png`. 1840: - Unfixed → after: road 2 and the east crossing change from closed fence to timber gates. The doubled stone post at the joint gate becomes one. 1841: - The gates.json fence and run views are unchanged in what they show: one crossing, a 1.6 m gate across a joint, untouched by the fix (frame change 0.4 to 2.0%, fence-day the highest; integer counts identical in all six views, `a/fix1/metrics/`). 1842: - Full suite (`a/fix1/suite/suite_all.out`, a, b, then `VERIFY_RES=2880x1800` v, in the foreground after the last script edit): **48 suites, 27,304 checks, 0 failures** (+11, all test_decor). `--verify` exit 0 on try 1, `PIXELPUNK_INTEGRATION []`, only ERROR the inherited `terrain_flowers.svg`. test_creature_reactions passed both runs. 1843: - Changed expectations: the R2a design readings for run, fence and pick above are amended. No earlier assertion changed. Release cost not re-benched: the fence change adds one pass over the panels only when a gate claims that fence, and the run change adds at most one railing per gate end. 1844: - **Fix pass 2** (13 October, 03:43-04:20, Opus 5.5; `a/fix2/`, `fix.diff` 426+/51-, backups in `a/fix2/backup/` under `a/fix2/.gdignore`). Must-fix from review2: release cost on the wall (+4.86 ms) and on house 7's fence (+26.64 ms). Profiled first (`a/fix2/prof.sh`, `instrument.sh` on tree copies; `a/fix2/prof/`): 1845: - **Before:** a fence or wall claim's spans were in the host cluster's signature, so every slide rebuilt the whole cluster. House 7's cluster "7,8,13" took 24.9 ms in `ClusterArchitecture.build` plus a 1.3 ms mesh commit. The wall's cluster "10,15" took 3.8 + 0.2 ms. `Composition.gate_takeovers` also ran 3 or 4 times per release at about 0.22 ms each. 1846: - **Changed:** 1847: - `scripts/architecture.gd`: `begin_gate_split` / `end_gate_split`, `split_frame` / `apply_split_frame`, and `house_fence` (`fittings`' fence branch moved out unchanged). While a split is open, `fittings` draws a fence a gate has taken over into the split batch and keeps its frame. `wall_path` takes optional `volumes`. 1848: - `scripts/cluster_architecture.gd`: `build` draws a taken-over wall into the split batch and keeps its frame and `wall_volumes`. 1849: - `scripts/world_view.gd`: a full cluster build draws the split batch as a `GateSplit` child mesh. Its bricks, lamps and vents are merged into the cluster's own, and its pieces into the build record. The cluster signature now carries only an `["gate"]` marker. The claims are hashed separately (`gate_split_claims`). When only the claims change, `_rebuild_gate_split` redraws the overlay from the kept frames and swaps the overlay's quoin instances in the chunk. If it cannot do this exactly, the cluster is built whole. `sync_scene` holds the takeovers for the length of the sync. 1850: - `scripts/composition.gd`: `hold_takeovers` / `release_takeovers`. Two prefilters skip railings and walls the gate cannot reach (railing centre beyond w/2 + 2.2 m; outside the wall stroke's box grown by 1 m + w/2) before their transforms or samples are read. 1851: - **After** (same harness): fence release redraws only the overlay, 0.9 ms. The wall's overlay takes 1.2 ms plus a 0.2 ms chunk redraw. Takeovers cost 0.13 to 0.19 ms per release. 1852: - **Tests** (test_decor `r2a_scoped_checks`, +12): 1853: - Test-first on the fix1 code: **565 checks, 4 failures**, exactly the new block (`a/fix2/testfirst/test_decor.log.out`). After: **573/0**. 1854: - The checks: house and wall clusters split into the overlay draw what they drew whole (per material: vertex count, 64-bit position and colour sums; bricks). A gate slid along the fence leaves the house's cluster mesh object as it was, and likewise along the wall. The fence is redrawn. The scoped fence and wall redraws, and the wall's bricks, equal a forced full rebuild. Moved off the fence, the house draws its fence in its own mesh again. 1855: - Affected suites: test_building_tools 958/0, test_scene 1709/0 (`a/fix2/suites/`). 1856: - **Full suite** (`a/fix2/suite/suite_all.out`, `run_all.sh`; a, b, then `VERIFY_RES=2880x1800` v, after the last script edit; AC, 80%, LPM 0): **48 suites, 27,316 checks, 0 failures** (+12, all test_decor). `--verify` exit 0 on try 1 (25 s), `PIXELPUNK_INTEGRATION []`, only ERROR the inherited `terrain_flowers.svg`. test_creature_reactions 6,871/0 and its rerun 6,871/0. 1857: - **Output identity** (`a/fix2/probe/identity.gd`; the Harbour with gates laid by the magnet on house 7's fence, wall 15 and the south run): 1858: - The whole-cluster digest of all 11 clusters is identical on the fix1 tree (`a/fix2/fix1-tree`) and the fix2 tree. 1859: - On fix2, the cluster plus overlay digest equals the whole digest **11/11**. The overlays are on "7,8,13" (1 material) and "10,15" (2). 1860: - The bench's final document digests are identical between tree and control per host. 1861: - Draw calls: +1 per overlay material, only where a gate has taken over a fence or wall. 1862: - **Release** (`a/fix2/bench/`: review2's `drag.sh`, `dragall.sh`, `summ.js` and drag scripts copied; control `a/fix2/bench/notake-tree` built the same way, `notake-tree.diff`; 3+3 interleaved, `HOSTS="run wall fence"`; AC, 80%, LPM 0, load 2.6; `pmset-start.txt`, `pmset-end.txt`, `drag/power.txt`; `summary.txt`): 1864: | host | control (takeovers off) | takeover | delta | review2 delta | 1865: |---|---|---|---|---| 1866: | run (railings 125/126) | 35.57 | 35.73 | **+0.16** | +1.27 | 1867: | freehand wall 15 | 35.53 | 37.45 | **+1.92** | +4.86 | 1868: | wall 15, runs 1-6 (`wallmore.sh`, `wall6.txt`) | 35.53 | 37.07 | **+1.54** | | 1869: | house 7's south fence | 35.39 | 36.48 | **+1.09** | +26.64 | 1871: Body drag p95: run 20.33 vs 19.62, wall 18.82 vs 19.16, fence 19.66 vs 19.64. 0 errors. 1872: - **Not done, and why:** 1873: - ~~The wall and fence takeovers' release cost is not benched~~: review2 benched them from a top-down camera (`a/review2/`), and Fix pass 2 brought them within budget (above). 1874: - Placing a gate into a house fence still rebuilds that house's cluster once (fence place release 205.8 vs 178.6 ms, `a/fix2/bench/summary.txt`). This is a first placement, which is outside the release acceptance line. Sliding the gate afterwards is scoped. 1875: - Build animation, only when a gate goes onto or off a fence or wall: the overlay's pieces are not animated. A fence or wall stretch drawn in the overlay appears whole when the gate first lands, not growing in. Its pieces are recorded, so it does not grow in again when the gate leaves. The final frame is identical. 1876: - A gate's arch does not rise to meet taller wall pillars. 1877: - A tower's ring fence takes no gate (`tower_fence_panels`). 1878: - Takeover over water or on a bridge is untested. 1879: - No commit, push or export. `a/pre-tree` and `a/bench/notake-tree` are left in place. 1880: - **Platforms:** Mac run; Windows not run. SOURCE: docs/visual-handoff.md (frozen 21 October 2026), lines 1608-1669 (Decor R2b Railing length and the quay-edge rule) 1608: **Decor R2b Railing length and the quay-edge rule (13 October 2026):** Opus 5.5 ran this on the Mac, 11:38-12:40 (docs/decor-controls-ui-plan.md part "R2b", stage R2 Ironwork, step `30-R2`, part b). The quayside railing (`quay_fence`) has a length, 1 to 15 m (built 1 to 12 m; raised to 15 m in the fix pass, orchestrator ruling 1), through the shared length grips and a Length row; posts stand about every 1.5 m with the end posts always; two railings whose ends meet within 0.3 m share one post (derived, never saved), composed with R2a's gate takeover; a Style row gives bars (today's), a hooped top rail, or posts with a sagging chain; and a railing released on the land within 1.5 m of a quay's lip turns parallel to it (one over the water or on a jetty deck is left where it is, fix pass), its water-side face 0.2 m back from the lip (Ctrl places as drawn). Save format unchanged (version 2): both params optional, an absent `length` draws today's railing byte for byte; no stop condition hit. Snapshot: `build/backup-feel/30-R2-b-pre/` (= HEAD 4435cec, `b/head.txt`); live = snapshot at start (`b/diff-live-vs-pre-at-start.txt` empty; the modified `artifacts/building-tools/tests.json` and the untracked `docs/codebase-audit-plan.md` are not this part's). Evidence: `artifacts/decor/30-R2/b/` (`b/` below); scratch tree `b/pre-tree`. 1609: - **Files** (`b/part.diff`, 1222 lines; backups in `b/backup/` under a `.gdignore`, byte-equal to the snapshot; at the end exactly these 10 differ from it, `b/diff-live-vs-pre-at-end.txt`): 1610: - `scripts/scene_state.gd`: `RAIL_LENGTH` 3, `RAIL_MIN_LENGTH` 1, `RAIL_MAX_LENGTH` 12 (15 after the fix pass), `RAIL_STYLES` (bars, hoops, chain), `RAIL_BAY` 1.45, `RAIL_END_IN` 0.18; `LENGTH_PARTS.quay_fence` (1, 12, 3; (1, 15, 3) after the fix pass) in `params.length`; `rail_length`, `rail_style`; `dimensions` reads the length; `validate_document` checks both params; `quay_lip_at(p, reach)` (the lip from the land side; for a point over the water it is `water_edge_at`). 1611: - `scripts/architecture.gd`: the `quay_fence` arm draws the old code verbatim for a 3 m railing of bars with no shared post (cut or not), else `quay_fence_run`; `quay_fence_posts(length)`; `quay_fence_layout(cuts, length = 3, ends = {})` (R2a's layout exactly with the defaults; adds shared posts and `points`); `quay_fence_run(batch, length, style, cuts, ends)`. 1612: - `scripts/composition.gd`: `railing_joints(state)`, `_railing_ends`, `RAIL_JOIN` 0.3, the revert switch `SHARED_POSTS` (true); held with the takeovers for a sync; `gate_takeovers` reads each railing's own length (prefilter w/2 + L/2 + 0.7, the 2.2 m of R2a at 3 m) and its end posts at the joint where it has one; a gate post is held by a railing within ±(L/2 + 0.01). 1613: - `scripts/magnets.gd`: `RAIL_REACH` 1.5, `RAIL_BACK` 0.2, `quay_rail` (guide along the lip, kind "quay"); `gate_line` uses the railing's length. 1614: - `scripts/main.gd`: the railing magnet in `object_candidate` (place, G and body drag; Ctrl as drawn); `rail_style` only on railings and cleared on `select_id`; `choose_tool` drops `params.length` when the tool changes (a boat's length never reaches a railing, nor a railing's a boat). 1615: - `scripts/world_view.gd`: a railing of another length, style or with shared posts keys its mesh `quay_fence_0_0` + `_L` / `_S