fix(iace): close domain-gate gaps — generic patterns with press/welding/glass text
CI / loc-budget (push) Successful in 15s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / detect-changes (push) Successful in 6s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / build-sha-integrity (push) Failing after 4s
CI / validate-canonical-controls (push) Successful in 12s
CI / nodejs-build (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go (push) Failing after 37s
CI / iace-gt-coverage (push) Successful in 23s
CI / test-python-backend (push) Has been skipped
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
CI / loc-budget (push) Successful in 15s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / detect-changes (push) Successful in 6s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / build-sha-integrity (push) Failing after 4s
CI / validate-canonical-controls (push) Successful in 12s
CI / nodejs-build (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go (push) Failing after 37s
CI / iace-gt-coverage (push) Successful in 23s
CI / test-python-backend (push) Has been skipped
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
Observed on a real Kistenhubgeraet (lift) project: generic mechanical patterns (e.g. HP1000 "Quetschen Arm zwischen Pressenteilen") carry NO machine type and only generic tags (crush_point, rotating_part), so they fired for a lift; the narrow domain-gate terms missed their press/welding/glass wording. Broadens domainGateTerms (pressenteil, pressraum, blechbearbeitung, punktschweiss, schweisselektrod, elektrodenspalt) and adds a dom_glass domain (glasschneid/glasbearbeitung/...) with its emit keywords. New test pins that the four observed leakers now require a dom_* tag. Ghost=0, Leakage=0, coverage held on both GTs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,7 @@ func GetKeywordDictionary() []KeywordEntry {
|
|||||||
{Keywords: []string{"drehmaschine", "fraesmaschine", "zerspanung"}, ExtraTags: []string{"dom_cnc"}},
|
{Keywords: []string{"drehmaschine", "fraesmaschine", "zerspanung"}, ExtraTags: []string{"dom_cnc"}},
|
||||||
{Keywords: []string{"maehdrescher", "ballenpresse", "feldhaecksler", "traktor"}, ExtraTags: []string{"dom_agri"}},
|
{Keywords: []string{"maehdrescher", "ballenpresse", "feldhaecksler", "traktor"}, ExtraTags: []string{"dom_agri"}},
|
||||||
{Keywords: []string{"rolltreppe", "fahrtreppe", "fahrsteig"}, ExtraTags: []string{"dom_escalator"}},
|
{Keywords: []string{"rolltreppe", "fahrtreppe", "fahrsteig"}, ExtraTags: []string{"dom_escalator"}},
|
||||||
|
{Keywords: []string{"glasschneid", "glasbearbeitung", "flachglas", "glasscheibe", "glaskante", "glasmaschine"}, ExtraTags: []string{"dom_glass"}},
|
||||||
// Ghost-Closure (Emit-Seite): macht die 34 toten Required-Tags
|
// Ghost-Closure (Emit-Seite): macht die 34 toten Required-Tags
|
||||||
// emittierbar, jeweils NUR via domaenenspezifische Keywords -> die 120
|
// emittierbar, jeweils NUR via domaenenspezifische Keywords -> die 120
|
||||||
// Ghost-Patterns feuern wieder, aber nur fuer ihre echte Maschine (kein
|
// Ghost-Patterns feuern wieder, aber nur fuer ihre echte Maschine (kein
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ var domainGateTerms = map[string]string{
|
|||||||
"stanzhub": "dom_press", "pressenhub": "dom_press", "pressenstoessel": "dom_press",
|
"stanzhub": "dom_press", "pressenhub": "dom_press", "pressenstoessel": "dom_press",
|
||||||
"dauerhub": "dom_press", "exzenterpresse": "dom_press", "beinpresse": "dom_press",
|
"dauerhub": "dom_press", "exzenterpresse": "dom_press", "beinpresse": "dom_press",
|
||||||
"stanzpresse": "dom_press", "umformpresse": "dom_press",
|
"stanzpresse": "dom_press", "umformpresse": "dom_press",
|
||||||
|
"pressenteil": "dom_press", "pressraum": "dom_press", "blechbearbeitung": "dom_press",
|
||||||
|
"werkzeugraum der presse": "dom_press",
|
||||||
|
// Glas-Bearbeitung
|
||||||
|
"glasschneid": "dom_glass", "glasbearbeitung": "dom_glass", "glasscheibe": "dom_glass",
|
||||||
|
"glaskante": "dom_glass",
|
||||||
// Kunststoff / Spritzguss / Extrusion
|
// Kunststoff / Spritzguss / Extrusion
|
||||||
"spritzgie": "dom_plastics", "extruder": "dom_plastics", "extrusion": "dom_plastics",
|
"spritzgie": "dom_plastics", "extruder": "dom_plastics", "extrusion": "dom_plastics",
|
||||||
"kunststoffschmelze": "dom_plastics", "schliesseinheit": "dom_plastics",
|
"kunststoffschmelze": "dom_plastics", "schliesseinheit": "dom_plastics",
|
||||||
@@ -39,7 +44,8 @@ var domainGateTerms = map[string]string{
|
|||||||
"schleifscheibe": "dom_grinding", "schleifbock": "dom_grinding",
|
"schleifscheibe": "dom_grinding", "schleifbock": "dom_grinding",
|
||||||
// Schweissen
|
// Schweissen
|
||||||
"widerstandsschweiss": "dom_welding", "lichtbogenschweiss": "dom_welding",
|
"widerstandsschweiss": "dom_welding", "lichtbogenschweiss": "dom_welding",
|
||||||
"schutzgasschweiss": "dom_welding",
|
"schutzgasschweiss": "dom_welding", "punktschweiss": "dom_welding",
|
||||||
|
"schweisselektrod": "dom_welding", "elektrodenspalt": "dom_welding",
|
||||||
// Solar / PV
|
// Solar / PV
|
||||||
"pv-modul": "dom_solar", "photovoltaik": "dom_solar", "pv-anlage": "dom_solar",
|
"pv-modul": "dom_solar", "photovoltaik": "dom_solar", "pv-anlage": "dom_solar",
|
||||||
"dc-steckverbindung": "dom_solar", "solarmodul": "dom_solar",
|
"dc-steckverbindung": "dom_solar", "solarmodul": "dom_solar",
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package iace
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestDomainGate_NamedLeakersGated pins the concrete cross-domain leakers that
|
||||||
|
// were observed firing for a Kistenhubgeraet (lift) project: generic patterns
|
||||||
|
// whose text names a press/welding/glass machine but which carry no machine
|
||||||
|
// type and only generic tags. After applyDomainGates they MUST require a dom_*
|
||||||
|
// tag, so they no longer fire for unrelated machines.
|
||||||
|
func TestDomainGate_NamedLeakersGated(t *testing.T) {
|
||||||
|
leakers := []string{
|
||||||
|
"Quetschen Arm zwischen Pressenteilen",
|
||||||
|
"Quetschen durch Punktschweisselektroden",
|
||||||
|
"Laerm bei Glasschneidemaschine",
|
||||||
|
"Laerm bei Blechbearbeitung (Stanzen)",
|
||||||
|
}
|
||||||
|
byName := map[string]HazardPattern{}
|
||||||
|
for _, p := range collectAllPatterns() {
|
||||||
|
byName[p.NameDE] = p
|
||||||
|
}
|
||||||
|
for _, n := range leakers {
|
||||||
|
p, ok := byName[n]
|
||||||
|
if !ok {
|
||||||
|
t.Errorf("leaker pattern %q not found in library", n)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
hasDom := false
|
||||||
|
for _, tag := range p.RequiredComponentTags {
|
||||||
|
if strings.HasPrefix(tag, "dom_") {
|
||||||
|
hasDom = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !hasDom {
|
||||||
|
t.Errorf("%s (%q) not domain-gated; RequiredComponentTags=%v", p.ID, n, p.RequiredComponentTags)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user