Task #17 — Folgegefahren-Modell as Vorbereitungs-Commit (no DB schema
change yet; persistence via separate [migration-approved] commit).
New:
- secondary_harms.go: SecondaryHarm struct + six canonical categories
(consumer_safety, product_liability, food_safety, environmental,
reputation, financial) with DE labels.
- hazard_pattern_types.go: HazardPattern extended with optional
SecondaryHarms field — pattern library can now attach consequential-
damage chains.
- hazard_patterns_secondary_demo.go: two worked examples
- HP2000 Glasbruch carbonated bottling (the "Cola splitter" scenario
from the IACE strategy discussion) with consumer_safety + food_safety
+ reputation chains
- HP2001 Pharma fill-finish cross-contamination with consumer_safety
+ product_liability under AMG §84
Bonus fix:
- compliance_crossover.go AllPatterns() was a duplicate enumeration that
silently drifted from collectAllPatterns() in pattern_registry.go.
Pre-fix: 1058 patterns visible. Post-fix: 1213 patterns. The 155 invisible
patterns included CRA, ISO12100 gaps, robot-cell, CNC extended, VDMA,
textile-agri, GT-bremse — anything added after the original AllPatterns
was authored. Audit-Suite (cmd/iace-audit) now sees the full set.
Next steps for full secondary-harm rollout:
- DB migration: hazards table + secondary_harms array column
- API: surface secondary_harms in /projects/:id/hazards response
- Frontend: collapsible Folgegefahren-Panel in HazardTable