Model/packages
Khalim Conn-Kowlessar 28e9dd3864 P2.2: migrate golden fixtures to SAP 10.2 spec prices; loose smoke test
ADR-0010 §10: the cert-based fixtures contained compensating errors
under cert-cal prices and are scheduled for replacement by BRE
worked-example fixtures (P5). Until P5 lands they stay as a loose
smoke test catching catastrophic regressions only.

Changes:
  - Swap prices=cert_calibration_prices() → prices=SAP_10_2_SPEC_PRICES.
    Last external consumer of cert_calibration_prices — P2.3 can now
    delete table_12_cert_calibration.py cleanly.
  - Loosen tolerance: SAP ±1 → ±5, PE ±10 → ±25. The cert-cal prices
    had been numerically tuned around these specific certs, so spec
    prices alone produce a -3 to +3 SAP drift across the set.
  - Retire 9390-2722-3520-2105-8715 early (heat-network mid-floor
    flat). It drifted to SAP residual -7 because cert-cal had absorbed
    heat-network DLF + Table 12c interactions. Cert JSON remains in
    fixtures/golden/ per ADR-0010 §10; a BRE worked-example covering
    the heat-network path will subsume it during P5.

Remaining 6 fixtures pass at ±5 SAP under spec prices. The whole
suite retires when P5 lands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 10:01:05 +00:00
..
domain P2.2: migrate golden fixtures to SAP 10.2 spec prices; loose smoke test 2026-05-19 10:01:05 +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/.