Model/packages/domain
Khalim Conn-Kowlessar f863598d39 Slice 85: bulk-update cohort 000516 hand-built for Cat A diff parity
Closes 23 of 24 mapper-vs-hand-built load-bearing divergences by
populating fields the Elmhurst mapper extracts from Summary_000516.
pdf but the original hand-built left at their `make_minimal_sap10_
epc` / dataclass-default values. Every change is cascade-equivalent —
all 11 `_FIXTURE_PINS["000516"]` SapResult pins remain GREEN against
worksheet `SAP value 62.7937`.

000516-specific deltas:

- `wall_thickness_measured=True` on Main (Summary lodges 400 mm).
- `floor_type="Above unheated space"` (exposed timber floor, not
  Ground floor) — matches the cert's `is_exposed_floor=True` for
  the lowest Main floor.
- `roof_insulation_location="None"` — the Summary lodges the literal
  string "None" for an uninsulated roof; mapper surfaces it
  verbatim.

Standard Cat A additions (per Slice 72/75/78/82 pattern): floor
descriptive fields, 6 ventilation zero counts, draught_lobby=True,
pressure_test="Not available", top-level descriptive strings +
booleans, `number_of_storeys=3` (Main ground + first + RIR),
shower_outlets="Non-electric shower",
central_heating_pump_age_str="Unknown".

Diff count: 24 → **1**. Remaining diff is `sap_windows: LEN 5 vs 2`
— closes via Slice 86.

Pyright net-zero on the touched fixture.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:15:57 +00:00
..
src/domain Slice 85: bulk-update cohort 000516 hand-built for Cat A diff parity 2026-05-25 18:15:57 +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/.