From 7287e989a6fe02a74456c7eaf1fea3e26a6d24d0 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Thu, 25 Jun 2026 00:30:10 +0200 Subject: [PATCH] fix(ai-sdk): battery hazards require a battery, not generic stored_energy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HP753 (lithium thermal runaway), HP754 (battery off-gassing) and HP755 (HV battery shock) were gated on stored_energy, which a frequency converter (C034, DC-link capacitors) legitimately carries — so they leaked into any machine with a VFD (surfaced by the dishwasher after the Frequenzumrichter narrative). Now require the "battery" tag; add lithium/batteriespeicher synonyms so real battery-storage machines still emit it. GT #3 100% recall unchanged, battery themes gone from the dishwasher log; Kistenhub 97.1% and Bremse pinned mappings unchanged. Co-Authored-By: Claude Opus 4.7 --- .../internal/iace/hazard_patterns_specific_machines.go | 6 +++--- ai-compliance-sdk/internal/iace/keyword_dictionary.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ai-compliance-sdk/internal/iace/hazard_patterns_specific_machines.go b/ai-compliance-sdk/internal/iace/hazard_patterns_specific_machines.go index f89d2af9..afde4519 100644 --- a/ai-compliance-sdk/internal/iace/hazard_patterns_specific_machines.go +++ b/ai-compliance-sdk/internal/iace/hazard_patterns_specific_machines.go @@ -375,7 +375,7 @@ func GetSpecificMachinePatterns() []HazardPattern { // ================================================================ { ID: "HP753", NameDE: "Thermal Runaway bei Lithium-Batterie", NameEN: "Thermal runaway of lithium battery", - RequiredComponentTags: []string{"stored_energy", "high_temperature"}, + RequiredComponentTags: []string{"battery", "high_temperature"}, RequiredEnergyTags: []string{"electrical_energy", "thermal"}, GeneratedHazardCats: []string{"thermal_hazard", "electrical_hazard"}, SuggestedMeasureIDs: []string{"M005", "M141"}, @@ -390,7 +390,7 @@ func GetSpecificMachinePatterns() []HazardPattern { }, { ID: "HP754", NameDE: "Ausgasung giftiger Daempfe aus Batterie", NameEN: "Toxic gas emission from battery", - RequiredComponentTags: []string{"stored_energy", "chemical_risk"}, + RequiredComponentTags: []string{"battery", "chemical_risk"}, RequiredEnergyTags: []string{}, GeneratedHazardCats: []string{"material_environmental"}, SuggestedMeasureIDs: []string{"M005", "M141"}, @@ -405,7 +405,7 @@ func GetSpecificMachinePatterns() []HazardPattern { }, { ID: "HP755", NameDE: "Elektrischer Schlag an Hochvolt-Batteriespeicher", NameEN: "Electric shock from high-voltage battery storage", - RequiredComponentTags: []string{"stored_energy", "electrical_part"}, + RequiredComponentTags: []string{"battery", "electrical_part"}, RequiredEnergyTags: []string{"electrical_energy"}, GeneratedHazardCats: []string{"electrical_hazard"}, SuggestedMeasureIDs: []string{"M082", "M141"}, diff --git a/ai-compliance-sdk/internal/iace/keyword_dictionary.go b/ai-compliance-sdk/internal/iace/keyword_dictionary.go index 0522bd6a..5db122ba 100644 --- a/ai-compliance-sdk/internal/iace/keyword_dictionary.go +++ b/ai-compliance-sdk/internal/iace/keyword_dictionary.go @@ -137,7 +137,7 @@ func GetKeywordDictionary() []KeywordEntry { {Keywords: []string{"kreiselmaeher", "scheibenmaeher", "maehwerk"}, ExtraTags: []string{"agri_mower"}}, {Keywords: []string{"spruehduese", "spritzduese", "spruehkopf"}, ExtraTags: []string{"spray_nozzle"}}, {Keywords: []string{"galvanikbad", "tauchbad", "beizbad", "chemiebad"}, ExtraTags: []string{"chemical_bath"}}, - {Keywords: []string{"batterie", "akku", "akkumulator", "traktionsbatterie"}, ExtraTags: []string{"battery"}}, + {Keywords: []string{"batterie", "akku", "akkumulator", "traktionsbatterie", "lithium", "batteriespeicher", "hochvoltbatterie", "lithium-batterie"}, ExtraTags: []string{"battery"}}, {Keywords: []string{"heizelement", "heizpatrone", "heizband"}, ExtraTags: []string{"heating_element"}}, {Keywords: []string{"uv-lampe", "uv-strahler", "uv-c-strahler"}, ExtraTags: []string{"uv_source"}}, {Keywords: []string{"roentgen", "radioaktiv", "strahlenquelle", "gammastrahl", "isotop"}, ExtraTags: []string{"radiation_source"}},