Model/packages
Khalim Conn-Kowlessar b8f35af902 Slice 78: bulk-update cohort 000487 hand-built for Cat A diff parity
Closes 23 of 45 mapper-vs-hand-built load-bearing divergences by
populating fields the Elmhurst mapper extracts from Summary_000487.
pdf but the original hand-built left at their `make_minimal_sap10_
epc` / dataclass-default values. Every change is cascade-equivalent —
none alter `_FIXTURE_PINS["000487"]` SapResult fields (all 11 1e-4
pins remain GREEN against worksheet `SAP value 61.6431`).

Mirrors the Slice 64 / 72 / 75 pattern. 000487-specific deltas:

- `wall_thickness_measured=True` on **both** bps (Summary §7 lodges
  measured thickness for Main and Ext1 on this cert).
- Floor descriptive: Main "Ground floor" + suspended timber; Ext1
  "Above unheated space" + suspended timber (the cert's
  `is_exposed_floor=True` for the lowest Ext1 floor).
- `dwelling_type="Enclosed Mid-Terrace house"`,
  `built_form="Enclosed Mid-Terrace"` — the Summary distinguishes
  Enclosed from plain Mid-Terrace; mapper preserves the distinction.
- `shower_outlets=ShowerOutlets(shower_outlet_type="Electric
  shower")` — 000487 lodges 1 instantaneous electric shower (vs
  Non-electric on 000477/000480 cohort certs).
- `extensions_count=1`, plus standard top-level booleans,
  `number_of_storeys=3`, ventilation zero counts.

Diff count: 45 → **22**. Remaining diffs are structural / encoding-
choice:
- RIR `detailed_surfaces` ordering mismatch + per-surface encoding
  (handbuilt pins explicit `u_value=0.86` on gable_wall_external;
  mapper extracts insulation_thickness=100 + mineral_wool) — Slice 79
- Alt-wall `wall_construction=8 (SAP10 Park-home)` is mislabeled in
  the hand-built — Elmhurst's "TI Timber Frame" maps to SAP10 code 5
  (per `_ELMHURST_WALL_CODE_TO_SAP10`); mapper produces the correct
  code 5 — Slice 79
- `sap_windows: LEN 5 vs 2` — Slice 80

11 cohort 000487 cascade pins still GREEN; pyright net-zero.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:00:14 +00:00
..
domain Slice 78: bulk-update cohort 000487 hand-built for Cat A diff parity 2026-05-25 18:00:14 +00:00
fetchers added potential file scaffolding: 2026-05-15 10:56:53 +00:00
repos added potential file scaffolding: 2026-05-15 10:56:53 +00:00
utils added potential file scaffolding: 2026-05-15 10:56:53 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

Shared packages

Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).

Package Purpose
domain/ Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic.
repos/ Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain.
fetchers/ External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes.
utils/ Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers.

Adding a new shared package

Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.

See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.