Model/packages
Khalim Conn-Kowlessar 361f91546b slice S-B26: NI thickness + assumed-insulated descriptions route to 50mm row
Two related bugs both produced U=1.7 for retrofit-insulated solid-brick
walls when the spec says U=0.55 (Table 6 footnote: "If a wall is known
to have additional insulation but the insulation thickness is unknown,
use the row in the table for 50 mm insulation"):

1. _insulation_bucket(0, True) returned 0 instead of 50. The "NI"
   sentinel parses to 0 via _parse_thickness_mm, then the bucket
   function's "< 25 -> 0" branch ignored the insulation_present signal.
   Affects 56 corpus certs lodging solid-brick with type=1 or type=3
   plus thickness="NI".

2. wall_ins_present was set False whenever wall_insulation_type == 4
   ("as-built / assumed"), even if the description said
   "...insulated (assumed)" or "...partial insulation (assumed)".
   Affects 128+51 = 179 corpus certs.

The same root pattern as S-B25 (cavity-wall description disambiguation),
extended to non-cavity constructions. `_cavity_described_as_filled`
generalised to `_described_as_insulated`; now used by:
- u_wall (cavity-wall dispatcher to the Filled-cavity row, S-B23/B25)
- heat_transmission_from_cert (override wall_ins_present for non-cavity
  walls so the 50 mm bucket routes per Table 6 footnote)

Parity probe at 300 certs, seed=7:
  PE MAE  45.74 → 45.37 (-0.37)
  PE bias 40.19 → 39.75 (-0.44)
  Band D bias +42.7 → +41.6 (-1.1)
  Band F bias +12.6 → +10.7 (-1.9)

Modest aggregate movement — the affected population is small (~0.6% of
corpus, ~2 certs in the 300 sample). The slice's correctness is proved
by 4 unit tests in test_rdsap_uvalues.py + 2 end-to-end tests in
test_heat_transmission.py.

Cumulative across S-B23 → S-B26:
  PE MAE  57.28 → 45.37 (-11.91)
  PE bias 51.56 → 39.75 (-11.81)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 21:19:33 +00:00
..
domain slice S-B26: NI thickness + assumed-insulated descriptions route to 50mm row 2026-05-18 21:19:33 +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/.