mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Deterministically guard the Gas CPSU solid-fuel and electric-boiler descriptions 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
098edf6592
commit
2b5d38a7f9
1 changed files with 38 additions and 0 deletions
|
|
@ -19,6 +19,38 @@ def test_guard_resolves_high_heat_retention_storage() -> None:
|
|||
assert result is MainHeatingSystemType.ELECTRIC_STORAGE_HIGH_HEAT_RETENTION
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("description", "expected"),
|
||||
[
|
||||
# The Gas CPSU dumping ground (ADR-0045): solid-fuel room heaters and
|
||||
# electric ("NA" type) boilers the LLM sent to Gas CPSU (120, mains gas).
|
||||
(
|
||||
"Solid fuel room heaters: Open fire in grate",
|
||||
MainHeatingSystemType.SOLID_FUEL_ROOM_HEATER_OPEN_FIRE,
|
||||
),
|
||||
(
|
||||
"Solid fuel room heaters: Open fire with back boiler (no radiators)",
|
||||
MainHeatingSystemType.SOLID_FUEL_ROOM_HEATER_OPEN_FIRE_BACK_BOILER,
|
||||
),
|
||||
(
|
||||
"Solid fuel room heaters: Closed room heater with boiler (no radiators)",
|
||||
MainHeatingSystemType.SOLID_FUEL_ROOM_HEATER_CLOSED_WITH_BOILER,
|
||||
),
|
||||
# "NA" is the boiler-type value meaning "not a gas combi/regular/CPSU" —
|
||||
# i.e. an electric boiler.
|
||||
("Boiler: A rated NA", MainHeatingSystemType.ELECTRIC_BOILER),
|
||||
],
|
||||
)
|
||||
def test_guard_resolves_the_gas_cpsu_dumping_ground(
|
||||
description: str, expected: MainHeatingSystemType
|
||||
) -> None:
|
||||
# Act
|
||||
result = main_heating_guard(description)
|
||||
|
||||
# Assert
|
||||
assert result is expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"description",
|
||||
[
|
||||
|
|
@ -27,6 +59,12 @@ def test_guard_resolves_high_heat_retention_storage() -> None:
|
|||
"Electric Storage Systems: Old (large volume) storage heaters",
|
||||
"Electric Storage Systems: Modern (slimline) storage heaters",
|
||||
"Electric Storage Systems: Fan storage heaters",
|
||||
# Genuinely-gas boilers the LLM already classifies correctly (not "NA").
|
||||
"Boiler: A rated Combi",
|
||||
"Boiler: C rated Regular Boiler",
|
||||
# A plain closed room heater (no boiler) is the existing 633 archetype —
|
||||
# the LLM keeps it; only "…with boiler" (634) is guarded.
|
||||
"Solid fuel room heaters: Closed room heater (no boiler)",
|
||||
# Unrelated / varied phrasings are the LLM's job.
|
||||
"Gas boiler",
|
||||
"",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue