feat(iace): show lifecycle phases + affected persons in benchmark detail
Backend: HazardSummary now includes lifecycle_phase and affected_person Frontend: Engine detail column shows Lebensphasen and Betroffene Personen Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,15 +68,17 @@ func CompareBenchmark(gt *GroundTruth, hazards []Hazard, mitigations []Mitigatio
|
||||
engineSummaries := make([]HazardSummary, len(hazards))
|
||||
for i, h := range hazards {
|
||||
engineSummaries[i] = HazardSummary{
|
||||
ID: h.ID.String(),
|
||||
Name: h.Name,
|
||||
Category: h.Category,
|
||||
Zone: h.HazardousZone,
|
||||
Description: h.Description,
|
||||
Scenario: h.Scenario,
|
||||
PossibleHarm: h.PossibleHarm,
|
||||
TriggerEvent: h.TriggerEvent,
|
||||
Mitigations: mitNamesByHazard[h.ID.String()],
|
||||
ID: h.ID.String(),
|
||||
Name: h.Name,
|
||||
Category: h.Category,
|
||||
Zone: h.HazardousZone,
|
||||
Description: h.Description,
|
||||
Scenario: h.Scenario,
|
||||
PossibleHarm: h.PossibleHarm,
|
||||
TriggerEvent: h.TriggerEvent,
|
||||
AffectedPerson: h.AffectedPerson,
|
||||
LifecyclePhase: h.LifecyclePhase,
|
||||
Mitigations: mitNamesByHazard[h.ID.String()],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,17 +92,19 @@ type HazardMatchPair struct {
|
||||
|
||||
// HazardSummary is a hazard representation for benchmark results with detail fields.
|
||||
type HazardSummary struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
Component string `json:"component,omitempty"`
|
||||
Zone string `json:"zone,omitempty"`
|
||||
RiskLevel string `json:"risk_level,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Scenario string `json:"scenario,omitempty"`
|
||||
PossibleHarm string `json:"possible_harm,omitempty"`
|
||||
TriggerEvent string `json:"trigger_event,omitempty"`
|
||||
Mitigations []string `json:"mitigations,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
Component string `json:"component,omitempty"`
|
||||
Zone string `json:"zone,omitempty"`
|
||||
RiskLevel string `json:"risk_level,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Scenario string `json:"scenario,omitempty"`
|
||||
PossibleHarm string `json:"possible_harm,omitempty"`
|
||||
TriggerEvent string `json:"trigger_event,omitempty"`
|
||||
AffectedPerson string `json:"affected_person,omitempty"`
|
||||
LifecyclePhase string `json:"lifecycle_phase,omitempty"`
|
||||
Mitigations []string `json:"mitigations,omitempty"`
|
||||
}
|
||||
|
||||
// CategoryScore shows coverage per ISO 12100 hazard group.
|
||||
|
||||
Reference in New Issue
Block a user