Chapter 24: Leaves lit by every lantern Frozen 5 October 2026 at 17:45 BST (game main at 648feab). Implemented, reviewed and merged work of the P6 stage (trees lit by every lantern): P6a cool ramps, shadow-side outline and darkening stamp with its review fix; P6b foliage lamp list on the CPU with its review fix and two fix passes; P6c lamp term in the foliage shader with its review fix pass (blossom clipping); P6d clustered terminators; and the P6 stage close (suite, journey, protected looks, whole-stage bench, owner sheet). Owner answers: the P6a sheet approved, P6e (Windows kit) deferred, and the whole P6 sheet approved, all on 2 October; orchestrator rulings after the P6b fix pass. Original source terminology is preserved; one local Trash path is reworded. Line numbers refer to the frozen copy. Part codes: P6a cool ramps and ring, P6b lamp list, P6c lamp term, P6d clustered terminators, P6e Windows kit (deferred). SOURCE: docs/visual-handoff.md (frozen copy, 5 October 2026, 17:45 BST, game main at 648feab) 395: **Beautify P6 stage close (2 October 2026):** the stage-end overhead of P6 "Trees lit by every lantern" (step `24-P6`), run by Opus 5.5 on this Mac on the final P6 code: `main` 558d902, clean (`close/head.txt`). The parts are P6a, P6b, P6c and P6d. No game code changed. Evidence is in `artifacts/beautify/24-P6/close/`. 396: - **Before side:** the pre-stage scratch tree `close/pre-tree`, from `build/backup-feel/24-P6/`. It equals `main` af4df88 (the P5 close) on scripts, shaders, tests, data, scenes, tools and `project.godot`; only the three `.ps1` tools differ, in line endings (`close/diff-pretree-vs-af4df88.txt`). Its class cache was refreshed with a headless import first (`close/import-pre.sh`), because its `.godot` came from the live tree, which has FoliageLamps. 397: - **Power:** AC, 100% charged, Low Power Mode 0 for every run (`close/suite-power.txt`, `cap-power.txt`, `bench/power.txt`). Load average 3.2-4.3. 398: - **Full suite** (`close/suite.sh` a, b, v; 19:41-19:48): **41 suites, 21,672 checks, 0 failures**, the same as P6d. `--verify` at 2880x1800 exited 0 on try 1 in 34 s, `PIXELPUNK_INTEGRATION []`. The creature_reactions rerun had 5,549 checks and 0 failures; the known flaky check did not fire. 1440x900 was not run (the inherited stall). 399: - **Journey** (`artifacts/feel-journey/24-P6/`: the six views through `tools/art_capture.sh --set journey`, `close/journey.sh`, all on try 1): **every integer count is identical to 23-P5** (`24-P6/counts-vs-23-P5.txt`), as every part declared. The stage capture re-ran the six views with identical counts. 400: - Frame >8 luma against 23-P5 is 4.3% on lane and 8.6-18.3% elsewhere (`close/metrics/journey-frame-23P5-24P6.txt`). Most of that is the spread between sittings, not P6: today's capture of the unchanged P5 code (`close/pre-1`) differs from the P5 close capture by 7.4-11.8% on the same views (`frame-p5close-pre1.txt`). A full-resolution crop of harbour-night (`close/look/hn-sitting.png`) shows the same picture; the thumbnail pages `look/j-*.png` and `look/sitting-p5close-vs-pre1.png` exaggerate it. 401: - By eye (`close/look/j-1.png`, `j-2.png`): lighter, cooler crowns with lit clusters, and a pinker quarter blossom at night. 402: - `notes.json` has a `24-P6` entry (backup `notes.json.bak-before-24-P6`); `index.html` and `journey-standalone.html` (107.44 MB) were rebuilt. 403: - **Art capture and protected looks** (`close/caps.sh`; one sitting 19:50-20:13 in the order `pre-1`, `after`, `pre-2`, `after-2`): 58 views each, all on try 1. The views are the P5 close's 55 plus qn_trees_lamps, quarter-orbit and qn-orbit (`--orbit=0.6`). Metrics are in `close/metrics/` (`close/metrics.sh`; regions `close/regions.json` = `23-P5/close/regions.json` plus P6c's `blossom_lamp`): `ab-*`, the noise pairs, `frame-*`, `counts.txt`, `protected.md` (`close/prot.js`), `stage-measure.txt`, and `ab-p5close-*` / `frame-p5close-*` against `23-P5/close/after`. Protected sheets: `close/protected/protected-1.png` to `-4.png`, `protected-5-vs-P5-close.png`, `noise-pre.png` and `noise-after.png`; pages 1 and 4 were looked at. 404: - **Counts:** identical in every fixed view in both pairs. qn-orbit draws 362 → 367 in both pairs (pre and after each stable). quarter-orbit varies 888-891 inside the pre tree. P6d recorded orbit views varying by up to 8 inside one tree, so this is not booked as a delta. 405: - **Canal mirror columns:** same streaks. Quarter-night changed >8 on 55.8% / 17.3% against noise of 7.7% / 55.2%; quarter-21:00 12.4% / 16.9% against 9.5% / 5.8%. Within the between-sitting spread. 406: - **HDR neon cores:** within noise (fish 1.4% / 2.3%, bar 0.06%, lane 1.6%; p50 unchanged). The quarter tower window is unchanged (p50 112.7). 407: - **05:45 and 20:45 skies:** within noise (zenith and horizon p50 equal to ±0.3). 408: - **Glade/Canal separation:** Glade's night zenith (`#001d45`), horizon, water, day lawn and bank are identical; Harbour's night zenith, horizon and water are within noise. 409: - **Approved tree style:** changed on purpose (P6a was approved by the owner on 2 October; P6d clusters): 410: - grove-day crowns p50 34.7 → 55.3, conifers 43.7 → 55.6, changed 63.9% / 48.7% against noise below 0.5%; 411: - quarter-night undersides p10 11.9 → 13.8 and p50 24.9 → 27.7; 412: - grove-1930 crowns 39.6 → 48.4. 413: - Tree feet changed 3.9% and the grove lawns 0%. 414: - **Whole-stage A/B bench** (`close/bench.sh`, `bench-t1.out`, `-t13.out`, `-t19.5.out`, `bench/summary.txt` from `close/bench-summary.js`). Setup: pre-tree against live, interleaved, round 0 discarded, rounds 1-3, `--disable-vsync` before `--path`, 1920x1080, rain 0.45. Dense `artifacts/weather-pass9/dense.json` and Harbour at night, 13:00 and 19:30, 20:30-20:41. Every run was on try 1 with 491 raw samples and vsync disabled. Raw p50 medians (pre → live, paired median, rounds where live was slower): 416: | Scene | Night | 13:00 | 19:30 | 417: |---|---|---|---| 418: | Dense | 13.49 → 13.48 (-0.01, 1/3) | 13.11 → 13.20 (+0.08, 3/3) | 15.10 → 15.15 (+0.06, 3/3) | 419: | Harbour | 7.70 → 7.92 (+0.13, 2/3) | 7.75 → 7.46 (-0.14, 0/3) | 7.13 → 7.15 (+0.07, 2/3) | 421: - p95 medians: dense 15.15 → 15.15, 14.85 → 14.91 and 16.91 → 17.01; Harbour 8.98 → 9.16 (+0.18, +2.0%, slower 3/3), 8.93 → 9.02 and 8.77 → 8.80. 422: - Draw calls are identical: dense 2362 (19:30: 3126), Harbour 903 (19:30: 818). 423: - Reading: the stage costs under 0.1 ms on dense and about 0.15-0.2 ms at Harbour night (the lamp term), inside the plan's p95 +10%. 424: - **Owner sheet** `artifacts/beautify/24-P6/close/sheet/`: before (`pre-1`) on the left and after on the right, colour then greyscale. Crops come from `close/crops.js` and pages from `close/sheet.sh`. Pages: `p6-01-overview.png`, `p6-02-P6a-cool-ramps.png`, `p6-03-P6bc-lamp-light.png`, `p6-04-P6d-clusters.png`, `p6-05-golden-and-day-blossom.png`, `p6-06-existing-scenes-1.png`, `p6-07-existing-scenes-2.png`. `sheet.md` has one plain paragraph per part with its numbers, then existing scenes, the bench and the suite. Pages 2-5 were looked at; 1, 6 and 7 were made but not opened. 425: - Flagged for the owner (not changed): 426: - P6d's pale blossom specks clip to near-white by day: Harbour crowns (harbour-day) red ≥ 250 on 0 → 94 px; the quarter's lantern blossom at golden hour (`blossom_lamp`, quarter-golden) 88 → 200 (`close/metrics/stage-measure.txt`). 427: - At the lantern camera (`qn_trees_lamps`), the warmth on the big street trees is modest. The visible change there is mostly teal undersides and greener, lit shrubs. 428: - **Not done / open:** 429: - The owner has not seen this sheet. 430: - P6e (the Windows kit and the PC run) was deferred by the owner on 2 October ("Skip it for now", `artifacts/beautify/owner-decisions.md`), so there is no P6e entry and no `24-P6/windows/`. It stays open (next natural point: the M6 export after P9). Windows was not run for any P6 part, so the RGBA32F global sampler on the AMD GL driver is untested. (Corrected 2 October by the orchestrator after the handoff check: this line said only "has not been run".) 431: - Carried from the parts: 432: - dense has 55 of 87 plants lit only by left-out lamps (strict-tier ruling); 433: - the settle pop after an orbit was not measured; 434: - the orbit crawl was not separated from texture density; 435: - the floor's `key_facing` still steps at 0.42. 436: - No 1440x900 `--verify`. 437: - The handoff check, the progress board, `tools/repo_evidence.sh` and the commit are the orchestrator's. 438: - Scratch trees: `close/pre-tree` and the part trees `a/`, `b/`, `c/` and `d/pre-tree` were moved to the Trash with `mv` once their numbers were recorded, as `beautify-24-P6--pre-tree-204341` (`close` for the stage tree). The diagnostic trees (`b/diag-tree`, `c/diag-tree`, `c/diag2-tree`) were left in place. 439: - Platforms: Mac run; Windows not run for any P6 part (P6e deferred by the owner). 441: **Beautify P6d Clustered terminators on footprint-snapped cells (2 October 2026):** Opus 5.5 on this Mac (report Signature C "clustered terminators"; trees lens "crowns are 2-3 flat tone plates", revised proposal: blossom specks, crevices, Glade at 40%). Crowns now read as small lit clusters with a ragged terminator, in four tones, by day and at night. The P6a gate was answered before the start (owner, 2 October: "Approve all changes", `artifacts/beautify/owner-decisions.md`). 443: What changed (`shaders/foliage.gdshader` +66 -13, `tests/test_foliage.gd` +130 -7 (git diff --numstat, corrected by the orchestrator)): 444: - Four tones: `band4` 1.0/0.72/0.46/0.22 above d 0.80/0.58/0.40 replaces `band3` (1.0/0.55/0.2 above 0.72/0.42) in `leaf_tone` and its twin `lamp_tone`. Glade keeps its smooth ramp. 445: - Cells snapped to the footprint: `term_lv = max(log2(TERM_PIXELS x art_metres / CELL), 0)`, cell = CELL x 2^floor(term_lv). `art_metres` is P0b's metres per art pixel (one value per draw, so the cell never switches size inside a crown; `fwidth` differs across a crown). Across a level the next size takes over coarse cell by coarse cell (hash of the 2x cell < fract(term_lv)), so a zoom has no single switch. TERM_PIXELS 6: a cluster cell is 3-12 art px (Harbour 3.2/6.3 px, the quarter 5.7/11.4, lane 3.75/7.5; never under CELL 0.12 m, so 6.7 px at the size-9 qn_trees_lamps camera). 446: - Pseudo-normals: each column of cells takes its own vertical phase (no world-y sawtooth; no `fract(wp.y/cell)`). Each cell has a direction (TERM_TILT 0.5) and a blob normal round a jittered centre (TERM_CAP 0.3, TERM_JITTER 0.5), plus an offset (hash - 0.5) x TERM_OFFSET 0.2. light() shades `dot(normalize(NORMAL + tilt), LIGHT) x 0.7 + 0.3 + offset`. The tilt reaches light() through one new fragment-to-light varying, `cluster_tilt` (written in the fragment like `glint_cell`, so not a vertex output). The night floor's key estimate and the P6c lamp term (`cluster_wn`) use the same tilt and offset. 447: - The albedo's fine value is now keyed on the terminator cell (`hash(term_id + shift)`, unfaded), so a cluster is one value at every zoom. It used to be its own 0.12 m grid that faded out with `fwidth` (gone at Harbour zoom). The 0.34 m clump term still fades. 448: - Blossom (red over green, as P6c tells it): PETAL_SHARE 0.07 of upward cells (wn.y > PETAL_UP 0.35) are PETAL_LIFT 0.28 lighter; cells hashed under CREVICE_SHARE 0.12 are CREVICE_DROP 0.45 darker. Both are folded into `cluster`, so the albedo, the lamp term and the night floor agree. 449: - Glade (banding 0) takes the tilt, the offset, the specks and the crevices at TERM_GLADE 0.4. 450: - No new texture, uniform, global or material. The P6c lamp term and the COLOR.a rebuild are unchanged apart from the clustered `lamp_d`. 452: Files and snapshots (everything below is under `artifacts/beautify/24-P6/d/`): 453: - Snapshot `build/backup-feel/24-P6-d/` (= main 2bd5415). At part start the live tree matched it exactly (`diff-live-vs-24-P6-d.txt`, empty); at the end only the two files above differ (`diff-live-vs-24-P6-d-after.txt`). `project.godot` is unchanged. 454: - Pre-part tree `pre-tree`. Backups `backup/` (plus `foliage.r1/.r2.gdshader` from the tuning rounds and `visual-handoff.md.pre-P6d`). 456: - **Tests:** 457: - Test-first `logs/testfirst-test_foliage.log.out`: 347 checks, 30 failures. 458: - After (`logs/after-*`): test_foliage 348/0, test_foliage_lamps 163/0, test_foliage_merge 81/0, test_nature 282/0, test_tree_growth 256/0, test_warmup 34/0, test_lighting 189/0, test_look 601/0. 459: - Full suite (`VERIFY_RES=2880x1800 tools/suite_all.sh d/suite` a, b, v; 19:18-19:24; AC, 100%, Low Power Mode 0, `suite-power.txt`): **41 suites, 21,672 checks, 0 failures** (P6c fix 21,637 + 35). `--verify` 2880x1800 exit 0 on try 1 in 32 s, `PIXELPUNK_INTEGRATION []`. creature_reactions rerun 5,549/0; the known flaky check did not fire. 1440x900 not run (the inherited stall). 460: - New `cluster_checks`: band4 text and no band3; the level, cell and coarse-cell fade lines; `art_metres` before the cell; a mirror over camera sizes 4-120 m (500 art rows): the finest cell is at least 2 art px, Harbour/quarter/lane at least 2.5, and the mean cell moves by no more than 6% between sizes 1% apart; no `fract(wp.y`; column phase; blob, jitter, tilt and varying lines; light()'s d, the key estimate and `cluster_wn`; TERM_GLADE 0.4. A one-mass mirror over 2,000 cells: a face 0.75 away from a light stays in the shadow tone, one 0.95 toward it never drops to it, and at 0.8 under 2% of cells do (all pass). Plus the blossom constants and lines, the fold before ALBEDO, and no new fetch. 461: - **Changed expectations (old → new):** 462: - P2p `FLOOR_FRAGMENT_PARITY`: `float key_d=dot(normalize(NORMAL),key_view)*0.7+0.3;` → `float key_d=dot(normalize(NORMAL+cluster_tilt.xyz),key_view)*0.7+0.3+cluster_tilt.w;`. 463: - P6c varyings: exactly P6b's ten → those ten plus `varying vec4 cluster_tilt;`, with a new check that the vertex stage never writes it. 464: - P6c lamp tone line: `dot(normalize(wn),lamp_l)` → `dot(cluster_wn,lamp_l)+cluster_tilt.w`. 465: - P6c band mirror: band3 (half tone 0.55 / shadow 0.2) → band4 (0.46 / 0.22) for "a lamp a little below the face". 466: - P6a outline check: message only (RING_SUN_FACING 0.6 and d 0.72 kept; d 0.72 is now band4's 0.72 tone, not the lit tone). 467: - The floor's `key_facing` still steps at 0.42 (band3's half threshold; band4's is 0.40). Left as is to keep the parity line; faces with key_d 0.40-0.42 get the full floor. 468: - **Captures** (`cap.sh`/`sitting.sh`, one sitting 18:49-18:55, order before (pre-tree), after (live), before2, after2; all on try 1; `cap-power.txt` AC, Low Power Mode 0). The 12 views are grove-day, lane-day, harbour-day, quarter-night, glade-day, quarter-day, harbour-night, qn_trees_lamps, quarter-dry, glade-night, lane-night and quarter-golden, plus quarter-orbit (day) and qn-orbit (night), both at `--orbit=0.6`. All at pixel size 2. 469: - Tuning rounds: `cap/r1-*` (blob pseudo-normal only, TERM_PIXELS 5: 1-2 px speckle, `look/r1-*`), `r2-after` (per-cell direction plus cap), and `r3-after` (TERM_PIXELS 6, albedo keyed on the cell: chosen). 470: - Motion (`motion.sh`, `cap/motion-pre` and `cap/motion-live`): `grove-orbit` at `--orbit=0.03` (6 frames each), and a zoom strip on the quarter by day at camera sizes 18, 19, 19.5, 19.8, 20, 20.2, 20.5, 21 and 22, across the level change at size 20. 471: - Integer counts (draw calls included) are identical in all 12 fixed views in both pairs (`metrics/counts-*.txt`). The orbit views vary inside their own noise: quarter-orbit 810 → 830 (ab1) and 814 → 810 (ab2) draw calls, against 810 → 814 for before → before2; qn-orbit 373 → 369 and 365 → 359, against 373 → 365. 472: - Sheets looked at (`sheet/`): grove-day-x2, lane-day-blossom-x3, harbour-day-x3, harbour-night-x3, quarter-day-x2, quarter-night-x3, quarter-golden-blossom-x4, glade-day-x3, qn-lamps-x2, zoom-live-level and orbit-live-x2. Not looked at: glade-night-x3, zoom-pre, zoom-live (too small to read) and orbit-pre-x2. 473: - What they show: 474: - The lime lit plates break into lit caps on clusters, with darker cluster undersides. Each crown still lights as one mass, and the undersides stay one dark mass. 475: - The blossom shows plum crevices and a few pale specks. The crevices are bold at lane zoom (a taste item for the stage sheet). 476: - At the close qn_trees_lamps camera the big crown is mottled with small dark crescents, finer than the cells, where the blob cap splits a cell. The lamp side still warms (below). 477: - Glade gets a soft mottle. 478: - **Measurements** (`metrics/`, `clusters.js`, `crowntable.js`): 479: - Crowns changed > 8: 26-43% of crown pixels against noise 0-5.6%. Mean dluma (ab1/ab2): 480: - harbour-day -2.37/-1.72 (p50 54.2 → 48.1); 481: - glade-day -2.68/-2.64 (54.9 → 51.2); 482: - grove-day -1.18/-1.18 (54.4 → 55.0); 483: - quarter-night +0.17/+0.50; 484: - quarter-golden -1.42/-1.47; 485: - blossom_lamp quarter-golden -5.54/-5.65 (82.3 → 66.9: crevices and band4). 486: - Cluster size on the art grid (4-neighbours within 4 luma, crown rects; before/before2 → after/after2): 487: - Pixel-weighted median cluster: grove-day 25/25 → 13/13; harbour-day 25/26 → 8/8; harbour-night 43/43 → 10/10; quarter-day 42/37 → 17/16; quarter-night 474/500 → 136/137; glade-day 68/67 → 68/65. 488: - Share of crown art px in size-1 clusters: harbour-day 8.8/8.9 → 15.0/15.8%; quarter-day 7.1/7.2 → 9.1/9.1%; grove-day 8.5/8.4 → 10.6/10.8%. 489: - Stripe ratio (row steps over column steps): 0.97-1.19 → 1.00-1.19. 490: - P6c's lamp-reach mask on qn_trees_lamps (P6c's mask, `metrics/qn-lamp-reach.txt`): p50 32.5/32.5 → 32.9/33.0, warm% 13.3 → 12.6/12.5. The lamp term holds. 491: - **Acceptance:** 492: - Clusters of at least 2-3 art px at Harbour, quarter and lane zooms: **met by construction and measured on Harbour and the quarter** (median cluster 8-17 art px at harbour-day, harbour-night, quarter-day and grove-day; at the quarter's other looks after/after2 give 136/137 at quarter-night, 124/139 at quarter-dry and 27/27 at quarter-golden, down from 474-500, 497 and 51-53, `metrics/clusters.txt`; corrected 2 October by the orchestrator after the handoff check, which found the 8-17 range covered only those views). The share of crown pixels in 1-px clusters rises (Harbour 8.9 → 15-16%). Lane has no crown region; it was judged on the blossom crop only. 493: - No striping: **met** (stripe ratio unchanged; no row lines in any sheet). 494: - No pop while zooming: **met on the strip** (`sheet/zoom-live-level.png`: sizes 19.5-20.5 show no switch; per-frame median cluster 12-17 (12 at size 22; corrected from 13-17 after the handoff check) and size-1 share 11.4-14.3%, as smooth as the pre tree's strip; `metrics/zoom-strip.txt`). The strip is separate stills, not one continuous zoom. 495: - No crawl between orbit frames: **not shown by a number.** The cells are world-fixed and their size is per-draw, so an orthographic orbit cannot re-key them, and the clusters stay on the leaves in `sheet/orbit-live-x2.png`. But successive grove-orbit frames change more pixels inside the crown rects: 31.8-38.3% live against 24.7-32.4% pre (`metrics/orbit-diff.txt`). The likely reason is the denser texture under a moving view; it is not separated from crawl. 496: - Crowns read as one mass: **met** (sheets, plus the one-mass mirror). 497: - p95 within noise: **met** (bench). 498: - **Bench** (`bench.sh`, pre-tree against live, interleaved, round 0 discarded, `--disable-vsync`, 1920x1080, rain 0.45, raw_*; `bench/summary.txt` rounds 1-3, `bench/summary-r1-6.txt` rounds 1-6; `bench/power.txt` AC, Low Power Mode 0, load 1.9-6.0: about 2 in the night rounds 0-3, 3.7-6.0 from 19:07 on, so the 13:00 rounds and rounds 4-6 ran under more load; pre and live alternate, so both sides carry it). Draw calls identical (dense 2362, forest 682). Rounds 1-6, raw p50 / p95: 499: - night: dense 13.134 → 13.156 / 15.054 → 15.051; forest 5.791 → 5.846 (+0.9%) / 6.756 → 6.759. 500: - 13:00: dense 12.770 → 12.806 / 14.478 → 14.499; forest 5.416 → 5.471 (+1.0%) / 6.515 → 6.505. 501: - Forest p50 is about 0.05 ms higher at both hours (the cell ALU); p95 is within noise. 502: - Start-up (`--startup-report`, medians of rounds 1-3, `bench/startup-summary.txt`): ready_ms 6089 → 6074, warm_ms 4096.2 → 4098.3, all_ms 10029.9 → 10009.1; entries 131, rounds 132 both. Unchanged. 503: - **Carried from P6c** (not changed here, recorded): the lamp-side tint at night and golden hour is still there; the forest fixture holds no lamps (a no-lamp control); the settle pop was not measured. 504: - **Journey count deltas: none** (integer counts identical). Drawn content changes in every view with trees, by day and at night. 505: - **Not done:** 506: - No 1440x900 `--verify` (inherited stall). 507: - The orbit crawl is not separated from texture density by a number (above). 508: - Stage-sheet crops of the blossom and Glade are in `sheet/`; the stage sheet itself is the orchestrator's. 509: - `pre-tree` is left for the orchestrator. 510: - Windows not run. 511: - Review: filled by the orchestrator. 512: - Platforms: Mac run; Windows not run. 514: **Beautify P6c Lamp term in the foliage shader (2 October 2026):** Opus 5.5 on this Mac (report Signature C wrap shading, omni lights skipped in `light()`, ivy for free; trees lens F3 revised). At night the leaves are now lit by the P6b lamp list in the fragment shader, so a crown warms on its lamp's side whether or not that lamp is one of the 16 engine lights. The engine's omni lights no longer reach leaves while the list holds lamps. 516: What changed (line counts corrected 2 October by the orchestrator after the handoff check, from `git show --numstat 2bd5415`; the first pass alone was +153 -56 on the shader and +170 on test_foliage): 517: - `shaders/foliage.gdshader` (+171 -56 in the commit; the fix pass was +19 -1 of it): 518: - Reads the four P6b globals (`foliage_lamps`, `foliage_lamp_bins` with `filter_nearest`, `foliage_lamp_bounds`, `foliage_lamp_count`). 519: - A uniform branch on `foliage_lamp_count > 0` contains everything else, so by day none of it runs. Inside it: 520: - The bounds test comes before any fetch. The bins cell is taken from the fragment's own `wp`, clamped to the 8x8 grid. 521: - Up to `LAMP_PER_CELL` 4 lamps; the loop breaks at the first empty slot. 522: - Each lamp gives a wrap term `LAMP_WRAP` 0.55 + 0.45·dot(wn, L). It goes through `lamp_tone` (a twin of `leaf_tone`, so the banded steps match), times the lamp's linear colour × strength × falloff. 523: - Falloff on the city looks: the window of the engine's omni attenuation over the lamp's range, (1-(d/r)^4)^2, banded 0.6/0.25/0.07 → 1/0.55/0.25/0 as in `light()`, at `LAMP_GAIN` 1.5. Glade (unbanded) keeps the engine's full falloff with `LAMP_DECAY` 1.6 (= WorldView `omni_attenuation`) at `LAMP_GAIN_GLADE` 0.9. 524: - The base the lamps light is `mix(ALBEDO, lamp_albedo, LAMP_BASE 0.6)`. `lamp_albedo` rebuilds the leaf colour from before the P6a ramp shading: (c - dark·(1-a)) / max(a, `LAMP_KEEP` 0.3), with the blossom dark when r > g. It then applies the cluster, skylit, outline, rim-lift and rain factors that ALBEDO uses. 525: - The term is added to EMISSION *before* the night floor, so the floor counts it as the leaf's own light. A per-lamp P0b wet glint is added after the floor. 526: - Fix pass: on the city looks blossom lights at `LAMP_BLOSSOM` 0.5 of `LAMP_GAIN`. The lamp light then goes through `lamp_knee`, a soft shoulder on its peak channel: nothing changes below `LAMP_KNEE` 0.3, and past it the peak bends toward `LAMP_CAP` 0.5 without reaching it. All three channels take the same scale, so the hue holds. See "Review fix pass" below. 527: - `light()`: the whole body is inside `if (LIGHT_IS_DIRECTIONAL || foliage_lamp_count <= 0)`. Godot rejects `return` in `light()` ("Using 'return' in the 'light' processor function is incorrect"). There is still no `*ALBEDO`, and no new varying. 528: - Ivy shares the shader, so it is lit for free. 529: - `scripts/architecture.gd` (+5): materials set the new uniforms `leaf_cool_dark` and `leaf_cool_dark_blossom` from `COOL_DARK` / `COOL_DARK_BLOSSOM`, or to black when `COOL_RAMPS` is false. Declining P6a's ramps therefore needs no shader edit. 530: - `scripts/foliage_lamps.gd` (+24 -9): 531: - **Stale stamp fixed.** `plants_stamp` / `ivy_stamp` were taken when a grid started, so a choice the day dropped mid-grid left the stamp stale. They are now taken only when the grid is built, or in the unchanged-leaves branch. 532: - **Bins file crown spans.** `_needs` carries each plant's leaf radius, and a need is filed into every cell its foot ± radius spans. A fragment then finds its plant's lamps from its own position, with no per-vertex foot varying. 533: - `tools/art_capture.sh` (+2): view `qn_trees_lamps` (night, camera in `artifacts/beautify/24-P6/c/qn_trees_lamps.json`: yaw 0.845, pitch 0.315, size 9, target 28.5, 4, 3). 534: - Fix pass: `tools/art_metrics.js` (+3 -2) adds `clip` {r250, any250} to every rect region's stats. `tools/art_regions.json` (+10) adds the region `blossom_lamp` to `_harbour` (350-470 x 390-450, the courtyard blossom under the bulb string) and to `_quarter` (250-330 x 360-430, the blossom by the left lanterns, outside the `crowns` rects). Glade views inherit the `_harbour` rect, but it covers no blossom there. 535: - Tests: `tests/test_foliage.gd` (+170, `lamp_term_checks`; fix pass +73 -2, `lamp_knee_checks`; +241 in the commit), `tests/test_foliage_lamps.gd` (+72 -5, `stale_stamp_checks`; spans in the bins reference). 537: Files and snapshots: 538: - Snapshot `build/backup-feel/24-P6-c/` (= main 6f6ffa7). At part start the live tree matched it exactly (`c/diff-live-vs-24-P6-c.txt`, empty). At the end only the six files above differ (`c/diff-live-vs-24-P6-c-after.txt`); `project.godot` is unchanged. 539: - Pre-part tree: `c/pre-tree`. Backups: `c/backup/`. Everything below is under `artifacts/beautify/24-P6/c/`. 541: - **Tests:** 542: - Test-first logs: 543: - `logs/testfirst-test_foliage.log.out`: 304 checks, 39 failures. 544: - `logs/testfirst-test_foliage_lamps.log.out`: 161 checks, 1 failure (the stale stamp). 545: - `logs/testfirst2-test_foliage_lamps.log.out`: 163 checks, 3 failures (span cells: Harbour 5 of 56 and quarter 2 of 36 plants dark in some cell their crown spans). 546: - After, affected suites (`logs/after-*`): test_foliage 305/0, test_foliage_lamps 163/0, test_foliage_merge 81/0 (no UV2), test_nature 282/0, test_tree_growth 256/0, test_warmup 34/0, test_lighting 189/0. 547: - Full suite (`VERIFY_RES=2880x1800 tools/suite_all.sh`, `suite/`; AC, 100%, Low Power Mode 0, `suite-power.txt`): **41 suites, 21,629 checks, 0 failures** (P6b 21,572 + 57). 548: - `--verify` 2880x1800: exit 0 on try 1 in 33 s, `PIXELPUNK_INTEGRATION []`. 549: - The creature_reactions rerun had 5,549 checks and 0 failures; the known flaky check did not fire. 550: - 1440x900 was not run (the inherited stall). 551: - **Changed expectations (old → new):** 552: - `FoliageLamps.bins` needs: foot cell only → may carry a radius and fill every spanned cell. The test reference changed to match, and `bin_dark` now also returns `span_dark`, checked 0 on Harbour and the quarter. 553: - Within this part's own new checks: `light()` "returns early" → the branch form (Godot forbids the return). Engine falloff with `LAMP_DECAY` on the city → the range window, banded. Report gain 0.9 → `LAMP_GAIN` 1.5 (Glade keeps 0.9). Foot cell → fragment cell. 554: - Fix pass: the add line `EMISSION+=mix(ALBEDO,lamp_albedo,LAMP_BASE)*lamp_sum*(gain)` → `vec3 lamp_light=…*(banding > 0.5 ? LAMP_GAIN*(vcol.r > vcol.g ? LAMP_BLOSSOM : 1.0) : LAMP_GAIN_GLADE)` followed by `EMISSION+=lamp_light*lamp_knee(peak)`. The test's add-line check moved to match; `lamp_knee_checks` is new. 555: - Drawn content changes at night **and at golden hour**, because `lamps_show` is already true then (quarter-golden crowns below). 556: - **Captures** (`cap.sh`, 16 views; before and before2 = `c/pre-tree`, after and after2 = live, one sitting; `cap-power.txt` AC, Low Power Mode 0). Views: qn_trees_lamps, quarter-night, quarter-dry, lane-night, harbour-night, quarter-day, harbour-day, glade-day, glade-night, grove-day, quarter-2045, quarter-2100, quarter-golden, qn-lights0 (`--lights=0`), qn-orbit and quarter-orbit (`--orbit=0.6`). All on try 1 except one retry in after2. Earlier tuning rounds are in `cap-round2/` and `cap-round3/`. 557: - Integer counts, draw calls included, are identical before → after in every fixed view (`metrics/counts-*.txt`). The orbit views vary inside their own noise. 558: - **Lamp-reach leaf mask** on qn_trees_lamps (94,054 px, `metrics/qn-lamp-reach.txt`): 559: - p50 24.7 → 33.0 / 32.5; p90 55.4 → 76.7 / 68.8; warm% 8.2 → 15.0 / 13.3; before/before2 noise 0 on p10, p50 and warm%, 0.4 on p90 (55.4 / 55.8; qualified after the handoff check). 560: - With `--lights=0` (no engine lights at all): 24.3 → 32.2 / 32.3. The lift does not come from the 16 engine lights. 561: - **Crowns** (`metrics/crowns-table.txt`; changed > 8 % / mean dluma, after / after2): 562: - harbour-night 38.9% / +14.3 / +15.4 against noise 2.6-2.9%. The blossom clipped to salmon on the lamp side; the fix pass brings it to +5.5 / +6.1 (see "Review fix pass"). 563: - quarter-night 8.2 / 6.6%, +1.1 / +1.4. 564: - quarter-dry pergola-lamp region +1.76, p50 40 → 45.6. 565: - quarter-2045 10.1 / 9.7%, +1.6 / +1.8; quarter-2100 +1.1. 566: - quarter-golden 9.5 / 8.5%, +1.0 / +1.1. 567: - glade-night 11.3 / 12.0%, +1.1 against noise 0.2-1.0%. 568: - **Day:** glade-day, grove-day, harbour-day and quarter-day crowns are inside noise (e.g. quarter-day changed > 8 0.43 / 0.49% against noise 0.51 / 0.92%). 569: - Sheets (`sheet/`): p6c-crowns.png, qn-before-after.png, qn-left-x2.png, qn-lights0-before-after-x2.png, harbour-night-blossom-x3.png, lane-night.png, qn-orbit-before.png and qn-orbit-after.png were looked at. Not looked at: qn-diff-before-after.png and qn-lights16-vs-lights0-after-x2.png. 570: - Shrubs by the lanterns read lamp-lit. 571: - Big crowns light only on their near edge. 572: - The blossom rims salmon. This was the first pass; the fix pass makes it warm pink (`fix/sheet/`). 573: - The tone stays green rather than amber (a taste question for the owner). 574: - Probe `probe/qn_list.gd` (`probe/qn_list.log.out`): the qn view chooses 30 lamps, and the per-plant cell lists put the lamps on each crown's lamp-facing side. 575: - **Acceptance:** 576: - Every crown in a lamp's reach warms on the lamp side whether or not the lamp is one of the 16 engine lights: 577: - **Met on Harbour and the quarter** (mask and `--lights=0` above). These are the plants in view lit only by a left-out lamp, as counted after the P6b fix pass: Harbour **0** of 31 and quarter **1** of 47 (0 by the leaf model). (The first version of this line gave the pre-fix-pass counts, Harbour 6 and quarter 8. They were stale.) 578: - In the bins, the 3 quarter plants that P6b carried as a bin-level limit are at 0. P6b fix 2 already brought the foot-cell count to 0. P6c's span bins also hold every cell a lit crown spans at 0: `bin_scene_checks` gives dark 0 and span_dark 0 on Harbour and the quarter (`fix/logs/after-test_foliage_lamps.log.out`, 163/0). 579: - The review's robust darker-pixel scan found no crown that loses light at night on Harbour or the quarter. 580: - **Not met on dense:** 55 of 87 plants have their only lamp past the 32, under the orchestrator's strict-tier ruling. At night these lose that lamp, because engine omni lights no longer reach leaves while the list holds lamps. Of the three scenes, only the dense dark set comes from the P6b probe count; no capture measured it. 581: - No change by day: **met** (crowns inside noise; the branch skips the whole term on an empty list). 582: - No pop across the orbit: **met while the camera moves** (the list holds still during motion, by P6b's settle design, and every orbit frame shows lit shrubs). **Not shown at settle:** lamps entering the view mid-orbit stay unlit until the camera has been still for 0.2 s, then the new choice lands over about 6-11 frames. This was not measured frame by frame. 583: - p95 within +10%: **met** (the largest is Harbour night +8.6%; see bench). After the fix pass it is **met** again: Harbour night is +2.4% over 6 rounds (see "Review fix pass"). 584: - **Bench** (`bench.sh`, sitting 2, pre and live alternating, rounds 1-3 medians after a warm-up, `--disable-vsync`, raw_* fields; `bench/summary.txt`, `bench/power.txt`: AC, Low Power Mode 0, load 1.6-2.3). Draw calls are identical (dense 2362, forest 682, Harbour 903). 585: - Night, raw p50 / p95: 586: - dense 13.076 → 13.038 / 15.117 → 15.116; 587: - forest 5.651 → 5.659 / 6.530 → 6.505; 588: - Harbour 6.429 → 6.478 / 7.384 → 8.022 (+8.6%, noisy: the pre rounds 1-3 alone span 7.10-7.99; the 8.27 is the discarded round 0, corrected after the handoff check). 589: - 13:00 p95: dense +0.5%, forest +0.2%, Harbour -6.4%. 590: - Start-up (`--startup-report`, `bench/startup-summary.txt`, medians of 3): ready_ms 6139 → 6109, warm_ms 4145 → 4147, all_ms 9872 → 9902. Unchanged. 591: - Sitting 1 (`bench-s1/`) ran under load 5+ and is not used. 592: - A per-vertex foot varying cost about 0.25 ms on forest by day and at night (split benches `bench-var*-t13.out`). It was removed for the span bins. 593: - **Deviations from the plan:** 594: - Gain 1.5 with the range window instead of the report's 0.9 with the engine falloff: at 0.9 the mask moved +1.3 p50, invisible. 595: - Glade keeps the engine falloff at 0.9: at canal values its crowns rose +9.9 mean. 596: - `light()` uses a branch, not an early return. 597: - No foot varying; the bins span change replaces it. 598: - The stale-stamp fix is in `foliage_lamps.gd`, not `world_view.gd`. 599: - Fix pass: two things are not in the plan. Blossom takes half the lamp gain on the city looks (`LAMP_BLOSSOM`). The lamp light also passes a soft shoulder (`LAMP_KNEE` / `LAMP_CAP`). 600: - **Day note:** the lamp term is off by day (`lamps_show` = `Dusk.progress > 0`, so the list is empty). The engine's omni lights still light leaves faintly by day, as before. Unchanged. 601: - **Journey count deltas: none** (integer counts identical). Drawn content changes at night and golden hour. 602: - **Not done:** 603: - No 1440x900 `--verify` (inherited stall). 604: - The settle pop is not measured frame by frame. 605: - Amber versus green lamp tone on leaves is left to the owner. 606: - Windows not run. 607: - Scratch trees `c/pre-tree`, `c/diag-tree` and `c/diag2-tree` are left for the orchestrator. 608: - Kit quirk, not fixed: `art_capture --def` puts `--camera` before `--scene`, so the scene's camera wins. qn_trees_lamps uses a scene file with the camera in it. 609: - **Review fix pass (2 October 2026, same day).** All paths below are under `c/fix/`. The live tree matched the implementation exactly before the fix (`diff-live-vs-24-P6-c-prefix.txt`: the six files above). Backups are in `c/backup-fix/`. 610: - **What the review found (must-fix):** 611: 1. The acceptance line quoted P6b's pre-fix-pass overflow counts (Harbour 6, quarter 8). It now gives the current ones: Harbour 0, quarter 1 (0 by the leaf model), dense 55 of 87, with the bin-level and span checks (above). 612: 2. Under a lantern or a bulb string, blossom clipped its red channel and turned salmon, at night and at golden hour. The cause: gain 1.5 × the range window × the bright rebuilt pink. The gain had been tuned on green leaves only. Clip counts (red ≥ 250, in the new `blossom_lamp` regions) were: 613: - harbour-night 108 → 868 of 7,200; 614: - quarter-night 104 → 672 of 5,600; 615: - quarter-golden 88 → 604. 616: - **Fix:** a soft shoulder on the lamp light's peak channel, `lamp_knee` (`LAMP_KNEE` 0.3, `LAMP_CAP` 0.5, under the glow threshold 1.0). One scale covers all three channels, so the hue holds. Blossom also lights at `LAMP_BLOSSOM` 0.5 of `LAMP_GAIN` on the city looks; Glade is unchanged at 0.9 for every leaf. Bulb-string energy (P6b) is not changed. 617: - In the test mirror, the brightest blossom under a lantern's full band reaches 1.74 uncapped and 0.45 after the fix. The median tree leaf, at 0.25, sits under the knee. 618: - Tuning: the knee alone (0.4 / 0.65, `cap-knee-only/`) left quarter-golden at 508 clipped and the crown coral. The knee at 0.3 / 0.5 was not tried without the blossom share. 619: - **Tests:** 620: - Test-first (knee design): `logs/testfirst-test_foliage.log.out`, 308 checks, 3 failures. The `LAMP_BLOSSOM` check was added after tuning round `tune/t1` and was not run against the old shader first. 621: - After: test_foliage 313/0, test_foliage_lamps 163/0, test_foliage_merge 81/0, test_nature 282/0, test_tree_growth 256/0, test_warmup 34/0, test_lighting 189/0 (`logs/after-*`). 622: - Full suite (`suite/`, `VERIFY_RES=2880x1800`): **41 suites, 21,637 checks, 0 failures** (+8). `--verify` 2880x1800 exit 0 on try 1 in 32 s, `PIXELPUNK_INTEGRATION []`. The creature_reactions rerun gave 5,549/0. 1440x900 was not run (the inherited stall). 623: - **Captures** (`cap.sh`, one sitting: before and before2 = `c/pre-tree`, after and after2 = live; 9 views; `cap-power.txt` AC, Low Power Mode 0). quarter-golden in before2 was on try 3 (no file on tries 1-2). The final after and after2 were all on try 1. The superseded knee-only after set had one retry. `metrics/` holds the results; `art_metrics` `clip` counts are in `metrics/blossom-clip.txt`. 624: - Clipped pixels (red ≥ 250) in `blossom_lamp`, before / before2 → after / after2: 625: - harbour-night 108 / 108 → 108 / 108; 626: - quarter-night 104 / 104 → 108 / 112; 627: - quarter-golden 84 / 76 → 92 / 100; 628: - quarter-2045 104 / 100 → 104 / 108. 629: - The second quarter-night blossom (760-880 x 440-540, `metrics/qn-blossom2-clip.txt`): 168 → 192 / 204, where the first pass gave 1,352. The pixels left at 250 before and after are the bulbs and lanterns inside the boxes. 630: - Crowns (`metrics/crowns-table.txt`, mean dluma ab1 / ab2): 631: - harbour-night +5.5 / +6.1 (first pass +14.3 / +15.4); its `blossom_lamp` +4.8 / +4.9; 632: - quarter-night +1.3 / +1.0; 633: - quarter-golden +1.1 / +1.3; its `blossom_lamp` +4.0; 634: - glade-night +1.2 / +1.0 (first pass +1.1). 635: - quarter-day crowns mean +0.01 / -0.23. The ab1 changed > 8 share is 5.95%, against noise of 3.2 / 4.2% in this sitting. The fix sits inside the lamp branch, which is off by day. 636: - Robust brightening (`metrics/brightening.txt`; both afters above both befores): 637: - Pixels brightened by more than 60 luma: harbour-night 104 (first pass 1,140); quarter-night 1,510 (3,036); quarter-golden 1,358 (836). 638: - The quarter's remaining > 60 tiles (`big.js`) are green crowns by lanterns and the neon sign (`sheet/qn-right.png`, `qn-mid.png`, `qg-right.png`). They are unclipped and as tuned in round 2; the same tiles were in the first pass. The golden count rose because the first pass's > 60 tiles were blossom while these are green, and the sittings differ. 639: - Lamp-reach mask on qn_trees_lamps: p50 24.8 → 33.0 / 33.1, p90 61.6 / 66.1 → 76.1 / 78.0. With `--lights=0`: 24.6 → 33.1 / 32.4. The green lift is kept. 640: - Integer counts, draw calls included, are identical in all 9 views. 641: - Sheets looked at (`sheet/`): hn-blossom.png, qn-blossom.png, qn-blossom2.png, qg-blossom.png, t1-*.png, qn-right.png, qn-mid.png, qg-right.png. The blossom on its lamp side now reads warm pink, deeper rose in the quarter, with no pale salmon or white-out. At golden hour the lift is slight. The first-pass comparison is in qn-blossom2-firstpass.png, which was not looked at. 642: - **Bench** (`bench.sh`, night, `--disable-vsync`, raw_*, pre and live alternating; `bench/summary.txt`, `bench/power.txt`: AC, Low Power Mode 0, load 1.7-3.0). Draw calls are identical. 643: - Rounds 1-3: Harbour p95 +10.4%, from one live round at 8.79. 644: - Rounds 1-6 medians, raw p50 / p95: 645: - dense 13.181 → 13.148 / 15.115 → 14.963 (-1.0%); 646: - forest 5.775 → 5.772 / 6.680 → 6.651 (-0.4%); 647: - Harbour 6.572 → 6.565 / 7.670 → 7.854 (**+2.4%**; pre rounds span 6.94-7.95). 648: - Start-up was not re-run: the change adds a few ALU ops in one branch and no material, global or pipeline. 649: - Files at the end: the six above plus `tools/art_metrics.js` and `tools/art_regions.json` (`diff-live-vs-24-P6-c-after-fix.txt`). 650: - Review: filled by the orchestrator. 651: - Platforms: Mac run; Windows not run. 653: **Beautify P6b Foliage lamp list on the CPU (2 October 2026):** Opus 5.5 on this Mac (report Signature C, `foliage_lamps` global texture, 8x8x4 bins, dusk drive; trees lens "leaves lit by every lantern", revised proposal). The leaves now have their own list of the lamps in view, published as four shader globals. Nothing reads them yet (P6c's lamp term does), so nothing drawn changes. 655: What changed: 656: - New `scripts/foliage_lamps.gd` (`class_name FoliageLamps`, editor import step run with the pinned engine). Its header documents the texture layout for P6c: 657: - `foliage_lamps` 32x2 RGBA float: texel (k, 0) position and range, texel (k, 1) linear colour and strength. 658: - `foliage_lamp_bins` 8x8 RGBA float over `foliage_lamp_bounds` (vec4 min x, min z, max x, max z): up to 4 lamp indices per cell, best first, -1 for none. 659: - `foliage_lamp_count` int. 660: - Candidates are the light pass's `local_sources`. A string's bulbs are grouped: consecutive bulbs of one batch within `BULB_GROUP_SPAN` 1.5 m of the run's first become one lamp at their middle. The group reaches the outer bulb's range and carries the summed energy. Weights: lamp, bulb and neon 1 (neon in its own colour), window and portal 0.4. 661: - Selection: the 32 whose sphere (range + `FRUSTUM_MARGIN` 1 m) touches the camera frustum, ranked by weight x range, then nearest the camera target, then by id. The order never depends on the order of the sources. The scan runs in rank order and stops once nothing left can enter (same choice as the full scan, tested). 662: - Bins: an 8x8 grid over the union of the chosen lamps' discs. A cell keeps the 4 best lamps by weight x (range - distance to the cell), then index, and counts the rest as bin overflow. 663: - Strength = energy x weight x `Dusk.level` (exactly `WorldView.lamp_power`), so a leaf will light at its lamp's turn in the evening. 664: - `WorldView`: `_ready` makes and binds the list; `_lights_commit` marks it stale; `_update_lighting` ticks it first, before that frame's light pass, held while a release or cluster queue is draining. The `profile` line moved up (it is pure in the environment). 665: - Refresh rule: choose once on the frame after a light pass, and once when the camera has been still for `SETTLE_SECONDS` 0.2 s at a view it has not chosen for. This is the settle detector; the key is the camera's transform, projection, size, fov, clip planes, offsets and viewport. A dusk change re-uploads the strengths only, and only when one moved by `STRENGTH_STEP` 0.01. Nothing is uploaded while nothing changes. 666: - `project.godot` `[shader_globals]` declares the four globals in the pinned 4.6.3 format. The import left the file byte-identical. 668: Files: `scripts/foliage_lamps.gd` (new, 417 lines, plus its `.uid`), `scripts/world_view.gd` (+13 -1), `project.godot` (+16), `tests/test_foliage_lamps.gd` (new, 500 lines, plus its `.uid`), `tools/test.sh` and `tools/Test.ps1` (the new suite, last). 669: - Snapshot: `build/backup-feel/24-P6-b/` (= main 6bc3cec). At part start the live tree matched it exactly (`b/diff-live-vs-24-P6-b.txt`, empty). At the end only the files above differ (`b/diff-live-vs-24-P6-b-after.txt`). 670: - Pre-part tree: `b/pre-tree`. Backups: `b/backup/`. Everything below is under `artifacts/beautify/24-P6/b/`. 672: - **Tests:** 673: - Test-first log `logs/testfirst-test_foliage_lamps.log.out`: 9 checks, 6 failures (no script, no globals, no view field). 674: - After: `logs/r3-test_foliage_lamps.log.out` 84/0. Affected suites: `logs/after-test_owner_0924.log.out` 87/0 (its :225 globals check unaffected), `after-test_release_spread` 107/0, `after-test_lighting` 189/0. 675: - A mutation run that drops the release hold fails exactly the release check (`logs/mutation-busy-test_foliage_lamps.log.out`; file restored). 676: - Full suite (`suite.sh` a, b, v = `VERIFY_RES=2880x1800 tools/suite_all.sh b/suite`; 11:31-11:38; AC, 100%, Low Power Mode 0; `suite-power.txt`): **41 suites, 21,498 checks, 0 failures** (P6a 21,414 + 84 new). 677: - `--verify` 2880x1800 exit 0 on try 1 in 33 s, `PIXELPUNK_INTEGRATION []`. The creature_reactions rerun had 5,549 checks and 0 failures; the known flaky check did not fire. 1440x900 was not run (the inherited stall). 678: - **Changed expectations (old → new):** none. New suite `test_foliage_lamps`: 679: - the four globals declared with their types, and the renderer lists them; 680: - the sphere test equals `Camera3D.is_position_in_frustum` at radius 0; 681: - bulb grouping, weights and neon colour; 682: - the 32 chosen equal a full sort over 12 random layouts, half of them tie-heavy, and the early-stop scan and the unranked scan agree; 683: - all 64 bins of 40 random layouts and the overflow count equal a brute-force reference; 684: - the 32 texels and 64 bin texels; 685: - strength = energy x weight x `lamp_power` at 01:00, 13:00, 20:45, 20:54 and 06:00; 686: - in a WorldView: one choice on the frame after a light pass, none while idle, none while the camera moves, one after it settles, none on returning to a chosen view, one strength upload per dusk change and none under the step, none while a release drains, and at most one after it. 687: - The headless renderer returns null from `global_shader_parameter_get`, so the values set are checked in the source, not read back. 688: - **Probe** (`probe/probe.gd`, headless 1600x1000 viewport, night and 20:45; JSON per view in `probe/`; `probe.out`; AC, Low Power Mode 0, `probe/power.txt`). Results are equal at both hours. 689: - Harbour (H camera): 170 sources → 163 lamps (11 bulbs → 4). 163 are in view and 32 are chosen (24 lamps, 6 neon, 2 bulb groups). **Overflow 131** (122 windows, 4 lamps, 3 portals, 2 bulb groups); **bin overflow 14**. 690: - Lane camera: 161 in view, overflow 129, bin overflow 14. 691: - Quarter: 203 → 186 (25 bulbs → 8), all in view; 32 chosen (18 lamps, 14 neon). **Overflow 154** (109 windows, 37 lamps, 8 bulb groups); **bin overflow 54**. 692: - Dense: 2,110 (no bulbs), 1,937 in view; 32 lamps chosen; overflow 1,905; bin overflow 0. 693: - For P6c, plants (trees, blossom, conifers, shrubs, flower patches) in view with a lamp in reach that is only among the left-out: Harbour 6 of 31, quarter 8 of 47, dense 55 of 87. Each JSON lists them by id with the lamps they miss. 694: - CPU cost of a choice (median of 21): Harbour 0.39 ms after a light pass (0.16 of it building candidates), 0.23 ms on a settle. Quarter 0.50 / 0.30. Dense 2.42 / 0.49 (candidates 1.9 ms). 695: - An idle tick costs 1.4 µs; `_update_lighting` idle is +2.7 µs on Harbour and +2 µs on dense against the pre tree (`probe/tick.out`). 696: - **Acceptance:** 697: - 32 texels and 64 bins match the reference: **met** (tests above). 698: - Overflow 0 on Harbour and the quarter: **not met, reported**. Lamps in view past the 32: 131 and 154. Bin overflow: 14 and 54. Neon (range 3.4) outranks lamps (3.2) under weight x range, so on the quarter 37 lamps lose to 14 signs. 699: - Refresh at most once per emitters_dirty, settle or dusk change: **met** (tests). A diagnostic drag on a printing copy of the live tree (`diag-tree`, `bench/drag-diag/run.out`) made 44 choices for the run's 43 light passes plus the first, and no dusk uploads. 700: - Drag steps untouched: **met on step_total; not shown for the frame median**, which runs about 0.2-0.3 ms higher with the tick on, unresolved. Measured with `bench.sh drag`, Harbour drag harness, 1600x1000, `--disable-vsync`, pre and live alternating, rounds 1-3 after a warm-up (`drag-summary.txt`), plus rounds 4-5: 701: - handle `step_total` median 17.215 → 17.271 ms and p95 48.24 → 48.57; 702: - wall_stroke 8.72 → 8.58; terrain raise 126.5 → 126.9; release_ms medians within noise; 703: - digests identical; draw calls 883 both; errors none; 704: - frame median 8.96 → 9.24 ms, higher in 5 of 5 rounds. 705: - The same tree with the tick switched off and on (`diag.sh`, `bench/diag/`, 6 pairs back to back, 11:48-11:53, under a background load. mediaanalysisd at about 60% CPU was seen in the session but is in no file, and the `diag start` blocks in `bench/power.txt` have no load line; the load averages logged either side are 3.52 / 3.91 / 3.47 at 11:43 and 3.62 / 3.65 / 3.50 at 11:53. Qualified after the handoff check): tick on was slower in **4 of 6 pairs** (8.633/9.419, 8.722/9.327, 9.395/8.948, 9.018/9.433, 9.081/9.197, 9.589/8.954 ms off/on). Medians 9.05 off and 9.26 on (+0.21); paired difference median +0.27, mean +0.14 (`review/frame-medians.txt`). With rounds 1-5 above, tick on is higher in 9 of 11 pairs. This supports a real shift rather than noise. 706: - A choice during a drag costs 0.51 ms median (max 0.63) on the frame after each light pass, 44 frames of 718. That adds only about 0.03 ms to the mean frame, but it can move the median of a distribution this wide (p95 48 ms). That is a plausible cause, not a shown one. 707: - raw_* fields are 0 in drag mode (the harness does not fill them). 708: - **Bench, release probe** (`bench.sh release`, `probe/release.gd`: the Feel P1c probe plus the two lighting frames after the drain; 3 alternating runs; `release-summary.txt`): 709: - The release frame is unchanged: Harbour animations on 30.60 → 30.50 ms, off 25.01 → 25.16; dense on 101.58 → 102.75, off 111.35 → 111.54. 710: - Worst slices and spread totals are within noise. 711: - The first lighting frame after the drain, where the choice runs: Harbour +0.47 ms (1.01 → 1.48), dense +2.8 ms (82.0 → 84.8; that frame is mostly the local-light selection's fallback, in both trees). 712: - The P1c "26.7 ms against 25" is a different sitting and probe setup; this sitting measures 30.6 ms before P6b and 30.5 after. 713: - **Static frame A/B** (`bench-smoke.sh`, copy of P6a's: dense and Harbour at night, 1920x1080, `--disable-vsync`, rain 0.45, rounds 1-3; `bench-smoke/summary.txt`). Raw p50 medians: dense 12.915 → 12.991 ms, Harbour 6.780 → 6.756. Raw p95: dense 14.77 → 14.88, Harbour 8.60 → 8.43. Draw calls identical (2362, 903). 714: - Power: every run was on AC, 100%, Low Power Mode 0 (`bench/power.txt`, `bench-smoke/power.txt`, `suite-power.txt`). 715: - **Journey count deltas (declared): none.** Nothing drawn reads the globals yet; draw calls and objects are unchanged. 716: - **Not done:** 717: - No captures (the plan asks for none for this part). 718: - No 1440x900 `--verify`. 719: - Selection policy, open for the orchestrator before P6c: the plan's weight x range ranking leaves most windows and, on the quarter, 37 lamps out. A foliage-aware filter (only lamps whose light reaches a leaf) or a nearest-first ranking would cut the overflow. It is not in this part's scope; the probe JSON has the per-plant evidence. 720: - Dense pays 1.9 ms building candidates after each light pass. 721: - `pre-tree`, `diag-tree` (26 MB each) and `probe/parts.gd` are left for the orchestrator. 722: - The known flaky check is recorded as known (it did not fire). 723: - **Review fix (2 October 2026):** the review found that this entry called the tick off/on diagnostic a 3:3 split and the drag frame-median shift "within noise". The run files show tick on slower in 4 of 6 pairs, and in 9 of 11 pairs counting rounds 1-5. The acceptance line and the diagnostic bullet now report the 4:2 split and no longer say "within noise" (`review/frame-medians.js`, `review/frame-medians.txt`, recomputed from each `performance.json` `drag.totals.frame_ms.median`). Only this entry changed: no code, test or bench was re-run, and `step_total`, release and static-frame results stand. 724: - **Fix pass (orchestrator, 2 October 2026).** The orchestrator asked for three must-fix items. (1) Selection policy: a lamp enters only if its range reaches a foliage instance, from existing scene data with no new rng. Windows (0.4) must not crowd out lamps and neon. Cut the uncovered-plant count within the 32 texels and 64 bins, without raising the cap. (2) Daytime cost: no choice and no global upload while the lamp term cannot show, one choice when dusk begins, and cheaper dense candidate building with the same choice. (3) The drag frame median: at least 8 interleaved off/on pairs, at night and at 13:00, with the split. Nothing drawn may change. Pre-fix tree = `build/backup-feel/24-P6-b-fixpre` (P6b, 5140f39). During this pass it was also held as `build/backup-feel/24-P6-c`, but that folder was re-saved at 15:44 as the P6c snapshot (= 6f6ffa7), so it no longer holds P6b (corrected 2 October by the orchestrator after the handoff check). Evidence is under `artifacts/beautify/24-P6/b/fix/`, and backups are in `fix/backup/`. 725: - **What changed:** 726: - `foliage_lamps.gd`, the leaves: `leaf_span` gives a plant's leaf span from its kind, crown spec and size. Leaves are vertical spans thickened by a radius, in a uniform XZ grid (`leaf_index`, `reaches`, `reached_by`, exact test dxz²+h² < (r+radius)²). 727: - The choice: tiers first, so lamps, bulbs and neon always rank before windows and portals (`TIER_LIFT`, `LOW_TIER`). A lazy greedy cover (`_cover`) then picks the lamps that light the most target plants in view that are not yet lit. Targets are trees, blossom, conifers, shrubs and flower patches (`Composition.FOLIAGE_KINDS`). It covers the lamp tier first, then the window tier for plants still dark. A ranked fill takes the remaining slots, and only lamps that reach a leaf may enter it. 728: - The day gate: `lamps_show` is `Dusk.progress > 0`. By day `_go_dark` empties the published list once and nothing runs; the first frame of dusk makes one choice. 729: - Candidate caching: equal sources reuse the candidates. A large source list is built `CAND_SLICE` 512 per frame (`CandidateJob`), with the same result. Two memos persist across light passes: the reach memo and the per-lamp cover memo. 730: - The leaf grids are rebuilt only when the plant or ivy list really differs. A plant list in which at most half the targets moved, came or went patches the cover memo, re-testing only those targets (`_patch_cover`). 731: - `world_view.gd`: `foliage_plants`, `foliage_ivy` and `foliage_leaves` read `deco_seen` and `ivy_shown`. The stamps `_mark_foliage` are set after each full sync and after the release ivy step, and a drag step (`sync_live`) holds the leaves. 732: - **Tests:** 733: - Test-first `fix/logs/testfirst-test_foliage_lamps.log.out`: 90 checks, 9 failures. For the cover patch, `testfirst2-…`: 1 failure plus a script error. 734: - Final `fix/logs/r16-test_foliage_lamps.log.out`: **137/0**. It checks: 735: - the grid reach equals brute force on random layouts; 736: - a lamp with no leaf in reach is never chosen (synthetic reference); 737: - tier order, and the cover equals a reference greedy; 738: - determinism under shuffled sources; 739: - bins equal the brute-force reference; 740: - no choice or upload by day, one at the dusk change, none while nothing changes; 741: - candidate reuse, slices equal to the one-go build, and 1,300 sources choosing once on frame 3; 742: - every patched memo entry equals a fresh `reached_by`, and the choice equals a no-memo choice after a moved plant and after an added plant; a list with most targets moved drops the memo. 743: - Full suite (`fix/suite.sh` a, b, v, `VERIFY_RES=2880x1800`, `fix/suite/`): **41 suites, 21,551 checks, 0 failures**. `--verify` exit 0 on try 1, `PIXELPUNK_INTEGRATION []`. test_owner_0924 87/0, test_release_spread 107/0, test_lighting 189/0. 744: - **Changed expectations:** `reference_select` and the rank check in `test_foliage_lamps` now rank windows and portals after lamps, bulbs and neon (old: weight x range alone). 745: - **Probe** (`fix/probe/probe.gd`, `fix/probe/final/`, the same views and metric as P6b; 01:00 and 20:45 equal): 747: | View | Plants left only to left-out lamps (P6b → now) | Reaching past the 32 (in view past 32, unchanged) | Bin overflow (P6b → now) | 748: |---|---|---|---| 749: | Harbour | 6 of 31 → **0** | 95 (131) | 14 → 17 | 750: | Lane | 5 of 25 → **0** | 95 (129) | 14 → 17 | 751: | Quarter | 8 of 47 → **1** (0 by the leaf model, 3 at bin level) | 124 (154) | 54 → 40 | 752: | Dense | 55 of 87 → **55** | 1,898 (1,905) | 0 → 0 | 754: - Harbour and the quarter: the cover lights every coverable target (56 of 56; 47 of 47) with 26 and 18 picks. 755: - Left out on Harbour: 80 windows, 9 lamps, 4 bulb groups, 2 portals. On the quarter: 81 windows, 37 lamps, 6 bulb groups. They light only plants a chosen lamp already lights, or ivy. 756: - Dense: its lamps each reach about one target, so 32 lamp slots light 32 of the 94 targets. A greedy that mixes tiers would light 64, but only by handing lamp slots to windows, which item 1 rules out. 55 is the best number under the tier rule and the cap. 757: - **Cost** (probe, median of 11): 758: - Harbour choice after a light pass with new sources: 0.78 ms (P6b 0.39); settle 0.51 (0.23); cold 1.58. 759: - Dense: 2.47 ms (2.42). Its candidates take 0.42 ms per slice over 5 frames instead of 1.9 ms in one. 760: - Idle tick 3-4 µs. 761: - **Drag, tick off/on** (`fix/diag-tree` = live + an `FL_OFF` switch and a per-frame log; `bench.sh onoff`, 10 interleaved pairs per hour, order swapped every other round; no other Godot; AC, 100%, Low Power Mode 0, `fix/bench/power.txt`; `fix/bench/onoff-summary-night.txt` and `-day.txt`): 762: - **Night:** 763: - Harness frame median: off 8.507, on 8.674 ms. Paired on-off median **+0.178** (mean +0.181), on higher in 10 of 10. 764: - Split: p25 +0.025, p50 +0.174, p75 +0.172. With each frame's own tick time removed, the p50 difference is −0.013 (5 of 10). 765: - So the whole shift is the tick's own work: 42 choices per run, 70 ms in total (about 1.7 ms each; 32 candidate builds, 34 leaf-grid builds, 29 of them cover patches). They fall on the frames after the drag steps' light passes. 766: - Before the cover patch it was 81-97 ms per run and +0.220 ms. 767: - **13:00:** 768: - Off 8.397, on 8.460 ms. Paired median +0.029 (mean +0.026), on higher in 7 of 10; p75 −0.098. 769: - No choice and no upload; the tick takes 3-4 µs a frame. 770: - With the tick time removed it is still +0.026, so the difference is not the tick's work. The order split is off-first +0.063, on-first −0.007. 771: - **A/B against the pre-part tree** (`bench.sh ab`, rounds 1-3 after a warm-up, `fix/bench/ab-summary.txt`): 772: - Night frame median 8.548 → 8.637 ms (paired +0.089). 13:00: 8.251 → 8.263 (paired −0.018). 773: - Handle `step_total` medians are equal within 0.1 ms; errors none. 774: - **Release** (`bench.sh release`, 3 rounds, `fix/bench/release-summary.txt`): 775: - The release frame and worst slices are unchanged at both hours. 776: - 13:00: the lighting frames after the drain are unchanged (Harbour 0.994 → 0.991-0.998 ms). 777: - Night: the first lighting frame on Harbour is 0.99 → **3.30 ms** (P6b 1.48), because the choice runs on new sources and leaves. Dense frames 3-6 worst 0.003 → **3.72 ms** (candidate slices, then the choice). 778: - **Captures** (`fix/cap.sh`, 7 views; `fix/cap/after`, `after2` live, against `before`, `before2`, `before3` pre-tree and `p6b`, `p6b2`): 779: - Integer counts, draw calls included, are identical before → after, P6b → after and after → after2 in all 7 views (`fix/cap/counts-final.txt`). 780: - Whole-frame change sits inside the same-tree noise pairs in 3 views (harbour-day, lane-night, quarter-2045). Four are slightly over (`fix/cap/pairs-final-table.txt`, largest cross pair against the largest same-tree pair): quarter-night 12.3% against 10.9%, quarter-day 12.26% against 11.90%, harbour-night 24.03% against 23.00%, and grove-day 0.16% against 0.09%. (Corrected 2 October by the orchestrator after the handoff check: this line said 5 inside and two over.) 781: - In the sheets the differences are the time-driven lamp glow pulse, water, rain and sway, which differ just as much between two captures of the same tree (`fix/sheet/fix-final-before-after.png`, `noise-before-pair-harbour.png`, `noise-after-pair-harbour.png`). 782: - **Journey count deltas: none** (nothing reads the globals yet). 783: - **Not done:** 784: - Overflow 0: impossible under the 32 cap. Even past-32 lamps that reach a leaf number 95 on Harbour and 124 on the quarter. 785: - Dense is still 55 uncovered (above). 786: - The night drag choice (about 1.7 ms each) and the night post-release frame (+2.3 ms Harbour, +3.7 ms dense) cost more than P6b's 0.51 and 0.47 ms. 787: - No 1440x900 `--verify`. 788: - `pre-tree`, `diag-tree` and `p6b-tree` are left for the orchestrator. The known flaky check did not fire. 789: - **Second fix pass (orchestrator, 2 October 2026).** After the first fix pass's review, the orchestrator ruled three items must-fix: 790: - (1) Dense stays at 55 of 87 uncovered. This needs an orchestrator ruling: either the strict tier rule, or a window pick when it lights more dark plants than any remaining lamp. 791: - (2) On the quarter, 3 plants whose chosen lamp is in reach are dropped by the 8x8x4 bins. 792: - (3) The night cost is above P6b. The first lighting frame after a release is 3.30 ms on Harbour and 3.72 ms on dense, and each drag choice frame's tick is about 2.05 ms on average, 4.0 ms at most (P6b 0.51). The ask is to slice the leaf read, the grid rebuild and the cover the way the candidates are sliced. 794: Nothing drawn may change. Pre-fix tree = the live first-fix-pass tree, which is the P6b tree (5140f39, now `build/backup-feel/24-P6-b-fixpre`; `24-P6-c` held it at 14:35, before its 15:44 re-save as the P6c snapshot) plus three files (`fix3/diff-live-vs-24-P6-c.txt`: `foliage_lamps.gd`, `world_view.gd`, `test_foliage_lamps.gd`); those three files (and the handoff) are backed up in `fix3/backup/` and built as `fix3/fix1-tree`. (Corrected 2 October by the orchestrator after the handoff check: this said "24-P6-c plus four files".) Evidence is in `artifacts/beautify/24-P6/b/fix3/`. 795: - **Item 1: not taken; left open for the orchestrator.** The choice is unchanged from the first fix pass. On dense the strict tier rule lights 32 of 94 targets; a one-pass cover that mixes tiers would light 64 of 94 (`fix3/probe/r4/dense-night.json` `cover` and `cover_one_pass`). The probe metric is still 55 of 87. 796: - **Item 2: fixed.** 797: - `bins` now takes the plants each cell must light: for every target in view that a chosen lamp reaches, its foot's cell and those lamps (`_needs`). 798: - A cell keeps its 4 best by weight x depth as before, unless they leave one of its plants dark. Then `_cell_cover` covers the cell's plants first (greedy: most dark plants lit, then score, then index), with the lamps they need even when a lamp's disc stops short of the cell, and the best fill the rest. 799: - Cells with no plant, or whose 4 best already light every plant, are the P6b bins exactly. 800: - Plants dark at bin level: quarter **3 → 0** (3 in `review/fix2/probe`; 2 by the new test's count in the test-first log), Harbour 0 → 0, dense 0 → 0 (`fix3/probe/r4`, `uncovered_bins`). 801: - Bin overflow is unchanged (Harbour 17, quarter 40, dense 0). The chosen lamps, overflow and cover counts are those of the first fix pass. 802: - **Item 3: fixed, by slicing the choice.** 803: - A choice is now a `ChoiceJob` that runs over frames. These stages run `UNIT` 32 at a time until the frame has spent `FRAME_USEC` 250 µs: the sliced compare with the last sources, the candidates, the plant and ivy reads (`WorldView.foliage_read` / `foliage_read_step`, with the read's own shape pass), the two leaf grids and the targets (`GridJob`, `TargetsJob`), the cover memo's patch, and each candidate's frustum test and targets. 804: - The cover, the ranked fill, the bins and the upload are heavy stages: each runs whole, at most one a frame, and only early in a frame (`HEAVY_START` 80 µs). 805: - The job keeps the sources, frustum and target it began with and publishes once, at its end, exactly what the one-go `refresh` publishes (tested). 806: - A light pass during a job asks for the next one. A release draining holds it. The day drops it. 807: - Two costs found while measuring: `rank_of` copied a packed bucket on every append (0.26 ms on dense), and freeing the last light pass's 2,110 source dictionaries took 0.4 ms of one frame. The buckets are now Arrays, and old source lists are let go 128 a frame (`_release`). 808: - **Files:** `scripts/foliage_lamps.gd`, `scripts/world_view.gd` (`leaf_host`, the sliced reader; `foliage_plants` and `foliage_ivy` are now the reader in one go), `tests/test_foliage_lamps.gd`. 809: - **Tests:** 810: - Test-first `fix3/logs/testfirst2-test_foliage_lamps.log.out`: 142 checks, 5 failures (the gates, and "quarter: 36 lit, 2 dark at bin level"). 811: - Final `fix3/logs/r5-test_foliage_lamps.log.out`: **158/0**. New checks: 812: - bins with plants equal a brute-force reference on 60 random layouts; 813: - with no plants they are the P6b bins; 814: - a plant's only lamp joins its cell, including from off the cell's disc; 815: - the Harbour and quarter scenes have 0 plants dark at bin level; 816: - at one unit a frame a choice takes many frames, one unit each, publishes once, and equals the one-go choice in lamps, texels, bins, bounds and overflow; 817: - at the default budget a frame holds at most one heavy stage; 818: - a light pass mid-choice, a release hold, and the day are handled as above; 819: - 700 sources give the one-go result; 820: - the sliced plant and ivy reads equal the one-go reads and leave the scene's shape pass off. 821: - Affected suites (`fix3/logs/after-*`): test_owner_0924 87/0, test_release_spread 107/0, test_lighting 189/0. 822: - Full suite (`fix3/suite.sh` a, b, v, `VERIFY_RES=2880x1800`, `fix3/suite/`, 14:58-15:06): **41 suites, 21,572 checks, 0 failures**. `--verify` 2880x1800 exit 0 on try 1 in 33 s, `PIXELPUNK_INTEGRATION []`. The creature_reactions rerun had 5,549 checks and 0 failures; the known flaky check did not fire. 1440x900 was not run (the inherited stall). 823: - **Changed expectations (old → new):** 824: - A choice lands over several frames after a light pass, a settle or the dusk change (old: on the next frame). The view, day, cache, leaf-view and scene checks now run frames until no choice is under way (`choose`). 825: - 1,300 sources choose once over several frames, as in one go (old: on the 3rd frame, `CAND_SLICE` 512; the constant is gone). 826: - The upload check reads `_publish` (old: `refresh`). 827: - **Probe** (`fix3/probe/probe.gd`, `fix3/probe/r4/`; headless 1600x1000; AC, 100%, Low Power Mode 0). Each tick of a choice is timed, median of 11 choices (light pass with new sources / new sources and new leaves / settle): 829: | View | Worst frame, ms | Frames | Work, ms | 830: |---|---|---|---| 831: | Harbour | 0.289 / 0.316 / 0.268 (max 0.346) | 6 / 11 / 5 | 1.06 / 2.64 / 0.71 | 832: | Quarter | 0.302 / 0.303 / 0.281 (max 0.369) | 6 / 11 / 5 | 1.29 / 2.56 / 0.81 | 833: | Dense | 0.367 / 0.368 / 0.283 (max 0.494) | 20 / 31 / 8 | 5.29 / 8.50 / 1.57 | 835: - Every stage step is at most about 0.30 ms (`stage_max_usec`). 836: - The first choice after loading takes 13 frames on Harbour and 49 on dense (cold reach memo). 837: - In one go (probes and tests only), a cold dense choice is 20 ms (`fix3/probe/oneshot.out`). Most of it is the reach test of 2,110 lamps, the same `reached_by` cost on the first-fix-pass tree (6.85 against 6.87 ms; `fix3/probe/reach-*.out`). 838: - **Drag, tick off/on** (`fix3/diag-tree` = live + `FL_OFF` and a per-frame log; `fix3/bench.sh onoff night`, 10 interleaved pairs, 15:11-15:17; `fix3/bench/onoff-summary-night.txt`): 839: - Frames with a choice under way: tick **median 0.268 ms, max 0.559 ms** over the 10 runs. The first fix pass was 2.06 ms median and 3.99 ms max on its choice frames (`fix3/frames.js` on `fix/bench/onoff-night-on-1`, `-2`); P6b was 0.51 ms median. 840: - Choices per run: 24.5 (first fix pass 42; a choice under way takes in the light passes during it). Tick total per run: 67.5 ms (86). 841: - Harness frame median: off 9.136, on 9.248 ms. Paired median **+0.099** (mean +0.139), on higher in 8 of 10 (first fix pass +0.178, 10 of 10). The work now sits on about 270 of the run's 800 frames, at about 0.27 ms each. 842: - **A/B against the pre-part tree** (`bench.sh ab`, rounds 1-3 after a warm-up, `fix3/bench/ab-summary.txt`): 843: - Night frame median 8.983 → 9.234 ms (paired +0.160). Handle `step_total` median 17.27 → 17.30; p95 48.0 → 49.4, and 48.0 → 48.0 in round 3. 844: - 13:00: frame median 8.903 → 8.904 (paired +0.001); `step_total` 17.37 → 17.47. 845: - Errors none. 846: - **Release** (`bench.sh release`, `fix3/probe/release.gd`: the probe with each of the 40 lighting frames after the drain timed; pre-part, first-fix-pass and live trees, 3 rounds; `fix3/bench/release-summary.txt`): 847: - The release frame and worst slices are unchanged in all three trees. 848: - **Harbour night** (animations off): first lighting frame 0.999 → **1.299 ms** (first fix pass 3.390). Then 0.281 and at most 0.285 in frames 3-6 (first fix pass 0.011 and 0.007). 849: - **Dense night:** frames 3-6 worst 0.003 → **0.326-0.341 ms** (first fix pass 3.875-3.934); second frame 0.35 (0.46). 850: - Sum of the 40 frames: Harbour 3.10 → 5.97 ms (first fix pass 5.58); dense 245.1 → 254.2 (251.0). Slicing adds about 0.4 ms (Harbour) and 3 ms (dense) of work in total. 851: - Every tree has one ~1 ms (Harbour) or ~81 ms (dense) frame in the 40, the periodic local-light selection. 852: - 13:00: unchanged in all trees. 853: - **Captures** (`fix3/cap.sh`, 7 views, 15:06-15:09, the before set starting at 15:06:21 per `fix3/cap-power.txt`; before and before2 = `b/pre-tree`, after and after2 = live): 854: - Integer counts, draw calls included, are identical before → after, after → after2 and before → before2 in all 7 views (`fix3/cap/counts.txt`). 855: - Whole-frame change is inside the noise pairs in 5 views (`fix3/cap/pairs-table.txt`). Quarter-night is 9.97% against a noise maximum of 7.72%, and quarter-2045 6.61% against 6.57%. 856: - The sheets show only rain, water and the courtyard glow pulse, which swings just as much between two captures of the pre-part tree (`fix3/sheet/before-after.png`, `noise-before-pair-harbour.png`, `noise-after-pair-harbour.png`, `noise-before-pair-quarter.png`). 857: - No shader reads the globals, and project.godot and the shaders are untouched. 858: - **Journey count deltas: none.** 859: - **Not done:** 860: - Item 1's ruling (above). 861: - The night drag frame median is still +0.10 to +0.16 ms above the pre-part tree. The work is spread, not removed: it is less in total than the first fix pass, and no frame carries more than about 0.6 ms of it. 862: - No 1440x900 `--verify`. 863: - `fix3/diag-tree` and `fix3/fix1-tree` (26 MB each), and `fix3_release_probe.gd` in `b/pre-tree`, are left for the orchestrator. 864: - Review: filled by the orchestrator. 865: - Platforms: Mac run; Windows not run. 867: **Beautify P6a Cool ramps, shadow-side outline and the darkening stamp (2 October 2026):** Opus 5.5 on this Mac (report Signature C "ship with it"; trees lens finding 3, revised proposal). There is an owner gate: the owner looks at the sheet while P6b and P6c go ahead, and P6d waits for the answer. 869: What changed: 870: - Every leaf ramp now shades toward a cool dark instead of black. A new helper, `Architecture.leaf_dark(c, k, blossom)`, lerps the colour k of the way to `COOL_DARK` 1c2c36 (`COOL_DARK_BLOSSOM` 3b2140 under blossom). It also stamps `COLOR.a = c.a x (1 - k)`. Shadings compose, so the stamp holds the whole shading. 871: - Every `darkened()` on a leaf colour now goes through the helper: 872: - the broadleaf and blossom crowns; 873: - the conifer tiers, and the hem lumps, which now shade on from their tier; 874: - the shrub, planter, `ivy_drape` mound and strands, `garden_flowers`, the weeds and wildflowers bases, the ivy rosette and the bonsai. 875: - `COOL_RAMPS` false restores the black ramps; the stamp stays either way. The owner decline is two lines: `COOL_RAMPS = false` and the first check of `cool_ramp_checks` flipped to `== false` (run on a scratch tree in the review fix, below). 876: - `foliage.gdshader`: 877: - OUTLINE 0.5 → 0.6, and the ring's darkening 0.55 → `OUTLINE_DARK` 0.40, in the albedo and in the night floor. 878: - `sun_side = step(RING_SUN_FACING, dot(wn, sun_direction)) x (1 - smoothstep(RING_DAY 0.2, 1, night_amount))` takes the ring off sun-facing faces by day. Sun-side rims take `SUN_RIM_LIFT` 0.10 instead. 879: - At night the ring runs all round. 880: - No rng draw was added and no vertex moved. 882: Files: `scripts/architecture.gd` (+27 -9), `scripts/tree_growth.gd` (+10 -3), `shaders/foliage.gdshader` (+20 -5), `tests/test_foliage.gd` (+210 -4), `tests/test_nature.gd` (+10 -2), with the review fix. 883: - Snapshot: `build/backup-feel/24-P6/` (= main af4df88). At part start the live tree matched it exactly (`a/diff-live-vs-24-P6.txt`, empty). At the end only these five files differ (`a/diff-live-vs-24-P6-after.txt`). 884: - Pre-part tree: `a/pre-tree`. Backups: `a/backup/` and `a/backup-round1/`. 885: - Everything below is under `artifacts/beautify/24-P6/a/`. 887: - **Deviations from the plan values:** 888: - `RING_SUN_FACING` is 0.6, not the report's 0.1. Round 1 used 0.1 and took the ring off nearly every face by day (`look/r2-grove-small.png`, middle panel), because the crown normals lean up and the day sun is high. 0.6 is band3's lit tone (d 0.72). 889: - The day fade is `smoothstep(RING_DAY 0.2, 1, night_amount)`, not `(1 - night_amount)`. The day anchors have windows 0.12-0.20, and with `(1 - night_amount)` they kept a 5-8% ring. 890: - The test's cool floor is 0.065 linear, against the plan's "about 0.07". The darkest conifer vertex is 0.0718 and grown conifer hue 0 is 0.0688. 891: - **Tests:** 892: - Test-first log `logs/testfirst-test_foliage.log.out`: 253 checks, 34 failures. 893: - After: `logs/after-test_foliage.log.out` 253/0, `logs/after-test_tree_growth.log.out` 256/0, `logs/after-test_nature.log.out` 282/0. 894: - Full suite (`suite.sh` a, b, v = `VERIFY_RES=2880x1800 tools/suite_all.sh a/suite`; 10:32-10:39; AC, 100%, Low Power Mode 0; `suite-power.txt`): **40 suites, 21,414 checks, 0 failures** (P5 close 21,367 + 47 new checks in test_foliage, 206 → 253). 895: - `--verify` 2880x1800 exited 0 on try 1 in 33 s, `PIXELPUNK_INTEGRATION []`. The creature_reactions rerun had 5,549 checks and 0 failures; the known flaky check did not fire. 1440x900 was not run (the inherited stall). 896: - The first suite (`suite-1/`) failed test_nature's OLD_LOOK check (`logs/suite1-test_nature.log.out`). That is the deliberate leaf colour change; see below. 897: - **Changed expectations (old → new):** 898: - test_foliage "The tree crown is green on every vertex" (g over r and b) → "green to teal": hue 90-175 degrees, g over r. 899: - test_foliage "crown brighter than underside x1.2" → x1.15 for blossom (measured 1.18; plum is lighter than black). The tree keeps x1.2. 900: - test_foliage FLOOR_FRAGMENT_PARITY floor line: `(1.0-edge*0.55)` → `(1.0-edge*OUTLINE_DARK)`. 901: - test_nature OLD_LOOK: the 24 shrub and flower_patch prints were re-recorded by `probe/old_look.gd`. The probe reproduced all 24 old prints on the pre tree, and on the P6a tree the geometry (vertices, uv and every non-leaf colour) is identical; only the leaf colours changed. 902: - test_tree_growth `_low_luma` needed no change. The ratio is now 0.91, against ≥ 0.85. 903: - **New checks:** 904: - `COOL_RAMPS` is on (the one owner-gate check), and the two colours are as given. 905: - `leaf_dark` lerps and stamps the alpha, compositions hold, and lightening keeps the stamp. 906: - No leaf vertex of 17 kinds × hues × sizes is below the cool floor. 907: - Alpha is 0.4-1, and every ramped kind stamps. 908: - `COLOR.a = 1 - deep x (1 - t)` on every tree and blossom crown vertex (default, 12 m, 23.6 m), and every vertex is "the base shaded 1 - a toward the dark, then lightened". The same shape check runs on conifers and shrubs. 909: - Blossom undersides are plum: b ≥ 0.92 r (it was 0.908). Declined, this is a pink check (r and b over g). 910: - Pre-P6a leaf fingerprints for 12 kinds (no new rng, triangles unchanged). 911: - Outline constants and lines, plus no sun-side ring at the 09:00, 13:00 and 16:30 anchors. 912: - **Captures** (`caps.sh`, one sitting, 10:39-10:44, in the order `pre-1`, `after-1`, `pre-2`, `after-2`; AC, Low Power Mode 0; `cap-power.txt`): 12 views, all on try 1. They are quarter-dry, quarter-night, grove-day, glade-day, lane-day, quarter-day, quarter-golden, harbour-night, harbour-day, lane-night, glade-night and grove-night. 913: - Round sets: `pre-r1`/`after-r1` (RING_SUN_FACING 0.1) and `after-r2`. 914: - Diagnostic trees in `diag/` (`diag.sh`): `pre-noring`/`after-noring` (ring darkening 0, for the ring split), and `ramps-only`/`ring-only` (the owner split). 915: - Looked at: `look/r1-crowns.png`, `r1-grove.png`, `r2-grove.png`, `r2-grove-small.png`, `r2-quarter-day.png`, `r2-quarter-day-left.png`, `r2-glade-day.png`, `r2-nights.png`, `r2-grove-night.png`, `r2-lane-blossom.png`, `r2-golden.png` and `r2-lane-day-full.png`, plus the sheet pages. 916: - What they show: 917: - By day, undersides go from black or near black to a dark teal-green, and from dark purple to plum under blossom. 918: - The sun-side silhouettes lose the dark band, while the shadow side keeps a thinner one. 919: - The night views change little. 920: - **Acceptance** (`metrics/`; noise pairs `noise-pre.txt` and `noise-after.txt`): 921: - Lower-crown p10 (`crowns_low`) at least 8: **met** (and already met before P6a, by the P1b floor). 922: - quarter-dry 11.7 → 13.7 and quarter-night 11.9 → 12.0, the same in both pairs. 923: - Mean #0e1923 → #0e1d28; the report's target range is 0b152b-19364b. 924: - Share below 0.1: 51.4 → 38.0% (dry) and 52 → 42.1% (night). 925: - By day in grove-day, no ring on the sun side: **met within noise** (`ringsplit.txt`, against the no-ring trees). 926: - Ring pixels on bright (lit, luma ≥ 140) faces: 1,905 / 1,897 → 316 / 320, mean -96 → -68. The cross-tree noise is 700-960 pixels brightened by more than 8. 927: - Ring pixels overall: about 19,900 → 9,450. 928: - Triangles unchanged: **met**. The leaf fingerprints are identical for every kind (test and `probe/after.log.out`), and draw calls and rendered objects are identical in all 12 views in both pairs (`counts-1.txt`, `counts-2.txt`). 929: - **Orchestrator brief "by day in grove-day nothing may change on the sun side": not met as written.** Removing the ring there (a plan line) brightens the sun-side rims (`sunside.txt`): 930: - Of the pixels lit at luma ≥ 140 before, 82% are unchanged and 18% are brighter by more than 8 (mean +3.96 luma; noise 0.1%). 931: - The lit lobe tops themselves keep their colour (ramp share k is 0 at the top). 932: - The shaded side changes a lot: grove-day crowns p50 34.4 → 54.4 and conifers 43.9 → 58.0. Harbour-day crowns p10 0.1 → 7.9; glade-day crowns p50 47.1 → 54.9. 933: - **Bench** (`bench.sh`, `bench-t1.out`, `bench-t13.out`, `bench/summary.txt`, `bench/power.txt`; pre tree against live, interleaved, round 0 discarded, rounds 1-3, `--disable-vsync`, 1920x1080, rain 0.45; AC, Low Power Mode 0). Raw p50 medians, pre → live: 934: - Night: dense 13.080 → 13.045 ms (live slower in 0/3 rounds); Harbour 6.511 → 6.512 (1/3). 935: - 13:00: dense 12.643 → 12.658 (1/3); Harbour 6.126 → 6.150 (2/3). 936: - p95 medians: dense 15.17 → 15.10 and 14.59 → 14.70; Harbour 9.03 → 8.78 and 8.08 → 7.77. 937: - Draw calls are identical (2362 and 903). 938: - Reading: within noise. 939: - **Journey count deltas (declared): none.** Drawn content changes in every view with trees (colours only). 940: - **Owner sheet** `a/sheet/` (`sheet.md`, `p6a-before-after.png`, `p6a-split-grove.png`, `p6a-split-quarter-day.png`, `p6a-split-quarter-night.png`; the split pages read before | ramps only | ring only | both). 941: - **Not done:** 942: - The shader does not read the stamp yet; that is P6c's lamp term. 943: - No 1440x900 `--verify`. 944: - Glade night keeps its floor palette, but its leaf albedo takes the cool ramp too (glade-night crowns #372531 → #402b3c). 945: - `pre-tree` and `diag/` are left for the orchestrator. 946: - The known flaky check is recorded as known (it did not fire). 947: - **Review fix (2 October 2026).** The review found two must-fix items. (1) The decline path was not "a one-line revert plus a test flip": on the reviewer's decline tree (`a/review/`, `COOL_RAMPS` false and the first check flipped) test_foliage failed 11 checks (`a/review/decline-test_foliage.log.out`: the test's `cool_dark()` read `COOL_DARK` whatever `COOL_RAMPS` said, so the lerp, crown, conifer and shrub ramp checks expected the cool dark; the cool floor and the plum underside cannot hold on black ramps), and test_nature's OLD_LOOK failed on all 24 shrub and flower_patch prints (`a/review/decline-test_nature.log.out`), because the stamp stays and the prints differ again. (2) The owner sheet gave that wrong procedure. 948: - Fixed in the tests only (no script or shader changed, so no re-capture and no bench): test_foliage `cool_ramps()` reads `COOL_RAMPS`, and `cool_dark()` returns black when it is false; the cool-floor check runs only with the cool ramps; the plum check becomes "pink on every vertex" when declined; the gate check's message now names both answers. test_nature gains `OLD_LOOK_DECLINED`, the 24 shrub and flower_patch prints of the decline state, recorded by `probe/old_look.gd` on `a/fix/decline-tree` (`a/fix/probe.sh`, `a/fix/probe/decline.log.out`; the same geometry prints as the live tree, and the live prints equal `OLD_LOOK`). `old_look_checks` merges them in when `COOL_RAMPS` is false. 949: - The decline run: `a/fix/make-decline-tree.sh` copies the live tree and applies exactly the two documented lines (its diff output shows only those). test_foliage 252/0 and test_nature 282/0 there (`a/fix/logs/decline-*.log.out`; 252 because the floor check drops out), and all 40 headless suites pass, 21,413 checks, 0 failures (`a/fix/suite-decline/suite_all.out`, 11:01-11:07; AC, 100%, Low Power Mode 0). No `--verify` on the decline tree. 950: - The live tree after the fix (`VERIFY_RES=2880x1800 tools/suite_all.sh a/fix/suite` a, b, v; 11:07-11:13; AC, 100%, Low Power Mode 0): **40 suites, 21,414 checks, 0 failures**, unchanged from the first run; `--verify` 2880x1800 exit 0 on try 1 in 32 s, `PIXELPUNK_INTEGRATION []`; the creature_reactions rerun 5,549/0, the known flaky check did not fire. 1440x900 not run (the inherited stall). 951: - `a/sheet/sheet.md` now states the two-line decline and points at the decline run. Backups of the pre-fix tests and sheet: `a/fix/backup/`. Changed expectations in the fix: none in the cool state; the decline state's test_nature prints are new (`OLD_LOOK_DECLINED`). Journey count deltas: none (no drawn change). 952: - Review: filled by the orchestrator. 953: - Platforms: Mac run; Windows not run. SOURCE: artifacts/beautify/owner-decisions.md (frozen copy, 5 October 2026) 171: ## P6a gate answered (owner, 2 October 2026, in chat) 173: "Approve all changes", said after the P6a sheet (`artifacts/beautify/24-P6/a/sheet/`) was sent. Read by the orchestrator as approval of everything on that sheet: the cool ramps (COOL_RAMPS stays true; dark 1c2c36, plum 3b2140 under blossom), the shadow-side ring with the sun-side ring removed by day (about 18% of grove-day sun-lit pixels brighten, mean +3.96 luma), and Glade's night leaves taking the cool ramp (crowns #372531 to #402b3c). The plan default (keep black undersides) therefore does not apply, and the P6d gate is cleared. Not covered by this answer: the open taste items on the P5 sheet, which the owner has not been asked about separately. 179: ## Orchestrator rulings after the P6b fix pass (2 October 2026, owner not asked) 181: | Item | Ruling | 182: |---|---| 183: | Dense stays at 55 of 87 plants lit only by left-out lamps | Strict tier reading stands (lamps, bulbs and neon always before windows and portals). Dense carries about 1,900 lamps and is a stress fixture; the one-pass mix that lights 64 of 94 targets would give lamp slots to windows, against the plan's window weight 0.4. Reported, not fixed. Harbour and lane are at 0 uncovered, the quarter at 1 (0 by the leaf model). | 184: | Quarter: 3 plants whose only chosen lamp the 8x8x4 bins drop | Carried to P6c as a known limit (a bin ranking that favours a plant's only lamp could reach 0). Not a P6b defect. | 185: | Night cost of a drag choice (about 2 ms on the choice frame, 42 per run, drag frame median +0.178 ms in 10 of 10 pairs; first lighting frame after a release 0.99 to 3.30 ms) | Accepted for now; drag step_total is unchanged and the 13:00 drag is within noise (+0.029). P6c's bench watches p95 and may slice the work across frames if the drag cost shows there. A further fix pass costs hours and is not taken. | 186: | lamps_show is Dusk.progress > 0 (new rule; engine omni lights do not switch off by day) | Recorded for P6c: the leaf lamp term is off by day while omni lights still glow faintly. | 188: ## P6e deferred (owner, 2 October 2026, in chat) 190: "Skip it for now." P6e (Windows perf and render kit for Signature C) is not run with the P6 close. It stays open: the kit, the exports of the pre-stage and final trees, and the PC run still owe the Windows numbers, and the P6 stage entry must say Windows was not run. The next scheduled export is M6 after P9 (D8), which is the natural place to pick it up. 192: ## P6 sheet approved (owner, 2 October 2026, in chat) 194: "P6 approved", after the P6 stage sheet (`artifacts/beautify/24-P6/close/sheet/`) was sent. Everything on it stays as built: cool ramps and ring (P6a, approved earlier), the lamp light (P6b and P6c, LAMP_GAIN 1.5 with the blossom share at 0.5), and the clustered terminators (P6d), including the open looks: P6d's pale petal specks that clip to near-white by day (Harbour 94 pixels, quarter at golden hour 200), modest lamp warmth on the big street trees, Glade night crowns redder where a lamp was lit, blossom darker by day with plum crevices, more 1-2 px clusters, the unmeasured settle pop, and dense at 55 of 87 plants lit only by left-out lamps. P6e (Windows kit) stays deferred.