homemaker-layout/src/homemaker_layout
Bruno Postle 880a214d96 94g: public-access pin + keep-better wrapper + CLI/finish-hook wiring
Public-access term (preserve_public_access, default on): when the building's
only street access is an l/k ROOM neighbour of a public outside leaf (no
circulation fallback — an existential building-level check the per-leaf
objective can't see), that leaf is pinned (kept, its demand slot decremented)
so the collapse can't drop "no outside public access". Best layout 15→13
becomes 15→12 with zero new fails; sweep total 172→171, still monotone.

collapse_finish(root, **kw) -> (tree, base, coll, applied): keep-better wrapper,
scores on throwaway copies (score_with_fails merges in place), returns the
collapse only if fails don't increase.

Wiring: driver.collapse_best updates result.best (lineage +collapse, canonical
re-score); evolve.py runs it after the sharing polish behind --collapse/
--no-collapse (default on). New homemaker-collapse CLI (collapse_cmd.py) applies
it to an existing .dom, writing <stem>.collapsed.dom.

tests/test_collapse_global.py: demand-set relabel, level hard constraint, c/o/s
exclusion, no-op safety, keep-better/unmerged. 267 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M8566xAxTnwtJTkpXjYNZm
2026-07-18 10:29:44 +01:00
..
__init__.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
collapse_cmd.py 94g: public-access pin + keep-better wrapper + CLI/finish-hook wiring 2026-07-18 10:29:44 +01:00
dom.py erc.3: explicit per-leaf multiplicity closes the leak; driver A/B wired (§13.3) 2026-06-24 18:16:17 +01:00
driver.py 94g: public-access pin + keep-better wrapper + CLI/finish-hook wiring 2026-07-18 10:29:44 +01:00
evolve.py 94g: public-access pin + keep-better wrapper + CLI/finish-hook wiring 2026-07-18 10:29:44 +01:00
fitness.py 94g: public-access pin + keep-better wrapper + CLI/finish-hook wiring 2026-07-18 10:29:44 +01:00
fitness_cmd.py Add homemaker-fitness: native Python CLI to replace urb-fitness.pl 2026-06-14 17:15:33 +01:00
genome.py Phase 6 §11.5: structural niching + restarts — negative result (c4c.5) 2026-06-18 23:42:39 +01:00
geometry.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
graph.py erc.3: explicit per-leaf multiplicity closes the leak; driver A/B wired (§13.3) 2026-06-24 18:16:17 +01:00
innerloop.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
operators.py kpu: Schedule B in-run leaf-share grain annealing (search_annealed) 2026-07-16 08:38:08 +01:00
oracle.py Fix parity gap: oracle.py must run with URB_NO_OCCLUSION=1 2026-06-17 18:40:56 +01:00
programme.py b3v: interchange:false veto hatch for interchange-class derivation 2026-07-17 16:53:20 +01:00
solver.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00