feat(ai-sdk): interlocked-enclosure model — guard-open re-scoping of contact hazards
Class C (phase-aware, generic EN ISO 14120). A contact/entanglement hazard from a moving part is removed during NORMAL operation when the part is behind an interlocked guard; it remains only when the guard is open (maintenance/cleaning). - New HazardPattern.GuardableByEnclosure flag; set on HP096 (friction at rotating surfaces) and HP101 (entanglement of hair/clothing). - Narrative emits interlocked_enclosure for an interlocked door/hood. - pattern_enclosure.go: suppressedByEnclosure (drop in normal-op-only contexts) + guardedLifecycles (re-scope to maintenance/cleaning). - GT #3 gains the maintenance-phase entanglement/friction rows. Generic + regression-safe: machines that do not emit interlocked_enclosure are unaffected. GT #3 recall 80% -> 82.4%, one false positive removed (Aufwickeln). Kistenhub 97.1% and all 26 Bremse pinned mappings unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -223,7 +223,7 @@ func (e *PatternEngine) Match(input MatchInput) *MatchOutput {
|
||||
HumanRoles: p.HumanRoles,
|
||||
GeneratedHazardType: p.GeneratedHazardType,
|
||||
MatchedFailureModes: matchedFMs,
|
||||
ApplicableLifecycles: p.ApplicableLifecycles,
|
||||
ApplicableLifecycles: guardedLifecycles(p, tagSet),
|
||||
SuggestedMeasureIDs: p.SuggestedMeasureIDs,
|
||||
ClarificationQuestionsDE: p.ClarificationQuestionsDE,
|
||||
ISO12100Section: p.ISO12100Section,
|
||||
@@ -411,6 +411,11 @@ func patternMatches(p HazardPattern, tagSet map[string]bool, input MatchInput) b
|
||||
}
|
||||
}
|
||||
|
||||
// Interlocked-enclosure gate (guardable contact/entanglement). See pattern_enclosure.go.
|
||||
if suppressedByEnclosure(p, tagSet, input.LifecyclePhases) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user