homemaker-layout/tests
Bruno Postle 9e020f4769 Native fitness: adjacency graph + merge_divided (homemaker-py-3y7)
Two bugs fixed in boundary_id / leaf_graph:
1. 'bid not in "abcd"' used Python substring check, silently dropping the
   root-division boundary (empty-string id).  Fixed to frozenset membership.
2. Upper-storey nodes store their own rotation in the YAML but Urb::Quad::Rotation
   delegates to Below->Rotation.  boundary_id now walks the below-chain to the
   ground-floor rotation, matching Perl exactly.

After fixes all 35 corpus files produce edge counts matching Perl oracle.

Added:
- src/homemaker/graph.py: build_graphs (two-phase pattern), has_adjacency,
  has_vertical_connection (faithful no-overlap stub per DESIGN §8.1),
  find_missing_spaces, check_adjacency, check_level_constraints,
  check_vertical_connectivity
- src/homemaker/dom.py: @dataclass(eq=False) on Node for NetworkX hashability;
  is_outside, is_supported, is_unsupported, merge_divided
- tests/test_graph.py: 7 tests, edge counts vs Perl oracle on all 35 files,
  exact widths for 2f45907, merge_divided smoke, two-phase independence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 21:57:45 +01:00
..
test_dom_corpus.py Geometry inner loop: batched full-objective ratio optimiser (CMA-ES) 2026-06-12 09:42:24 +01:00
test_driver.py Memetic search driver: steady-state GA over topology, warm-started inner loop 2026-06-12 14:22:26 +01:00
test_genome.py Topology genome: base tree + per-storey deltas + type assignment 2026-06-12 13:52:32 +01:00
test_graph.py Native fitness: adjacency graph + merge_divided (homemaker-py-3y7) 2026-06-12 21:57:45 +01:00
test_innerloop.py Fix cma convergence test: assert basin convergence, not final-digit polish 2026-06-12 09:46:13 +01:00
test_operators.py Use Urb's canonical UPPERCASE generic types (C/O); case-insensitive class checks 2026-06-12 19:01:53 +01:00
test_oracle.py Geometry inner loop: batched full-objective ratio optimiser (CMA-ES) 2026-06-12 09:42:24 +01:00