fix(iace): coarser block grouping by category+component only
Build + Deploy / build-admin-compliance (push) Successful in 11s
Build + Deploy / build-backend-compliance (push) Successful in 10s
Build + Deploy / build-ai-sdk (push) Successful in 1m7s
Build + Deploy / build-developer-portal (push) Successful in 1m23s
Build + Deploy / build-tts (push) Successful in 1m43s
Build + Deploy / build-document-crawler (push) Successful in 50s
Build + Deploy / build-dsms-gateway (push) Successful in 33s
Build + Deploy / build-dsms-node (push) Successful in 17s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 18s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-python-backend (push) Successful in 41s
CI / test-python-document-crawler (push) Successful in 28s
CI / test-python-dsms-gateway (push) Successful in 32s
CI / validate-canonical-controls (push) Successful in 15s
CI / nodejs-build (push) Successful in 2m44s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 44s
Build + Deploy / trigger-orca (push) Successful in 2m22s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-13 11:41:26 +02:00
parent d31c2fe018
commit d0d1b38f5c
@@ -2,7 +2,6 @@ package iace
import (
"sort"
"strings"
"github.com/google/uuid"
)
@@ -108,22 +107,10 @@ func ComputeHazardBlocks(
}
func buildBlockKey(h Hazard) string {
comp := h.ComponentID.String()
zone := NormalizeDEPublic(h.HazardousZone)
// Use first 3 significant words of zone for grouping
words := strings.Fields(zone)
var sig []string
for _, w := range words {
w = strings.Trim(w, ".,;:!?()/-")
if len(w) >= 4 {
sig = append(sig, w)
}
if len(sig) >= 2 {
break
}
}
zoneKey := strings.Join(sig, "_")
return h.Category + ":" + comp + ":" + zoneKey
// Group by category + component. Hazards at the same component in the
// same category form one block — the zone is typically different but the
// protective measures (e.g. Schutzzaun, Sicherheitszuhaltung) are shared.
return h.Category + ":" + h.ComponentID.String()
}
func sortByRiskDesc(entries []HazardBlockEntry, assessMap map[uuid.UUID]*RiskAssessment) {