Model/packages
Khalim Conn-Kowlessar 024244ec59 Slice 21d: §3 cascade pins + heat_transmission_section_from_cert helper
Extracts `heat_transmission_section_from_cert(epc)` wrapping the §3
inline call in cert_to_inputs (window-area/window-U/dwelling-exposure
plumbing). Replaces the inline call. Adds §3 cascade pins for the
four aggregate line refs:

  (31) total_external_element_area_m2
  (33) fabric_heat_loss_w_per_k
  (36) thermal_bridging_w_per_k
  (37) total_w_per_k

Results at abs=1e-4 (1/24 PASS):

  fixture | LINE_31 diff | LINE_33 diff | LINE_36 diff | LINE_37 diff
  --------|--------------|--------------|--------------|-------------
  000474  |     0.0014   |     0.086    |     0.0002   |     0.086
  000477  |     0.0004   |     0.105    |     ✓        |     0.104
  000480  |     0.006    |     0.017    |     0.0009   |     0.018
  000487  |     8.82     |    37.88     |     1.32     |    39.21
  000490  |     0.000    |     0.064    |     0.000    |     0.064
  000516  |     0.012    |     0.183    |     0.002    |     0.184

Three buckets:
- 000487 (RR fixture defect): large gaps — fixture lodges Simplified
  Type 1 RR but PDF has detailed §3.10 lodgement including a U=0.86
  external gable. Slice 22 closes (mirrors S16a).
- 000474/000477/000480/000490/000516 (precision residuals): LINE_33
  drifts 0.02-0.18 W/K — sub-display-precision (PDF lodges to 4 d.p.
  per element, our calc combines full-precision per-storey perimeters
  + 4-d.p. U values). The aggregate diff of ~0.1 W/K is just over the
  abs=1e-4 floor but well under the worksheet's display granularity.

Cascade pins now: §1 (12 PASS) + §2 (96 PASS) + §3 (1 PASS, 23 FAIL).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 23:13:48 +00:00
..
domain Slice 21d: §3 cascade pins + heat_transmission_section_from_cert helper 2026-05-22 23:13:48 +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/.