Model/packages/domain
Khalim Conn-Kowlessar 56f41ca4a2 Slice 75: bulk-update cohort 000480 hand-built for Cat A diff parity
Closes 31 of 32 mapper-vs-hand-built load-bearing divergences by
populating fields the Elmhurst mapper extracts from Summary_000480.
pdf but the original cohort hand-built left at their `make_minimal_
sap10_epc` / dataclass-default values. Every change is cascade-
equivalent — none alter `_FIXTURE_PINS["000480"]` SapResult fields
(all 11 1e-4 pins remain GREEN against worksheet `SAP value 61.2986`).

Mirrors the Slice 64 / 72 pattern. 000480-specific deltas vs 000477:

- Two SapBuildingParts (Main + Ext1) → Cat A descriptive fields
  applied per-bp; Ext1 floor is "Above unheated space" (not "Ground
  floor") because the extension hangs over an open passageway (the
  cert's `is_exposed_floor=True` for the lowest Ext1 floor).
- `roof_insulation_thickness=300` on Main — cascade-inert because the
  RR (19.83 m²) is larger than the Main storey footprint (15.28 m²),
  so Main has no external roof line; set for field parity with the
  mapper, which extracts the §8 Main row's 300 mm regardless.
- `extensions_count=1` — was 0 by default; the mapper extracts it
  from `len(survey.extensions)` (Slice 54 fix).

Standard Cat A additions (per Slice 72 pattern): floor descriptive
fields, roof_insulation_location, 6 ventilation zero counts,
draught_lobby=True, pressure_test="Not available", top-level
descriptive strings + booleans + number_of_storeys=3, shower_outlets,
central_heating_pump_age_str.

Diff count: 32 → **1**. Remaining diff is structural:
- `sap_windows: LEN 7 vs 2` — closed via the next-slice 1:1 expansion.

11 cohort 000480 cascade pins still GREEN; pyright net-zero on the
touched fixture.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 17:52:20 +00:00
..
src/domain Slice 75: bulk-update cohort 000480 hand-built for Cat A diff parity 2026-05-25 17:52:20 +00:00
pyproject.toml slice 13: to_rows(properties) returns pd.DataFrame 2026-05-16 16:43:28 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

domna-domain

Shared domain types — Property, Properties, BaselinePerformance, Plan, PlanPhase, Scenario, ScenarioPhase, ScenarioSnapshot, Recommendation, OptimisedPackage, EpcPropertyData, etc.

Boundary: types only. No persistence, no IO, no business logic. Other packages and services depend on domna-domain; this package depends on nothing internal.

Domain definitions live in ../../CONTEXT.md. New types added here must match the glossary terms.

Layout

src/domain/
├── __init__.py
├── property.py             # Property, Properties, PropertyIdentity
├── site_notes.py
├── landlord_overrides.py
├── baseline_performance.py # lodged + effective pair (ADR-0004)
├── plan.py                 # Plan, PlanPhase, OptimisedPackage
├── scenario.py             # Scenario, ScenarioPhase, ScenarioSnapshot (ADR-0005)
├── recommendation.py
├── geospatial.py
├── solar.py
├── anomaly_flags.py
└── ml/
    ├── __init__.py
    ├── transform.py        # EpcMlTransform (versioned per §8.3)
    └── schema.py

When datatypes/epc/domain/ folds in, the EPC schema types move under src/domain/epc/.