Model/packages
Khalim Conn-Kowlessar 5b7dbe2c21 Slice 21c: §2 cascade pins + ventilation_from_cert helper — 96/96 PASS
Refactors the inline `ventilation_from_inputs(...)` block in
`cert_to_inputs` into a public `ventilation_from_cert(epc)` helper that
returns the full `VentilationResult`. Same cascade path, now reachable
from tests without duplicating the cert→inputs argument plumbing.

Adds §2 cascade pins to `test_section_cascade_pins.py` at abs=1e-4:

  scalar (11 line refs × 6 fixtures = 66 pins):
    (8)  openings_ach, (10) additional, (11) structural, (12) floor,
    (13) draught_lobby, (14) % draught proofed, (15) window,
    (16) infiltration_rate, (18) pressure_test, (20) shelter_factor,
    (21) shelter_adjusted_ach
  monthly (4 line refs × 6 × 12 months = 288 per-month assertions
   across 24 parametrized cases):
    (22) wind_speed, (22a) wind_factor, (22b) wind_adjusted_ach,
    (25) effective_monthly_ach
  integer (1 line ref × 6):
    (19) sheltered_sides

96 §2 cases all PASS (108 total when including §1). The cert→inputs
ventilation cascade reproduces the U985 PDF exactly across every line
ref for every fixture — a strong floor for the downstream §3-§12
cascade.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 23:10:42 +00:00
..
domain Slice 21c: §2 cascade pins + ventilation_from_cert helper — 96/96 PASS 2026-05-22 23:10:42 +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/.