mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Renames `_pcdb_table_3b_combi_loss_override` → `pcdb_combi_loss_override`
(drop the underscore now that it has a unit-testable contract; helper
is now a public boundary of cert_to_inputs). The gate routes on PCDF
Spec Rev 6b field 48:
= 1 → Table 3b row 1 (profile M only) — existing
= 2 → Table 3c row 1 with DVF branch "M+L" — new (schedules 2+3)
= 3 → Table 3c row 1 with DVF branch "M+S" — new (schedules 2+1)
other / missing factors → None (Table 3a)
Storage-FGHRS (subsidiary_type ∈ {1, 2, 3}) and storage-combi
(store_type ∈ {1, 2, 3}) configurations stay rejected — they gate
Rows 2-5 of both Tables 3b and 3c, deferred until a fixture exercises
them.
Tests (4 new):
- PCDB 18118 (Vaillant ecoTEC sustain 24, sep_dhw=2) routes through
Table 3c with M+L. Element-wise match at abs=1e-12 against direct
Table 3c invocation with the same inputs.
- PCDB 16952 (Fondital Itaca KC 24, sep_dhw=3 — the M+S branch) routes
through Table 3c with M+S. No Elmhurst fixture lodges this record;
borrow 000477's monthly inputs as the deterministic vehicle.
- PCDB 16839 (sep_dhw=1) preserves the existing Table 3b row 1 path —
regression guard.
- Synthetic skeleton record exercises None-returning branches:
null record, sep_dhw=0, integral FGHRS subsidiary_type=1, primary
store store_type=1, missing F2.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| domain | ||
| fetchers | ||
| repos | ||
| utils | ||
| README.md | ||
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/.