80d62a0c5f
Background: hazard_patterns_extended.go (HP045-074) and _extended2.go (HP074-102) shared their entire ID range with the semantically-different patterns in hazard_patterns_cobot.go, hazard_patterns_press.go, hazard_patterns_operational.go and hazard_patterns_extended_dguv.go. The collision had lived unnoticed because TestGetBuiltinHazardPatterns_- UniqueIDs only checks the 44 builtin patterns (HP001-HP044). Examples of the collision: - HP059 = "Kollision Mensch-Roboter" (cobot.go) vs "Kupplung — mechanisch" (extended.go) - HP060 = "Quetschen durch Werkzeug am Cobot" (cobot.go) vs "Diagnosemodul — Software" (extended.go) - HP073 = "Wartung ohne LOTO" (operational.go) vs "Hydraulikventil — hydraulisch" (extended.go) At runtime collectAllPatterns() returned both patterns under the same ID which made downstream lookups (e.g. hazardPatternMeasures map keyed by pattern_id) non-deterministic — last-loaded wins, dropping the other pattern's mitigation set silently. Rename strategy (no deletes — both patterns are real and earn their SuggestedMeasureIDs after the category-filter work): extended.go HP045..HP073 -> HP1800..HP1828 (29 IDs) extended2.go HP074..HP102 -> HP1830..HP1858 (29 IDs) cobot/press/operational/extended_dguv keep their original IDs because: - compliance_triggers.go references HP059/HP060 with the cobot meaning - pattern_engine_test.go references HP073 with the LOTO/maintenance meaning - phase3_4_test.go references HP073 the same way New regression test: - TestAllPatterns_UniqueIDs runs over collectAllPatterns() and fails if ANY pattern in the runtime set duplicates an ID. The old TestGetBuiltinHazardPatterns_UniqueIDs stays for the builtin subset. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
328 lines
14 KiB
Go
328 lines
14 KiB
Go
package iace
|
|
|
|
// getExtendedHazardPatternsB returns patterns HP074-HP102.
|
|
// Called by GetExtendedHazardPatterns in hazard_patterns_extended.go.
|
|
func getExtendedHazardPatternsB() []HazardPattern {
|
|
return []HazardPattern{
|
|
{
|
|
ID: "HP1830", NameDE: "Industrie-Switch — elektrisch", NameEN: "Industrial Switch — electrical",
|
|
RequiredComponentTags: []string{"networked", "security_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"communication_failure"},
|
|
SuggestedMeasureIDs: []string{"M113", "M106", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 70,
|
|
// Source: R075, R329, R585, R1085
|
|
},
|
|
{
|
|
ID: "HP1831", NameDE: "Laserscanner — elektrisch", NameEN: "Laser Scanner — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M106"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09"},
|
|
Priority: 70,
|
|
// Source: R583, R1083
|
|
},
|
|
{
|
|
ID: "HP1832", NameDE: "Hubwerk — mechanisch", NameEN: "Lifting Device — mechanical",
|
|
RequiredComponentTags: []string{"gravity_risk", "high_force", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation", "transport"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M004", "M005"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E20"},
|
|
Priority: 80,
|
|
// Source: R307, R308
|
|
},
|
|
{
|
|
ID: "HP1833", NameDE: "Hubtisch — hydraulisch", NameEN: "Lifting Table — hydraulic",
|
|
RequiredComponentTags: []string{"gravity_risk", "moving_part"},
|
|
RequiredEnergyTags: []string{"hydraulic_pressure"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M482", "M481", "M522", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E11"},
|
|
Priority: 80,
|
|
// Source: R560, R1060
|
|
},
|
|
{
|
|
ID: "HP1834", NameDE: "Linearachse — mechanisch", NameEN: "Linear Axis — mechanical",
|
|
RequiredComponentTags: []string{"crush_point", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance", "setup"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M003", "M051", "M054", "M106", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09", "E20", "E21"},
|
|
Priority: 80,
|
|
// Source: R051, R052, R301, R302
|
|
},
|
|
{
|
|
ID: "HP1835", NameDE: "Maschinenrahmen — mechanisch", NameEN: "Machine Frame — mechanical",
|
|
RequiredComponentTags: []string{"structural_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M005"},
|
|
SuggestedEvidenceIDs: []string{"E07"},
|
|
Priority: 80,
|
|
// Source: R335, R593, R1093
|
|
},
|
|
{
|
|
ID: "HP1836", NameDE: "ML-Modell — Software", NameEN: "Ml Model — software",
|
|
RequiredComponentTags: []string{"has_ai", "has_software"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"model_drift"},
|
|
SuggestedMeasureIDs: []string{"M133", "M227", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E15"},
|
|
Priority: 75,
|
|
// Source: R078, R332, R589, R1089
|
|
},
|
|
{
|
|
ID: "HP1837", NameDE: "Ueberwachungssystem — elektrisch", NameEN: "Monitoring System — electrical",
|
|
RequiredComponentTags: []string{"has_software", "safety_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M106"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R337, R595, R1095
|
|
},
|
|
{
|
|
ID: "HP1838", NameDE: "Palettierer — mechanisch", NameEN: "Palletizer — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M004"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 80,
|
|
// Source: R559, R1059
|
|
},
|
|
{
|
|
ID: "HP1839", NameDE: "Plattform — mechanisch", NameEN: "Platform — mechanical",
|
|
RequiredComponentTags: []string{"gravity_risk", "structural_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M061", "M002", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R336, R594, R1094
|
|
},
|
|
{
|
|
ID: "HP1840", NameDE: "Pneumatikzylinder — pneumatisch", NameEN: "Pneumatic Cylinder — pneumatic",
|
|
RequiredComponentTags: []string{"moving_part", "pneumatic_part", "stored_energy"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M022"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 80,
|
|
// Source: R069, R323, R576, R1076
|
|
},
|
|
{
|
|
ID: "HP1841", NameDE: "Pneumatikleitung — pneumatisch", NameEN: "Pneumatic Line — pneumatic",
|
|
RequiredComponentTags: []string{"pneumatic_part"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"maintenance"},
|
|
GeneratedHazardCats: []string{"pneumatic_hydraulic"},
|
|
SuggestedMeasureIDs: []string{"M021"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 70,
|
|
// Source: R324, R577, R1077
|
|
},
|
|
{
|
|
ID: "HP1842", NameDE: "Stromversorgung — elektrisch", NameEN: "Power Supply — electrical",
|
|
RequiredComponentTags: []string{"electrical_part", "high_voltage"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"electrical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M481", "M482", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E20"},
|
|
Priority: 80,
|
|
// Source: R063, R311, R312, R568, R1068
|
|
},
|
|
{
|
|
ID: "HP1843", NameDE: "Naeherungssensor — elektrisch", NameEN: "Proximity Sensor — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M214", "M119", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 70,
|
|
// Source: R073, R327, R582, R1082
|
|
},
|
|
{
|
|
ID: "HP1844", NameDE: "Roboterarm — mechanisch", NameEN: "Robot Arm — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "moving_part", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance", "teach"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M082", "M106", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09", "E21"},
|
|
Priority: 80,
|
|
// Source: R303, R304, R551, R552, R1051, R1052
|
|
},
|
|
{
|
|
ID: "HP1845", NameDE: "Robotersteuerung — elektrisch", NameEN: "Robot Controller — electrical",
|
|
RequiredComponentTags: []string{"has_software", "programmable"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"software_fault"},
|
|
SuggestedMeasureIDs: []string{"M533", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R553, R1053
|
|
},
|
|
{
|
|
ID: "HP1846", NameDE: "Greifer — mechanisch", NameEN: "Robot Gripper — mechanical",
|
|
RequiredComponentTags: []string{"clamping_part", "moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "operation", "setup"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M003", "M004", "M106"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 80,
|
|
// Source: R057, R058, R554
|
|
},
|
|
{
|
|
ID: "HP1847", NameDE: "Greifer — pneumatisch", NameEN: "Robot Gripper — pneumatic",
|
|
RequiredComponentTags: []string{"clamping_part", "moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard", "pneumatic_hydraulic"},
|
|
SuggestedMeasureIDs: []string{"M004", "M021"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E20"},
|
|
Priority: 80,
|
|
// Source: R555, R1054, R1055
|
|
},
|
|
{
|
|
ID: "HP1848", NameDE: "Rollenfoerderer — mechanisch", NameEN: "Roller Conveyor — mechanical",
|
|
RequiredComponentTags: []string{"entanglement_risk", "moving_part", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M061", "M002", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R558, R1058
|
|
},
|
|
{
|
|
ID: "HP1849", NameDE: "Drehtisch — mechanisch", NameEN: "Rotary Table — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M054", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E21"},
|
|
Priority: 80,
|
|
// Source: R309, R310
|
|
},
|
|
{
|
|
ID: "HP1850", NameDE: "Drehscheibe — mechanisch", NameEN: "Rotating Disc — mechanical",
|
|
RequiredComponentTags: []string{"high_speed", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M061", "M002", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R565, R1065
|
|
},
|
|
{
|
|
ID: "HP1851", NameDE: "Spindel — mechanisch", NameEN: "Rotating Spindle — mechanical",
|
|
RequiredComponentTags: []string{"cutting_part", "high_speed", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E20", "E21"},
|
|
Priority: 80,
|
|
// Source: R561, R562, R1061, R1062
|
|
},
|
|
{
|
|
ID: "HP1852", NameDE: "Router — elektrisch", NameEN: "Router — electrical",
|
|
RequiredComponentTags: []string{"networked", "security_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"unauthorized_access"},
|
|
SuggestedMeasureIDs: []string{"M101", "M113"},
|
|
SuggestedEvidenceIDs: []string{"E16", "E17"},
|
|
Priority: 85,
|
|
// Source: R076, R330, R586, R1086
|
|
},
|
|
{
|
|
ID: "HP1853", NameDE: "Gesamtsystem — gemischt", NameEN: "System — mixed",
|
|
RequiredComponentTags: []string{"has_software"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation", "safety_validation"},
|
|
GeneratedHazardCats: []string{"software_fault"},
|
|
SuggestedMeasureIDs: []string{"M082", "M106"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E15"},
|
|
Priority: 70,
|
|
// Source: R599, R600, R1099, R1100
|
|
},
|
|
{
|
|
ID: "HP1854", NameDE: "Werkzeugwechsler — mechanisch", NameEN: "Tool Changer — mechanical",
|
|
RequiredComponentTags: []string{"moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M061", "M002", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E20"},
|
|
Priority: 80,
|
|
// Source: R059, R060
|
|
},
|
|
{
|
|
ID: "HP1855", NameDE: "Touch-Bedienfeld — Software", NameEN: "Touch Interface — software",
|
|
RequiredComponentTags: []string{"has_software", "user_interface"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"hmi_error"},
|
|
SuggestedMeasureIDs: []string{"M101", "M113"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R592, R1092
|
|
},
|
|
{
|
|
ID: "HP1856", NameDE: "Transformator — elektrisch", NameEN: "Transformer — electrical",
|
|
RequiredComponentTags: []string{"electrical_part", "high_voltage"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"inspection", "operation"},
|
|
GeneratedHazardCats: []string{"electrical_hazard", "thermal_hazard"},
|
|
SuggestedMeasureIDs: []string{"M481", "M477", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E10"},
|
|
Priority: 80,
|
|
// Source: R064, R313, R314, R569, R1069
|
|
},
|
|
{
|
|
ID: "HP1857", NameDE: "KI-Bilderkennung — Software", NameEN: "Vision Ai — software",
|
|
RequiredComponentTags: []string{"has_ai", "sensor_part"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M214", "M119", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E15"},
|
|
Priority: 70,
|
|
// Source: R077, R331, R588, R1088
|
|
},
|
|
{
|
|
ID: "HP1858", NameDE: "Vision-Kamera — elektrisch", NameEN: "Vision Camera — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"ai_misclassification"},
|
|
SuggestedMeasureIDs: []string{"M133", "M227", "M141"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 75,
|
|
// Source: R584, R1084
|
|
},
|
|
}
|
|
}
|