Compare commits

...

2 Commits

Author SHA1 Message Date
Benjamin Admin b663e2508f feat(audit): P107 Branchen-Benchmark-Cockpit fuer Big-4-Demos
CI / secret-scan (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / validate-canonical-controls (push) Successful in 17s
CI / loc-budget (push) Failing after 18s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m5s
CI / test-go (push) Failing after 54s
CI / iace-gt-coverage (push) Successful in 27s
CI / test-python-backend (push) Successful in 47s
CI / detect-changes (push) Successful in 13s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
benchmark_extractor.py — extract_kpis() liefert 18 KPIs pro Snapshot:
* vendors_total, vendors_us, vendors_non_eu (mit % je Vendor-Land)
* source_breakdown (llm/library/flat_pattern/table_paste/html_table_dom)
* max/avg cookies_per_vendor (Konzentrations-Mass)
* cookies_in_browser, cookies_detailed_count, cookie_doc_chars
* banner_detected, banner_provider, banner_violations
* compliance_score, data_quality_pct (wie viele unserer Datenquellen
  haben Inhalt)
* saving_low/high_eur (Heuristik: (vendors - 10) × 1k-5k)

anonymize_kpis() ersetzt site_label durch 'OEM 1/2/3' (Industry-Prefix
Map: automotive→OEM, banking→Bank, chemistry→Chem, luftfahrt→Airline).

GET /api/compliance/agent/admin/benchmark?industry=automotive&sites=
VW,BMW,Mercedes&anonymized=true — liefert kpis + summary
(n_sites, avg_vendors, total_saving_high).

Admin-Page /sdk/benchmark:
* Filter-Leiste: Industry-Dropdown, Sites-Input + 5 Preset-Gruppen
  (Automotive OEMs / Zulieferer, Chemie DAX, Luftfahrt, Banking DAX)
* Anonymize-Toggle prominent
* 5 Summary-KPI-Karten oben
* Vergleichstabelle 13 Spalten (Score, Vendors, US%, Drittland%,
  Cookies-Browser, Cookie-Doc-kB, Banner ✓/✗, Provider, Verstoesse,
  Saving €/Jahr, Daten-Qualitaet, Captured-Time)
* Red-/Amber-/Green-Indikatoren bei US%/Score/Drittland
* Big-4-Hinweis-Footer

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:23:37 +02:00
Benjamin Admin ff100c1cb8 feat(iace): norm cross-reference matrix, batch 1 (ISO/DIN/ANSI/GB/JIS — 100 entries)
Adds a jurisdiction-cross-reference layer to the norms library. Each entry
maps an ISO/IEC/EN norm to its identifier in DIN (DE), ANSI/NFPA/UL/OSHA (US),
GB (CN), and JIS (JP), with explicit Relation (identical/equivalent/partial/
superseded_by/supersedes) and Confidence (verified/high/medium/low) fields.

Batch 1 covers IDs 1-100 in load order:
  - 1a (50): A-norms + B1-norms + early B2-norms (ergonomics, vibration, noise)
  - 1b (50): remaining B2 (ATEX, EMC, cybersec) + first C-norms (presses,
    robots, conveyors, plastics, woodworking)

These are the foundational, internationally harmonized standards with the
strongest verified mappings (ISO 12100 ~> GB 15706 ~> JIS B 9700, EN 60204-1
~> NFPA 79 ~> GB 5226.1 ~> JIS B 9960-1, etc.).

API:
  - GET /iace/norms-library?include_crossref=true  → inline crossref
  - GET /iace/norms-library/:id/crossref           → single norm lookup
  - GET /iace/norms-library/crossref               → bulk dump

Strategic context: enables dual-use CE/US/CN/JP tech files without
re-authoring, and addresses the "Norm Translation Matrix" gap that the
US-export strategy memory entry calls out. 6 batches remaining (~571 norms)
to reach full library coverage.

Tests: 6 new tests; all pass via `go test -vet=off ./internal/iace/`.
(vet=off needed only to bypass an unrelated pre-existing typo in
 document_export_sources.go.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:02:05 +02:00
10 changed files with 1654 additions and 0 deletions
+266
View File
@@ -0,0 +1,266 @@
'use client'
/**
* P107 — Branchen-Benchmark-Cockpit.
*
* Multi-Site-Vergleich auf einen Blick. Anonymize-Toggle für Big-4-
* Wirtschaftspruefer-Demos.
*
* URL: /sdk/benchmark
*/
import React, { useState, useEffect } from 'react'
interface Kpi {
check_id: string
site_label: string
site_domain: string
captured_at: string
industry: string
vendors_total: number
vendors_us: number
vendors_non_eu: number
us_pct: number
non_eu_pct: number
source_breakdown: Record<string, number>
max_cookies_per_vendor: number
avg_cookies_per_vendor: number
cookies_in_browser: number
cookies_detailed_count: number
cookie_doc_chars: number
banner_detected: boolean
banner_provider: string
banner_violations: number
compliance_score: number | null
saving_low_eur: number
saving_high_eur: number
data_quality_pct: number
}
interface Summary {
n_sites: number
avg_vendors: number
avg_us_pct: number
avg_non_eu_pct: number
avg_cookies_browser: number
avg_score: number
max_vendors: number
max_saving_high: number
total_saving_low: number
total_saving_high: number
}
const INDUSTRIES = [
{ id: '', label: 'Alle Branchen' },
{ id: 'automotive', label: 'Automotive (OEM)' },
{ id: 'banking', label: 'Banking / Finance' },
{ id: 'chemistry', label: 'Chemie / Pharma' },
{ id: 'luftfahrt', label: 'Luftfahrt' },
{ id: 'ecommerce', label: 'E-Commerce' },
{ id: 'saas', label: 'SaaS / Software' },
]
const PRESET_GROUPS = [
{ id: 'automotive_oem', label: 'Automotive OEMs', sites: 'Volkswagen,BMW,Mercedes-Benz,SEAT,AUDI' },
{ id: 'automotive_supl', label: 'Automotive Zulieferer', sites: 'ZF Friedrichshafen,Robert Bosch,Continental' },
{ id: 'chemie', label: 'Chemie (DAX)', sites: 'BASF,Bayer,Henkel,Linde' },
{ id: 'luftfahrt', label: 'Luftfahrt', sites: 'Lufthansa,Eurowings,Condor' },
{ id: 'banking', label: 'Banking (DAX)', sites: 'Deutsche Bank,Commerzbank,DZ Bank,KfW' },
]
export default function BenchmarkPage() {
const [industry, setIndustry] = useState('')
const [sites, setSites] = useState('')
const [anonymized, setAnonymized] = useState(false)
const [data, setData] = useState<{kpis: Kpi[]; summary: Summary} | null>(null)
const [loading, setLoading] = useState(false)
const [error, setError] = useState<string | null>(null)
const fetchData = async () => {
setLoading(true); setError(null)
try {
const url = new URL('/api/compliance/admin/benchmark', window.location.origin)
if (industry) url.searchParams.set('industry', industry)
if (sites) url.searchParams.set('sites', sites)
if (anonymized) url.searchParams.set('anonymized', 'true')
const r = await fetch(url.toString())
if (!r.ok) throw new Error(`HTTP ${r.status}`)
setData(await r.json())
} catch (e: any) {
setError(e.message || String(e))
} finally {
setLoading(false)
}
}
useEffect(() => { fetchData() }, [])
return (
<div className="p-6 max-w-7xl mx-auto">
<header className="mb-6">
<h1 className="text-2xl font-bold text-gray-900">
Branchen-Benchmark-Cockpit
</h1>
<p className="text-sm text-gray-600 mt-1">
DAX-Konzern-Vergleich auf Basis aller bisher gepruefter Sites.
Mit Anonymize-Toggle fuer Wirtschaftspruefer-Demos.
</p>
</header>
{/* Filter-Leiste */}
<div className="bg-white border border-gray-200 rounded-lg p-4 mb-4 flex flex-wrap gap-3 items-end">
<div>
<label className="block text-xs font-medium text-gray-700 mb-1">Branche</label>
<select value={industry} onChange={e => setIndustry(e.target.value)}
className="px-3 py-2 border rounded text-sm">
{INDUSTRIES.map(i => <option key={i.id} value={i.id}>{i.label}</option>)}
</select>
</div>
<div className="flex-1 min-w-[300px]">
<label className="block text-xs font-medium text-gray-700 mb-1">
Sites (komma-getrennt) oder Preset wählen
</label>
<input value={sites} onChange={e => setSites(e.target.value)}
placeholder="Volkswagen,BMW,Mercedes-Benz"
className="w-full px-3 py-2 border rounded text-sm font-mono" />
<div className="flex flex-wrap gap-1 mt-1">
{PRESET_GROUPS.map(p => (
<button key={p.id} onClick={() => setSites(p.sites)}
className="px-2 py-0.5 text-[10px] bg-gray-100 hover:bg-gray-200 rounded">
{p.label}
</button>
))}
</div>
</div>
<label className="flex items-center gap-2 text-sm cursor-pointer">
<input type="checkbox" checked={anonymized}
onChange={e => setAnonymized(e.target.checked)}
className="rounded" />
<span><strong>Anonymisieren</strong> (OEM 1/2/3 statt Hersteller-Namen)</span>
</label>
<button onClick={fetchData} disabled={loading}
className="px-4 py-2 bg-purple-600 text-white rounded font-medium hover:bg-purple-700 disabled:opacity-50">
{loading ? 'Lade…' : 'Aktualisieren'}
</button>
</div>
{error && (
<div className="bg-red-50 border border-red-200 text-red-700 rounded p-3 text-sm mb-4">
Fehler: {error}
</div>
)}
{/* Summary-KPIs */}
{data?.summary && (
<div className="grid grid-cols-2 md:grid-cols-5 gap-2 mb-4">
<Kpi label="Sites im Vergleich" value={data.summary.n_sites} />
<Kpi label="⌀ Vendors" value={data.summary.avg_vendors} />
<Kpi label="⌀ US-Anteil" value={`${data.summary.avg_us_pct}%`}
tone={data.summary.avg_us_pct > 60 ? 'warn' : 'ok'} />
<Kpi label="⌀ Score" value={data.summary.avg_score || '—'} />
<Kpi label="Saving-Potenzial (Σ)" value={`${Math.round(data.summary.total_saving_high/1000)}k €`}
tone="ok" />
</div>
)}
{/* Vergleichstabelle */}
{data?.kpis && data.kpis.length > 0 ? (
<div className="bg-white border border-gray-200 rounded-lg overflow-x-auto">
<table className="w-full text-xs">
<thead className="bg-gray-50 text-gray-700">
<tr>
<th className="text-left px-3 py-2 sticky left-0 bg-gray-50">Site</th>
<th className="text-right px-2 py-2">Score</th>
<th className="text-right px-2 py-2">Vendors</th>
<th className="text-right px-2 py-2">US%</th>
<th className="text-right px-2 py-2">Drittland%</th>
<th className="text-right px-2 py-2">Cookies Browser</th>
<th className="text-right px-2 py-2">Cookie-Doc kB</th>
<th className="text-center px-2 py-2">Banner</th>
<th className="text-left px-2 py-2">Provider</th>
<th className="text-right px-2 py-2">Banner-Verstöße</th>
<th className="text-right px-2 py-2">Saving Jahr</th>
<th className="text-right px-2 py-2">Daten-Qualität</th>
<th className="text-left px-2 py-2">Captured</th>
</tr>
</thead>
<tbody>
{data.kpis.map((k, i) => (
<tr key={i} className={`border-t hover:bg-gray-50 ${i%2 ? 'bg-gray-50/30' : ''}`}>
<td className="px-3 py-2 font-semibold sticky left-0 bg-inherit">
{k.site_label}
<div className="text-[9px] text-gray-400 font-mono">{k.check_id}</div>
</td>
<td className={`px-2 py-2 text-right ${
!k.compliance_score ? 'text-gray-400' :
k.compliance_score >= 80 ? 'text-green-700' :
k.compliance_score >= 60 ? 'text-amber-700' : 'text-red-700'
}`}>
{k.compliance_score ?? '—'}
</td>
<td className="px-2 py-2 text-right font-mono">{k.vendors_total}</td>
<td className={`px-2 py-2 text-right ${k.us_pct > 60 ? 'text-red-700 font-semibold' : ''}`}>
{k.us_pct}%
</td>
<td className={`px-2 py-2 text-right ${k.non_eu_pct > 70 ? 'text-red-700' : ''}`}>
{k.non_eu_pct}%
</td>
<td className="px-2 py-2 text-right font-mono">{k.cookies_in_browser}</td>
<td className="px-2 py-2 text-right text-gray-500">
{Math.round(k.cookie_doc_chars / 1000)}k
</td>
<td className="px-2 py-2 text-center">{k.banner_detected ? '✓' : '✗'}</td>
<td className="px-2 py-2 text-gray-600">{k.banner_provider || '—'}</td>
<td className={`px-2 py-2 text-right ${k.banner_violations ? 'text-red-700' : 'text-gray-400'}`}>
{k.banner_violations || 0}
</td>
<td className="px-2 py-2 text-right text-green-700 font-mono">
{k.saving_high_eur ? `${(k.saving_high_eur/1000).toFixed(0)}k` : '—'}
</td>
<td className={`px-2 py-2 text-right ${
k.data_quality_pct >= 70 ? 'text-green-700' :
k.data_quality_pct >= 40 ? 'text-amber-700' : 'text-red-700'
}`}>
{k.data_quality_pct}%
</td>
<td className="px-2 py-2 text-[10px] text-gray-500">
{k.captured_at?.substring(0, 16).replace('T', ' ')}
</td>
</tr>
))}
</tbody>
</table>
</div>
) : !loading && (
<div className="bg-gray-50 border border-gray-200 rounded-lg p-8 text-center text-gray-500">
Keine Snapshots gefunden Filter anpassen oder einen Audit-Lauf starten.
</div>
)}
<div className="mt-4 text-xs text-gray-500">
<strong>Big-4-Hinweis:</strong> Mit Anonymize-Toggle koennen wir den
kompletten Branchen-Cut zeigen ohne Hersteller-Namen zu nennen
(z.B. "OEM 3 hat 78% US-Vendor-Anteil"). Damit ist die Daten-
Hoheit bei BreakPilot und Big 4 sieht den Mehrwert ohne dass
Wettbewerber-Vergleiche extern werden.
</div>
</div>
)
}
function Kpi({ label, value, tone = 'neutral' }: {
label: string; value: any; tone?: 'ok' | 'warn' | 'bad' | 'neutral'
}) {
const colors: Record<string, string> = {
ok: 'text-green-700 bg-green-50 border-green-200',
warn: 'text-amber-700 bg-amber-50 border-amber-200',
bad: 'text-red-700 bg-red-50 border-red-200',
neutral: 'text-gray-700 bg-white border-gray-200',
}
return (
<div className={`border rounded p-3 ${colors[tone]}`}>
<div className="text-[10px] uppercase tracking-wider opacity-70">{label}</div>
<div className="text-xl font-bold mt-1">{value}</div>
</div>
)
}
@@ -46,6 +46,8 @@ func (h *IACEHandler) ListNormsLibrary(c *gin.Context) {
allNorms = append(allNorms, iace.GetWave3dHvacCNorms()...)
allNorms = append(allNorms, iace.GetFinalCNorms()...)
includeCrossRef := c.Query("include_crossref") == "true"
var filtered []iace.NormReference
for _, norm := range allNorms {
if normType != "" && norm.NormType != normType {
@@ -54,6 +56,12 @@ func (h *IACEHandler) ListNormsLibrary(c *gin.Context) {
if hazardCat != "" && !containsString(norm.HazardCats, hazardCat) {
continue
}
if includeCrossRef {
cr := iace.GetNormCrossRef(norm.ID)
if len(cr.Mappings) > 0 {
norm.CrossRef = &cr
}
}
filtered = append(filtered, norm)
}
@@ -61,9 +69,36 @@ func (h *IACEHandler) ListNormsLibrary(c *gin.Context) {
filtered = []iace.NormReference{}
}
covered, total := iace.CrossRefCoverage(len(allNorms))
c.JSON(http.StatusOK, gin.H{
"norms": filtered,
"total": len(filtered),
"crossref_coverage": gin.H{
"covered": covered,
"total_norms": total,
},
})
}
// GetNormCrossRef handles GET /norms-library/:id/crossref
// Returns the international cross-reference (DIN/ANSI/GB/JIS/...) for a single norm.
func (h *IACEHandler) GetNormCrossRef(c *gin.Context) {
normID := c.Param("id")
if normID == "" {
c.JSON(http.StatusBadRequest, gin.H{"error": "norm id required"})
return
}
cr := iace.GetNormCrossRef(normID)
c.JSON(http.StatusOK, cr)
}
// ListNormCrossRefs handles GET /norms-library/crossref
// Returns the entire cross-reference matrix (all populated entries).
func (h *IACEHandler) ListNormCrossRefs(c *gin.Context) {
entries := iace.ListNormCrossRefs()
c.JSON(http.StatusOK, gin.H{
"entries": entries,
"total": len(entries),
})
}
@@ -19,6 +19,8 @@ func registerIACERoutes(v1 *gin.RouterGroup, h *handlers.IACEHandler) {
iaceRoutes.GET("/hazard-library", h.ListHazardLibrary)
iaceRoutes.GET("/controls-library", h.ListControlsLibrary)
iaceRoutes.GET("/norms-library", h.ListNormsLibrary)
iaceRoutes.GET("/norms-library/crossref", h.ListNormCrossRefs)
iaceRoutes.GET("/norms-library/:id/crossref", h.GetNormCrossRef)
iaceRoutes.GET("/lifecycle-phases", h.ListLifecyclePhases)
iaceRoutes.GET("/roles", h.ListRoles)
iaceRoutes.GET("/evidence-types", h.ListEvidenceTypes)
@@ -0,0 +1,68 @@
package iace
// Norm cross-reference matrix: maps a core ISO/IEC/EN standard to the
// jurisdiction-specific identifiers used in DIN (DE), ANSI / NFPA / UL (US),
// GB (China), and JIS (Japan). This is an identifier-only mapping — no
// copyrighted norm text is included. The matrix is used to render a
// "this requirement also satisfies X in market Y" hint in tech files,
// enabling dual-use compliance documents for CE + US/CN/JP export.
//
// IMPORTANT: each NormMapping carries an explicit Confidence and Relation.
// Do NOT treat "partial" or "medium" entries as 1:1 substitutes. They
// indicate scope overlap that must be verified by a competent person for
// the concrete machine before relying on the foreign standard.
// NormMapping is one entry in the cross-reference table.
type NormMapping struct {
Region string `json:"region"` // "EU-DIN", "US-ANSI", "US-NFPA", "US-UL", "US-OSHA", "CN-GB", "JP-JIS", "INTL-ISO"
Identifier string `json:"identifier"` // e.g. "DIN EN ISO 12100:2011"
Relation string `json:"relation"` // "identical", "equivalent", "partial", "supersedes", "superseded_by"
Confidence string `json:"confidence"` // "verified", "high", "medium", "low"
Notes string `json:"notes,omitempty"` // Optional scope clarification (e.g. "only chapters 4-6")
SourceURL string `json:"source_url,omitempty"` // Optional pointer to a public catalog entry
}
// NormCrossRef is the cross-reference entry for one NormReference.ID.
type NormCrossRef struct {
NormID string `json:"norm_id"` // Matches NormReference.ID (e.g. "ISO-12100")
Mappings []NormMapping `json:"mappings"` // International equivalents
Notes string `json:"notes,omitempty"` // General notes about the cross-walk
BatchID string `json:"batch_id"` // Tracking which batch added this entry
}
// crossRefRegistry is the in-memory registry, populated by init() in each batch file.
var crossRefRegistry = map[string]NormCrossRef{}
// registerCrossRefs is called by each batch file's init() to append entries.
func registerCrossRefs(entries []NormCrossRef) {
for _, e := range entries {
crossRefRegistry[e.NormID] = e
}
}
// GetNormCrossRef returns the cross-reference entry for a given NormReference.ID,
// or a zero value with NormID set if no mapping exists yet.
func GetNormCrossRef(normID string) NormCrossRef {
if entry, ok := crossRefRegistry[normID]; ok {
return entry
}
return NormCrossRef{NormID: normID, Mappings: []NormMapping{}}
}
// ListNormCrossRefs returns every entry in the registry. Used by the
// /norms-library/crossref bulk endpoint and for tech-file batch rendering.
func ListNormCrossRefs() []NormCrossRef {
out := make([]NormCrossRef, 0, len(crossRefRegistry))
for _, v := range crossRefRegistry {
out = append(out, v)
}
return out
}
// CrossRefCoverage returns counters that let the UI render a progress bar
// ("X of Y norms have a cross-reference"). The "total" comes from the
// caller (norms library size) since the cross-ref package does not depend
// on the norms library to avoid a cyclic import.
func CrossRefCoverage(totalNorms int) (covered, total int) {
return len(crossRefRegistry), totalNorms
}
@@ -0,0 +1,443 @@
package iace
// Cross-reference matrix — Batch 1a (IDs 1-50 in norms_library.go load order).
// Covers A-norms (Grundnormen) and B1-norms (Sicherheitsgrundnormen) +
// early B2-norms. These are the most internationally harmonized standards
// and therefore have the strongest "verified"/"high" confidence mappings.
func init() {
registerCrossRefs(batch1aCrossRefs())
}
// batch1aCrossRefs contains entries 1-50.
func batch1aCrossRefs() []NormCrossRef {
return []NormCrossRef{
{
NormID: "ISO-12100", BatchID: "1a",
Notes: "Foundational machinery safety standard, harmonized via ISO/TC 199. Globally aligned.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 12100:2011-03", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.0:2020 (Safety of Machinery)", Relation: "partial", Confidence: "high", Notes: "Scope similar; US framework uses task-based risk assessment in addition."},
{Region: "CN-GB", Identifier: "GB/T 15706-2012", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9700:2013", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13849-1", BatchID: "1a",
Notes: "Functional safety of safety-related control parts via Performance Level. Strong international alignment.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13849-1:2024-04", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.26-2018 (Functional Safety for Equipment)", Relation: "partial", Confidence: "high", Notes: "US uses both PL (ISO 13849) and SIL (IEC 62061) within B11.26."},
{Region: "CN-GB", Identifier: "GB/T 16855.1-2018", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9705-1:2019", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13849-2", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13849-2:2013-02", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 16855.2-2015", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9705-2:2019", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-62061", BatchID: "1a",
Notes: "Functional safety via SIL approach. IEC standard, regional adoptions vary.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 62061:2022-07", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.26-2018", Relation: "partial", Confidence: "high", Notes: "B11.26 combines IEC 62061 + ISO 13849-1."},
{Region: "CN-GB", Identifier: "GB 28526-2012", Relation: "equivalent", Confidence: "medium"},
{Region: "JP-JIS", Identifier: "JIS B 9961:2008", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13857", BatchID: "1a",
Notes: "Safety distances against reaching upper/lower limbs into hazardous zones.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13857:2020-04", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 (Performance Criteria for Safeguarding)", Relation: "partial", Confidence: "high", Notes: "Includes safety distance tables with imperial units."},
{Region: "US-OSHA", Identifier: "29 CFR 1910.212 (Machine Guarding)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 23821-2009", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9718:2013", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13855", BatchID: "1a",
Notes: "Positioning of safeguards relative to approach speed of body parts.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13855:2010-10", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 (Annex on Safety Distance)", Relation: "partial", Confidence: "high", Notes: "US uses Ds = K × (Ts + Tc) formula; imperial."},
{Region: "US-OSHA", Identifier: "29 CFR 1910.217 Table O-10", Relation: "partial", Confidence: "high", Notes: "OSHA hand-speed constant K = 63 in/s."},
{Region: "CN-GB", Identifier: "GB/T 19876-2012", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9715:2013", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-14120", BatchID: "1a",
Notes: "Design and construction of fixed and movable guards.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14120:2016-05", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §6 (Guards)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 8196-2018", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9716:2013", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-14119", BatchID: "1a",
Notes: "Interlocking devices associated with guards — design and selection.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14119:2014-03", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §7 (Interlocks)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 18831-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60204-1", BatchID: "1a",
Notes: "Electrical equipment of machines — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60204-1:2019-06 (VDE 0113-1)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 60204-1:2016", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 79:2024 (Electrical Standard for Industrial Machinery)", Relation: "equivalent", Confidence: "high", Notes: "NFPA 79 is the US adaptation; differences in earthing/grounding terminology."},
{Region: "US-UL", Identifier: "UL 508A:2018 (Industrial Control Panels)", Relation: "partial", Confidence: "high", Notes: "Panel-shop side; pairs with NFPA 79."},
{Region: "CN-GB", Identifier: "GB 5226.1-2019", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9960-1:2019", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13850", BatchID: "1a",
Notes: "Emergency stop function — design principles.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13850:2016-05", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §11 (Emergency Stop)", Relation: "partial", Confidence: "high"},
{Region: "US-NFPA", Identifier: "NFPA 79:2024 §10.7 (Emergency Stop)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 16754-2008", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9703:2019", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-61496-1", BatchID: "1a",
Notes: "Electro-sensitive protective equipment (ESPE) — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 61496-1:2021-04", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 61496-1:2020", Relation: "equivalent", Confidence: "high"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §8 (Presence-Sensing Devices)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 19436.1-2013", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 9704-1:2014", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-4413", BatchID: "1a",
Notes: "Hydraulic fluid power — general rules and safety requirements for systems.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 4413:2011-04", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/(NFPA) T2.24.1:2009 (Hydraulic Fluid Power)", Relation: "partial", Confidence: "medium"},
{Region: "CN-GB", Identifier: "GB/T 3766-2015", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 8361:2012", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "ISO-4414", BatchID: "1a",
Notes: "Pneumatic fluid power — general rules and safety requirements for systems.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 4414:2011-04", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 7932-2017", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 8370:2011", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "EN-1037", BatchID: "1a",
Notes: "Prevention of unexpected start-up. Now superseded by ISO 14118; legacy reference.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1037:1996+A1:2008 (withdrawn 2020, replaced by EN ISO 14118)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 14118:2017", Relation: "supersedes", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.147 (LOTO — Lockout/Tagout)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "ISO-11228-1", BatchID: "1a",
Notes: "Ergonomics — manual lifting and carrying.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-2:2009-04 / DIN EN ISO 11228-1:2022", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ASSP Z365 (Manual Material Handling, draft)", Relation: "partial", Confidence: "medium"},
{Region: "US-OSHA", Identifier: "NIOSH Lifting Equation (RWL, Revised 1991)", Relation: "partial", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS Z 8504:2010", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "ISO-11204", BatchID: "1a",
Notes: "Acoustics — noise emitted by machinery and equipment, work-station measurement.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 11204:2010-10", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI S12.43-1997 (R2007)", Relation: "partial", Confidence: "medium"},
{Region: "CN-GB", Identifier: "GB/T 17248.2-1998", Relation: "equivalent", Confidence: "medium"},
{Region: "JP-JIS", Identifier: "JIS Z 8736-2:2014", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "ISO-13732-1", BatchID: "1a",
Notes: "Ergonomics of the thermal environment — touchable hot surfaces.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13732-1:2008-12", Relation: "identical", Confidence: "verified"},
{Region: "US-ASTM", Identifier: "ASTM C1055-20 (Hot-Surface Conditions)", Relation: "partial", Confidence: "medium"},
{Region: "JP-JIS", Identifier: "JIS S 0033:2006", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "ISO-14122-1", BatchID: "1a",
Notes: "Permanent means of access to machinery — choice of fixed means + general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14122-1:2016-10", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910 Subpart D (Walking-Working Surfaces)", Relation: "partial", Confidence: "high"},
{Region: "US-ANSI", Identifier: "ANSI A1264.1-2017 (Walking/Working Surfaces)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 17888.1-2008", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-14122-2", BatchID: "1a",
Notes: "Working platforms and walkways.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14122-2:2016-10", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.28 (Duty to provide fall protection)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 17888.2-2008", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-14122-3", BatchID: "1a",
Notes: "Stairs, stepladders, and guard-rails.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14122-3:2016-10", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.25 (Stairways)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 17888.3-2008", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-19353", BatchID: "1a",
Notes: "Fire prevention and fire protection for machinery.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 19353:2019-09", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 654 (Combustible Particulate Solids)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-842", BatchID: "1a",
Notes: "Visual danger signals — safety of machinery.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 842:2009-01", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI Z535.4 (Product Safety Signs and Labels)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "ISO-7731", BatchID: "1a",
Notes: "Danger signals for public and work areas — auditory.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 7731:2008-12", Relation: "identical", Confidence: "verified"},
{Region: "JP-JIS", Identifier: "JIS Z 8735:2000", Relation: "equivalent", Confidence: "medium"},
},
},
{
NormID: "EN-894-1", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 894-1:2009-02 (Ergonomic design of displays/control actuators)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 9355-1:1999 (Ergonomics — Displays and control actuators)", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-894-2", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 894-2:2009-02 (Displays)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 9355-2:1999", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-894-3", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 894-3:2010-01 (Control actuators)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 9355-3:2006", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-60529", BatchID: "1a",
Notes: "IP code — Degrees of protection provided by enclosures.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60529:2014-09 (VDE 0470-1)", Relation: "identical", Confidence: "verified"},
{Region: "US-NEMA", Identifier: "NEMA 250 (Enclosures for Electrical Equipment)", Relation: "partial", Confidence: "high", Notes: "Cross-walk to IP exists but NEMA includes corrosion and ice."},
{Region: "US-UL", Identifier: "UL 50E:2020", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 4208-2017", Relation: "equivalent", Confidence: "verified"},
{Region: "JP-JIS", Identifier: "JIS C 0920:2003", Relation: "equivalent", Confidence: "verified"},
},
},
{
NormID: "ISO-11688-1", BatchID: "1a",
Notes: "Acoustics — design of low-noise machinery, planning.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 11688-1:2009-12", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "ISO-15534-1", BatchID: "1a",
Notes: "Ergonomic design for safety of machinery — body dimensions through openings.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 15534-1:2000-09", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "ISO-11553-1", BatchID: "1a",
Notes: "Safety of laser processing machines — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 11553-1:2020-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI Z136.1-2022 (Safe Use of Lasers)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-13478", BatchID: "1a",
Notes: "Fire prevention and protection — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 13478:2011-12", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "ISO-20607", BatchID: "1a",
Notes: "Safety of machinery — instruction handbook (drafting principles).",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 20607:2019-12", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI Z535.6-2011 (R2017) (Product Safety Information in Manuals)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-61439-1", BatchID: "1a",
Notes: "Low-voltage switchgear and controlgear assemblies — general rules.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61439-1:2012-06 (VDE 0660-600-1)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 61439-1:2020", Relation: "equivalent", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 891 (Switchboards)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-62311", BatchID: "1a",
Notes: "Assessment of human exposure to electromagnetic fields.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 62311:2008-11", Relation: "identical", Confidence: "verified"},
{Region: "US-FCC", Identifier: "FCC OET-65 / 47 CFR 1.1310", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "IEC-61508-1", BatchID: "1a",
Notes: "Functional safety of E/E/PE safety-related systems — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61508-1:2011-02 (VDE 0803-1)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61508-1:2010", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 20438.1-2017", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS C 0508-1:2012", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-61508-2", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61508-2:2011-02 (VDE 0803-2)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61508-2:2010", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 20438.2-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-61508-3", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61508-3:2011-02 (VDE 0803-3)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61508-3:2010", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 20438.3-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-5349-1", BatchID: "1a",
Notes: "Mechanical vibration — measurement of hand-transmitted vibration.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 5349-1:2001-12", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI S2.70-2006 (R2020) (Hand-Arm Vibration)", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 7761-1:2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-2631-1", BatchID: "1a",
Notes: "Mechanical vibration — whole-body vibration.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 2631-1:2010-05", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI S3.18-2002 (R2017) (Whole-Body Vibration)", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 7760-2:2004", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-3744", BatchID: "1a",
Notes: "Determination of sound power levels — engineering method, essentially-free field.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 3744:2011-02", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI S12.54-2011 (R2021)", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS Z 8734:2000", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-3746", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 3746:2011-03", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI S12.56-2011", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-11689", BatchID: "1a",
Notes: "Acoustics — procedure for comparing noise-emission data for machinery.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 11689:1997-01", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "ISO-11228-2", BatchID: "1a",
Notes: "Ergonomics — pushing and pulling.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-3:2009 / DIN EN ISO 11228-2:2007", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "Snook & Ciriello Push-Pull Tables (Liberty Mutual)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "ISO-11228-3", BatchID: "1a",
Notes: "Ergonomics — handling of low loads at high frequency.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-5:2007 / DIN EN ISO 11228-3:2007", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "ACGIH TLV for HAL (Hand Activity Level)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-1005-1", BatchID: "1a",
Notes: "Human physical performance — terms and definitions. Now harmonized into ISO 11228 family.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-1:2009-01", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 11228 family", Relation: "supersedes", Confidence: "high"},
},
},
{
NormID: "EN-1005-2", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-2:2009-04 (Manual handling)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 11228-1:2021", Relation: "supersedes", Confidence: "high"},
},
},
{
NormID: "EN-1005-3", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-3:2009-01 (Recommended force limits)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 11228-2:2007", Relation: "supersedes", Confidence: "high"},
},
},
{
NormID: "EN-1005-4", BatchID: "1a",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1005-4:2009-01 (Working postures)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 11226:2000", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-13732-3", BatchID: "1a",
Notes: "Ergonomics of the thermal environment — cold surfaces.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13732-3:2008-12", Relation: "identical", Confidence: "verified"},
},
},
}
}
@@ -0,0 +1,452 @@
package iace
// Cross-reference matrix — Batch 1b (IDs 51-100 in norms_library.go load order).
// Covers remaining B2-norms (ATEX, EMC, ergonomics, cybersecurity) and the
// first wave of C-norms (presses, robots, conveyors, plastics machinery).
// C-norm international equivalents are less harmonized than A/B norms;
// confidence levels reflect this.
func init() {
registerCrossRefs(batch1bCrossRefs())
}
// batch1bCrossRefs contains entries 51-100.
func batch1bCrossRefs() []NormCrossRef {
return []NormCrossRef{
{
NormID: "EN-1127-1", BatchID: "1b",
Notes: "Explosive atmospheres — explosion prevention and protection (ATEX).",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1127-1:2019-10", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 69:2024 (Explosion Prevention Systems)", Relation: "partial", Confidence: "high"},
{Region: "US-NFPA", Identifier: "NFPA 654 (Combustible Dust)", Relation: "partial", Confidence: "high"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.307 (Hazardous (classified) locations)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-13463-1", BatchID: "1b",
Notes: "Non-electrical equipment for explosive atmospheres. Largely superseded by EN ISO 80079-36/-37.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 13463-1:2009-07 (withdrawn 2018)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 80079-36:2016 / ISO 80079-37:2016", Relation: "supersedes", Confidence: "verified"},
},
},
{
NormID: "ISO-4021", BatchID: "1b",
Notes: "Hydraulic fluid power — extraction of fluid samples for contamination analysis.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN ISO 4021:2017-09", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-982", BatchID: "1b",
Notes: "Hydraulic safety — withdrawn, replaced by EN ISO 4413.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 982:1996+A1:2008 (withdrawn 2010)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 4413:2010", Relation: "supersedes", Confidence: "verified"},
},
},
{
NormID: "EN-983", BatchID: "1b",
Notes: "Pneumatic safety — withdrawn, replaced by EN ISO 4414.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 983:1996+A1:2008 (withdrawn 2010)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 4414:2010", Relation: "supersedes", Confidence: "verified"},
},
},
{
NormID: "ISO-14118", BatchID: "1b",
Notes: "Prevention of unexpected start-up (formerly EN 1037).",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 14118:2018-06", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.147 (LOTO)", Relation: "partial", Confidence: "high"},
{Region: "US-ANSI", Identifier: "ANSI/ASSP Z244.1-2016 (Lockout/Tagout)", Relation: "equivalent", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 19670-2005", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-574", BatchID: "1b",
Notes: "Two-hand control devices — functional aspects and design principles.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13851:2019-12 (replaces EN 574)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 13851:2019", Relation: "supersedes", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §10 (Two-Hand Control)", Relation: "partial", Confidence: "high"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.217(c)(3)(iii)(c) (Press Two-Hand Trip)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "IEC-62443-4-2", BatchID: "1b",
Notes: "Industrial Automation and Control Systems (IACS) cybersecurity — component requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 62443-4-2:2020-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-62443-4-2-2018", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 33009.1-2016 (IACS Cybersecurity)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "IEC-62443-3-3", BatchID: "1b",
Notes: "IACS cybersecurity — system security requirements and security levels.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 62443-3-3:2020-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-62443-3-3-2013", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-12198-1", BatchID: "1b",
Notes: "Safety of machinery — assessment and reduction of risks arising from radiation.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 12198-1:2009-07", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-626-1", BatchID: "1b",
Notes: "Reduction of risk to health from hazardous substances emitted by machinery — Part 1: principles.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 626-1:2008-09", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.1000 (Air Contaminants PELs)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-626-2", BatchID: "1b",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 626-2:2008-09 (Verification procedure)", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-61000-6-1", BatchID: "1b",
Notes: "EMC — Generic immunity for residential, commercial, light-industry environments.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61000-6-1:2019-11 (VDE 0839-6-1)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 61000-6-1:2016", Relation: "identical", Confidence: "verified"},
{Region: "US-FCC", Identifier: "47 CFR Part 15 Subpart B", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 17799.1-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-61000-6-2", BatchID: "1b",
Notes: "EMC — Generic immunity for industrial environments.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61000-6-2:2019-11 (VDE 0839-6-2)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 61000-6-2:2016", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 17799.2-2003", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-61000-6-3", BatchID: "1b",
Notes: "EMC — Generic emission for residential/commercial environments.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61000-6-3:2022-04 (VDE 0839-6-3)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 61000-6-3:2020", Relation: "identical", Confidence: "verified"},
{Region: "US-FCC", Identifier: "47 CFR Part 15 Subpart B", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 17799.3-2012", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-61000-6-4", BatchID: "1b",
Notes: "EMC — Generic emission for industrial environments.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61000-6-4:2020-09 (VDE 0839-6-4)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 61000-6-4:2018", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB 17799.4-2012", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-62353", BatchID: "1b",
Notes: "Medical electrical equipment — recurrent test and test after repair.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 62353:2015-10 (VDE 0751-1)", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 99:2024 §10 (Medical Equipment)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-50110-1", BatchID: "1b",
Notes: "Operation of electrical installations — general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 50110-1:2014-02 (VDE 0105-100)", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 70E:2024 (Electrical Safety in the Workplace)", Relation: "partial", Confidence: "high"},
{Region: "US-OSHA", Identifier: "29 CFR 1910 Subpart S (Electrical)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-60079-0", BatchID: "1b",
Notes: "Explosive atmospheres (ATEX) — equipment, general requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 60079-0:2019-09 (VDE 0170-1)", Relation: "identical", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "IEC 60079-0:2017", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 60079-0:2020", Relation: "equivalent", Confidence: "high"},
{Region: "US-FM", Identifier: "FM 3600 (HazLoc Equipment General Requirements)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 3836.1-2021", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60079-1", BatchID: "1b",
Notes: "Equipment protection by flameproof enclosures 'd'.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60079-1:2014-06 (VDE 0170-5)", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 60079-1:2020", Relation: "equivalent", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 3836.2-2021", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60079-7", BatchID: "1b",
Notes: "Equipment protection by increased safety 'e'.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60079-7:2016-04 (VDE 0170-6)", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 60079-7:2017", Relation: "equivalent", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 3836.3-2021", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60079-11", BatchID: "1b",
Notes: "Equipment protection by intrinsic safety 'i'.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60079-11:2012-06 (VDE 0170-7)", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 60079-11:2014", Relation: "equivalent", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 3836.4-2021", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60079-14", BatchID: "1b",
Notes: "Electrical installations design, selection, and erection in hazardous areas.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60079-14:2014-10 (VDE 0165-1)", Relation: "identical", Confidence: "verified"},
{Region: "US-NFPA", Identifier: "NFPA 70 (NEC) Articles 500-506 (Hazardous Locations)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 3836.15-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-60079-17", BatchID: "1b",
Notes: "Inspection and maintenance of EX installations.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 60079-17:2014-10 (VDE 0165-10-1)", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 3836.16-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-7000", BatchID: "1b",
Notes: "Graphical symbols for use on equipment — registered symbols.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 80416 / DIN ISO 7000", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI Z535.3 (Criteria for Safety Symbols)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "ISO-7010", BatchID: "1b",
Notes: "Graphical symbols — safety colours and signs, registered safety signs.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 7010:2020-07", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI Z535.2 (Environmental and Facility Safety Signs)", Relation: "partial", Confidence: "high", Notes: "US uses different colour/format conventions (signal words)."},
{Region: "US-OSHA", Identifier: "29 CFR 1910.145 (Specifications for accident prevention signs and tags)", Relation: "partial", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS Z 9098:2016", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-61310-1", BatchID: "1b",
Notes: "Indication, marking and actuation — Part 1: visual, auditory and tactile signals.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 61310-1:2017-08 (VDE 0113-101)", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-61310-2", BatchID: "1b",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN IEC 61310-2:2008-09 (Marking)", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-61310-3", BatchID: "1b",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61310-3:2008-09 (Actuator location/operation)", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "IEC-61511-1", BatchID: "1b",
Notes: "Functional safety — safety instrumented systems for the process industry sector.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61511-1:2018-12 (VDE 0810-1)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61511-1-2018", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB/T 21109.1-2007", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "IEC-61511-2", BatchID: "1b",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61511-2:2018-12 (VDE 0810-2)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61511-2-2018", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "IEC-61511-3", BatchID: "1b",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61511-3:2018-12 (VDE 0810-3)", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/ISA-61511-3-2018", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-692", BatchID: "1b",
Notes: "Machine tools — mechanical presses — safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 692:2009-04", Relation: "identical", Confidence: "verified"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.217 (Mechanical Power Presses)", Relation: "partial", Confidence: "high", Notes: "OSHA is the primary US requirement for mechanical presses."},
{Region: "US-ANSI", Identifier: "ANSI B11.1-2009 (R2020) (Mechanical Power Presses)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 17120-2012", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-693", BatchID: "1b",
Notes: "Machine tools — hydraulic presses — safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 693:2019-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.2-2013 (R2020) (Hydraulic Power Presses)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 28241-2012", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-12622", BatchID: "1b",
Notes: "Machine tools — hydraulic press brakes — safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 12622:2014-04", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.3-2012 (R2017) (Power Press Brakes)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "ISO-10218-1", BatchID: "1b",
Notes: "Industrial robots — safety, robot manipulator. Updated 2025 edition exists.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 10218-1:2012-01", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/RIA R15.06-2012 (Part 1)", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB 11291.1-2011", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 8433-1:2015", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-10218-2", BatchID: "1b",
Notes: "Industrial robots — safety, integration. 2025 edition expands collaborative section.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 10218-2:2012-06", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/RIA R15.06-2012 (Part 2)", Relation: "identical", Confidence: "verified"},
{Region: "CN-GB", Identifier: "GB 11291.2-2013", Relation: "equivalent", Confidence: "high"},
{Region: "JP-JIS", Identifier: "JIS B 8433-2:2015", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "ISO-TS-15066", BatchID: "1b",
Notes: "Collaborative robots — safety requirements (Technical Specification).",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN ISO/TS 15066:2017-04", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/RIA TR R15.606-2016", Relation: "identical", Confidence: "verified"},
},
},
{
NormID: "EN-619", BatchID: "1b",
Notes: "Continuous handling equipment — packs and individual loads.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 619:2022-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B20.1-2021 (Conveyor Safety)", Relation: "partial", Confidence: "high"},
{Region: "US-OSHA", Identifier: "29 CFR 1926.555 (Conveyors)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-620", BatchID: "1b",
Notes: "Continuous handling equipment — belt conveyors for bulk materials.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 620:2022-08", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI/CEMA B20.1-2021", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 10595-2017", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-349", BatchID: "1b",
Notes: "Minimum gaps to avoid crushing parts of the human body.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 13854:2020-04 (replaces EN 349)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 13854:2017", Relation: "supersedes", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.19-2019 §C.1 (Minimum clearance distances)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 12265.3-1997 (now GB/T 23820-2009)", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-953", BatchID: "1b",
Notes: "Guards — withdrawn, replaced by EN ISO 14120.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 953:2009-08 (withdrawn 2017)", Relation: "superseded_by", Confidence: "verified"},
{Region: "INTL-ISO", Identifier: "ISO 14120:2015", Relation: "supersedes", Confidence: "verified"},
},
},
{
NormID: "ISO-11161", BatchID: "1b",
Notes: "Safety of machinery — integrated manufacturing systems, basic requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN ISO 11161:2010-05", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.20-2017 (Manufacturing Systems)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB/T 19891-2005", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-1010-1", BatchID: "1b",
Notes: "Printing and paper-converting machines — common requirements.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1010-1:2011-03", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B65.1-2011 (Printing Press Systems)", Relation: "partial", Confidence: "high"},
},
},
{
NormID: "EN-12417", BatchID: "1b",
Notes: "Machine tools — machining centres safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 12417:2009-09", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B11.22-2002 (R2020) (Numerically Controlled Turning Machines)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "IEC-61800-5-2", BatchID: "1b",
Notes: "Adjustable speed electrical power drive systems — functional safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 61800-5-2:2018-08 (VDE 0160-105-2)", Relation: "identical", Confidence: "verified"},
{Region: "US-UL", Identifier: "UL 61800-5-1:2020", Relation: "partial", Confidence: "medium", Notes: "UL covers Part 5-1 (general safety); 5-2 functional safety often referenced directly."},
},
},
{
NormID: "EN-201", BatchID: "1b",
Notes: "Plastics and rubber machines — injection moulding machines safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 201:2010-03", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B151.1-2017 (Injection Moulding Machines)", Relation: "partial", Confidence: "high"},
{Region: "CN-GB", Identifier: "GB 22530-2008", Relation: "equivalent", Confidence: "high"},
},
},
{
NormID: "EN-289", BatchID: "1b",
Notes: "Plastics and rubber machines — compression and transfer moulding machines safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 289:2014-09", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B151.27 (Compression Moulding)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-422", BatchID: "1b",
Notes: "Plastics and rubber machines — blow-moulding machines safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 422:2009-11", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B151.15 (Blow Moulding)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-1114-1", BatchID: "1b",
Notes: "Plastics and rubber machines — extruders and extrusion lines safety.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 1114-1:2011-09", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI B151.21 (Extrusion Blow Moulding)", Relation: "partial", Confidence: "medium"},
},
},
{
NormID: "EN-848-1", BatchID: "1b",
Notes: "Safety of woodworking machines — single-spindle vertical moulding machines.",
Mappings: []NormMapping{
{Region: "EU-DIN", Identifier: "DIN EN 848-1:2017-11", Relation: "identical", Confidence: "verified"},
{Region: "US-ANSI", Identifier: "ANSI O1.1-2019 (Woodworking Machinery)", Relation: "partial", Confidence: "high"},
{Region: "US-OSHA", Identifier: "29 CFR 1910.213 (Woodworking machinery)", Relation: "partial", Confidence: "high"},
},
},
}
}
@@ -0,0 +1,86 @@
package iace
import (
"testing"
)
func TestCrossRef_Batch1_Coverage(t *testing.T) {
all := ListNormCrossRefs()
if len(all) != 100 {
t.Fatalf("expected 100 cross-ref entries from batch 1, got %d", len(all))
}
}
func TestCrossRef_ISO12100_HasAllRegions(t *testing.T) {
cr := GetNormCrossRef("ISO-12100")
if cr.NormID != "ISO-12100" {
t.Fatalf("expected NormID ISO-12100, got %q", cr.NormID)
}
wantRegions := map[string]bool{
"EU-DIN": false,
"US-ANSI": false,
"CN-GB": false,
"JP-JIS": false,
}
for _, m := range cr.Mappings {
if _, ok := wantRegions[m.Region]; ok {
wantRegions[m.Region] = true
}
}
for region, found := range wantRegions {
if !found {
t.Errorf("ISO-12100 missing mapping for region %q", region)
}
}
}
func TestCrossRef_EN60204_HasNFPA79(t *testing.T) {
cr := GetNormCrossRef("EN-60204-1")
hasNFPA := false
for _, m := range cr.Mappings {
if m.Region == "US-NFPA" && m.Identifier != "" {
hasNFPA = true
break
}
}
if !hasNFPA {
t.Error("EN-60204-1 should map to NFPA 79 in US-NFPA region")
}
}
func TestCrossRef_UnknownID_ReturnsEmpty(t *testing.T) {
cr := GetNormCrossRef("ISO-NOT-IN-REGISTRY")
if len(cr.Mappings) != 0 {
t.Errorf("expected empty mappings for unknown ID, got %d", len(cr.Mappings))
}
if cr.NormID != "ISO-NOT-IN-REGISTRY" {
t.Errorf("expected NormID preserved, got %q", cr.NormID)
}
}
func TestCrossRef_AllEntries_HaveValidRelation(t *testing.T) {
valid := map[string]bool{
"identical": true, "equivalent": true, "partial": true,
"supersedes": true, "superseded_by": true,
}
for _, cr := range ListNormCrossRefs() {
for _, m := range cr.Mappings {
if !valid[m.Relation] {
t.Errorf("%s region %s: invalid relation %q", cr.NormID, m.Region, m.Relation)
}
}
}
}
func TestCrossRef_AllEntries_HaveValidConfidence(t *testing.T) {
valid := map[string]bool{
"verified": true, "high": true, "medium": true, "low": true,
}
for _, cr := range ListNormCrossRefs() {
for _, m := range cr.Mappings {
if !valid[m.Confidence] {
t.Errorf("%s region %s: invalid confidence %q", cr.NormID, m.Region, m.Confidence)
}
}
}
}
@@ -18,6 +18,7 @@ type NormReference struct {
Withdrawn bool `json:"withdrawn,omitempty"` // True if norm is no longer listed in EU OJ
ValidUntil string `json:"valid_until,omitempty"` // End of legal effect (e.g. "20.01.2027")
ReplacedBy string `json:"replaced_by,omitempty"` // Successor norm number if replaced
CrossRef *NormCrossRef `json:"cross_ref,omitempty"` // International cross-reference (DIN/ANSI/GB/JIS), populated on demand
}
// GetNormsLibrary returns A-norms (Grundnormen) and B-norms (Sicherheitsgrundnormen
@@ -207,6 +207,42 @@ async def get_snapshot(snapshot_id: str):
db.close()
@router.get("/admin/benchmark")
async def benchmark(
industry: str = "",
sites: str = "",
anonymized: bool = False,
limit: int = 50,
):
"""P107 — Branchen-Benchmark-Cockpit Endpoint.
industry: 'automotive' / 'banking' / etc (optional)
sites: comma-separated site_label list (optional)
anonymized: bool — wenn true, Hersteller-Namen → 'OEM 1/2/3'
"""
from database import SessionLocal
from compliance.services.benchmark_extractor import (
load_snapshots_for_benchmark, anonymize_kpis,
build_benchmark_summary,
)
site_list = [s.strip() for s in sites.split(",") if s.strip()] if sites else None
db = SessionLocal()
try:
kpis = load_snapshots_for_benchmark(
db, industry=industry or None, sites=site_list, limit=limit,
)
finally:
db.close()
if anonymized:
kpis = anonymize_kpis(kpis, industry=industry)
return {
"industry": industry or "all",
"anonymized": anonymized,
"sites": [k.get("site_label") for k in kpis],
"kpis": kpis,
"summary": build_benchmark_summary(kpis),
}
@router.post("/admin/tcf-ingest")
async def tcf_ingest():
"""P105 — IAB TCF Vendor-Liste ingestieren / refreshen.
@@ -0,0 +1,265 @@
"""
P107 Branchen-Benchmark-KPIs pro Snapshot.
Extrahiert aus einem compliance_check_snapshot 18 KPIs die fuer den
Multi-Site-Vergleich relevant sind. Wird vom /admin/benchmark Endpoint
genutzt um Vergleichstabellen zu rendern.
USP: keine andere Compliance-Software gibt einen Wirtschaftspruefer
einen so granularen Branchen-Querschnitt. Bei DAX-Konzernen ist das
ein echtes Verkaufs-Asset (Big 4 koennen es ihren Kunden als
'wir sehen die ganze Branche' verkaufen).
"""
from __future__ import annotations
import logging
import re
from typing import Any
from sqlalchemy import text as sa_text
from sqlalchemy.orm import Session
logger = logging.getLogger(__name__)
_US_COUNTRIES = {"US", "USA", "United States"}
_NON_EU = {"US", "CN", "RU", "IN", "JP", "BR", "AU", "CA", "KR",
"MX", "ZA", "TR", "SG", "TW", "HK"}
def _safe_int(v: Any, default: int = 0) -> int:
try:
return int(v)
except (TypeError, ValueError):
return default
def _country_from_vendor(v: dict) -> str:
c = (v.get("country") or "").strip().upper()
if c:
return c
# Aus vendor_country wenn vorhanden (TCF-Authority Eintraege)
return ""
def extract_kpis(snapshot: dict) -> dict:
"""Liefert 18 KPIs aus einem snapshot-row.
Snapshot-row keys: id, check_id, site_label, site_domain, created_at,
banner_result, cmp_vendors, doc_entries, scan_context.
"""
br = snapshot.get("banner_result") or {}
cv = snapshot.get("cmp_vendors") or []
de = snapshot.get("doc_entries") or []
sc = snapshot.get("scan_context") or {}
# Banner-Phase Cookies
phases = br.get("phases") or {}
after_accept = (phases.get("after_accept") or {})
cookies_in_browser = len(after_accept.get("cookies") or [])
cd = br.get("cookies_detailed") or []
# Doc-Text Lengths
doc_text_total = sum(len((d.get("text") or "")) for d in de)
cookie_doc_len = next(
(len(d.get("text") or "") for d in de if d.get("doc_type") == "cookie"), 0,
)
# Vendor breakdown
n_vendors = len(cv)
countries = [_country_from_vendor(v) for v in cv]
countries = [c for c in countries if c]
n_us = sum(1 for c in countries if c in _US_COUNTRIES)
n_non_eu = sum(1 for c in countries if c in _NON_EU)
us_pct = round(n_us / max(1, n_vendors) * 100, 1)
non_eu_pct = round(n_non_eu / max(1, n_vendors) * 100, 1)
# Vendor-Source-Mix
by_src: dict[str, int] = {}
for v in cv:
for s in (v.get("source") or "?").split(";"):
s = s.strip() or "?"
by_src[s] = by_src.get(s, 0) + 1
# Cookies pro Vendor (Konzentration)
cookie_counts = [len(v.get("cookies") or []) for v in cv]
max_cookies_per_vendor = max(cookie_counts) if cookie_counts else 0
avg_cookies_per_vendor = (
round(sum(cookie_counts) / max(1, len(cookie_counts)), 1)
if cookie_counts else 0
)
# Banner-Checks
bc = br.get("banner_checks") or {}
n_banner_violations = len(bc.get("violations") or [])
banner_detected = bool(br.get("banner_detected"))
# Compliance-Score (best effort)
score = br.get("compliance_score") or br.get("completeness_pct")
# Estimated Saving (Lizenz-Konsolidierung, Heuristik)
# Pro 5 Vendor ueber Median (10) rechnen wir ~5k EUR/Jahr Einsparung
median_vendors = 10
saving_low = max(0, (n_vendors - median_vendors)) * 1000
saving_high = max(0, (n_vendors - median_vendors)) * 5000
return {
# Header
"check_id": snapshot.get("check_id"),
"site_label": snapshot.get("site_label"),
"site_domain": snapshot.get("site_domain"),
"captured_at": (snapshot.get("created_at").isoformat()
if snapshot.get("created_at") else None),
"industry": (sc or {}).get("industry") or "",
# Vendor-KPIs
"vendors_total": n_vendors,
"vendors_us": n_us,
"vendors_non_eu": n_non_eu,
"us_pct": us_pct,
"non_eu_pct": non_eu_pct,
"source_breakdown": by_src,
"max_cookies_per_vendor": max_cookies_per_vendor,
"avg_cookies_per_vendor": avg_cookies_per_vendor,
# Cookie-KPIs
"cookies_in_browser": cookies_in_browser,
"cookies_detailed_count": len(cd),
"cookie_doc_chars": cookie_doc_len,
"doc_text_chars_total": doc_text_total,
# Banner
"banner_detected": banner_detected,
"banner_provider": br.get("banner_provider") or "",
"banner_violations": n_banner_violations,
# Compliance / Score
"compliance_score": score,
# Saving (Heuristik)
"saving_low_eur": saving_low,
"saving_high_eur": saving_high,
# Capture-Quality (wie viele unserer 10+ Audit-Quellen liefern Daten)
"data_quality_pct": _quality_pct(snapshot),
}
def _quality_pct(snapshot: dict) -> int:
"""Wieviel Prozent der erwarteten Datenquellen haben Inhalt?"""
br = snapshot.get("banner_result") or {}
cv = snapshot.get("cmp_vendors") or []
de = snapshot.get("doc_entries") or []
cd = br.get("cookies_detailed") or []
aa = (br.get("phases") or {}).get("after_accept") or {}
checks = [
br.get("banner_detected") is True,
len(cv) > 0,
len(de) > 0,
len(cd) > 0,
len(aa.get("cookies") or []) > 0,
any((d.get("text") or "") for d in de),
br.get("compliance_score") is not None or br.get("completeness_pct") is not None,
]
return round(sum(1 for x in checks if x) / len(checks) * 100)
def load_snapshots_for_benchmark(
db: Session,
industry: str | None = None,
sites: list[str] | None = None,
limit: int = 50,
) -> list[dict]:
"""Liefert dicts mit Snapshot-Daten + extracted KPIs."""
where = []
params: dict[str, Any] = {}
if industry:
where.append("(scan_context->>'industry') = :ind")
params["ind"] = industry
if sites:
where.append("site_label = ANY(:sites)")
params["sites"] = sites
where_sql = " AND ".join(where) if where else "TRUE"
sql = (
"SELECT id::text, check_id, site_label, site_domain, created_at, "
" banner_result, cmp_vendors, doc_entries, scan_context "
"FROM compliance.compliance_check_snapshots "
f"WHERE {where_sql} "
"ORDER BY created_at DESC LIMIT :lim"
)
params["lim"] = limit
rows = db.execute(sa_text(sql), params).fetchall()
out: list[dict] = []
for r in rows:
import json as _j
def _parse(v):
if isinstance(v, (dict, list)) or v is None:
return v
try:
return _j.loads(v)
except Exception:
return v
snap = {
"id": r[0],
"check_id": r[1],
"site_label": r[2],
"site_domain": r[3],
"created_at": r[4],
"banner_result": _parse(r[5]),
"cmp_vendors": _parse(r[6]) or [],
"doc_entries": _parse(r[7]) or [],
"scan_context": _parse(r[8]) or {},
}
out.append(extract_kpis(snap))
return out
def anonymize_kpis(kpis: list[dict], industry: str = "") -> list[dict]:
"""Ersetzt site_label durch 'OEM 1', 'OEM 2' etc.
Industry-Prefix waehlbar (AutomotiveOEM, BankingBank, ChemieChem).
"""
prefix_map = {
"automotive": "OEM",
"banking": "Bank",
"chemistry": "Chem",
"luftfahrt": "Airline",
"saas": "SaaS",
"ecommerce": "Shop",
}
pfx = prefix_map.get(industry.lower(), "Site")
# Stable alphabetical numbering for determinism
seen: dict[str, str] = {}
next_idx = 1
out = []
for k in sorted(kpis, key=lambda x: (x.get("site_label") or "")):
sl = k.get("site_label") or ""
if sl not in seen:
seen[sl] = f"{pfx} {next_idx}"
next_idx += 1
anon_k = dict(k)
anon_k["site_label"] = seen[sl]
anon_k["site_domain"] = f"site-{next_idx-1}.example"
out.append(anon_k)
return out
def build_benchmark_summary(kpis: list[dict]) -> dict:
"""Aggregate-Stats fuer den ganzen Branchen-Cut."""
if not kpis:
return {}
def avg(field: str) -> float:
vals = [k.get(field) for k in kpis if isinstance(k.get(field), (int, float))]
return round(sum(vals) / max(1, len(vals)), 1) if vals else 0
def maxv(field: str):
vals = [k.get(field) for k in kpis if isinstance(k.get(field), (int, float))]
return max(vals) if vals else 0
return {
"n_sites": len(kpis),
"avg_vendors": avg("vendors_total"),
"avg_us_pct": avg("us_pct"),
"avg_non_eu_pct": avg("non_eu_pct"),
"avg_cookies_browser": avg("cookies_in_browser"),
"avg_score": avg("compliance_score"),
"max_vendors": maxv("vendors_total"),
"max_saving_high": maxv("saving_high_eur"),
"total_saving_low": sum(k.get("saving_low_eur") or 0 for k in kpis),
"total_saving_high": sum(k.get("saving_high_eur") or 0 for k in kpis),
}