nz-solar-potential

Archived: point-in-time note from 2026-09-24; may be out of date.

Handover, 24 Sep 2026: re-lay Queenstown with the new geometry, then diagnose on real LiDAR

Written by a cloud session that could change and test code but had no VM access and no LiDAR. Everything below is on main. The job now is to build with it, look at the results on real roofs, and fix what the real data shows.

Where things stand

Setup (on the laptop, which has git and gcloud)

cd <the repo>
git pull origin main
bash tests/run_all.sh                      # must pass before anything ships
./tools/sync_vm.sh                         # refuses if the VM is mid-build; do not --force without checking

Check that the new files reached ~/solar-map on the VM: src/outline_axis.py, src/plane_seams.py, tools/explain_obstructions.py, tests/synthetic/run.py. (sync_vm.sh skipped subdirectories until 24 Sep; it now passes --recurse.)

sync_vm.sh does not copy data/. data/roof_cases.json on main has six new cases (the table below). tools/cases.py also writes history into that file on the VM, so do not overwrite it blindly. Either re-add the six there (tools/cases.py add <id> "<note>"), or merge the two files. The VM is claude-doing-things, project downloads-417521, zone australia-southeast1-b.

Run long jobs on the VM detached (nohup ... > log 2>&1 &, or tmux) so a dropped SSH session does not kill them.

The run (on the VM, in ~/solar-map)

  1. bash tests/run_all.sh: the same result as on the laptop, on the VM’s Python.
  2. .venv/bin/python tests/test_golden.py --record, then look at the render of every golden whose count moved and record the reason in the commit (made on the laptop). Judge by the renders, not the counts.
  3. bash src/run_district_build.sh rebuilds all regions (incremental, which is a full build this once). Watch the log for STAGE FAILED.
  4. .venv/bin/python src/invariants.py <region> for each region.
  5. .venv/bin/python tools/cases.py check --render re-measures every flagged roof and renders the ones that changed to data/preview/cases.html.
  6. .venv/bin/python tools/explain_obstructions.py 5370328 5371137 5372604 shows, for every obstruction on those roofs, which detector drew it and how far its returns sit off the face’s plane.
  7. .venv/bin/python tools/predeploy_check.py; then, from the LAPTOP, tools/deploy_from_vm.sh. Look at what it shows, then run tools/deploy_from_vm.sh --push.

The six roofs from Josh’s 24 Sep review (tracked in data/roof_cases.json)

Roof ID Complaint What should have changed
11A Camp St 4735274 wonky roof lines walls at 40 deg, bounding box said 55; faces now straightened to 40
17 Church St 4726056 flat roof with plant, no panels confidence no longer penalises plant; should publish with panels between the plant
9 Marine Parade 5370328 wrong lines, obstructions over clear roof (202 m2 of 743) partly plane_seams; run explain_obstructions
1 Ballarat St 5372604 panels over unmarked vents; lines miss ridges and valleys plane_seams for the valleys; vents are UNDIAGNOSED
12 Stanley St 4725580 pyramid roof, lines misaligned two wall families (47 and 76 deg); each face now takes its own
8 Sydney St 5371137 panels at an odd angle, obstructions over clear roof one bearing, ~79 deg, along the walls (was 21 deg skew); run explain_obstructions

Show Josh the renders. He decides fixed or wrong (tools/cases.py verdict <id> fixed|wrong), not the numbers.

What is still open, and how to attack it with real data

Rules that have held up