Use-Case-Mapping-Filter für Master Controls + Mapper-Präzisionsfix
CI / detect-changes (push) Successful in 14s
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 7s
CI / validate-canonical-controls (push) Successful in 13s
CI / loc-budget (push) Failing after 15s
CI / go-lint (push) Has been skipped
CI / test-go (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m23s
CI / iace-gt-coverage (push) Has been skipped
CI / test-python-backend (push) Successful in 34s
CI / test-python-document-crawler (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped

Phase 2: Live-Filter an /sdk/master-controls (Use Case, Quell-Regulierung,
Verifikations-Methode, Coverage, Primärzweck-Toggle, category via Member-EXISTS).
API mit EXISTS-Filtern + gecachten Meta-Counts in master-controls/route.ts.

Phase A: neue UseCase telekommunikation + Fix der Impressum-Fehlrouten im
Register (TKG/AT-TKG->telekommunikation, telemedien->dse, GewO->handelsrecht);
echte Impressum-Quellen (TMG/Mediengesetz) bleiben impressum. Deterministischer
Seed aus source_regulation; Tests grün.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-06-09 23:19:56 +02:00
parent c4d9b1426f
commit 372e1fe9e9
10 changed files with 434 additions and 45 deletions
@@ -0,0 +1,44 @@
import { describe, it, expect } from 'vitest'
import {
USE_CASE_LABELS, MC_VERIFICATION_LABELS, useCaseLabel, mcVerificationLabel,
} from '../components/mcMappingLabels'
describe('useCaseLabel', () => {
it('maps known use-case keys to German labels', () => {
expect(useCaseLabel('impressum')).toBe('Impressum')
expect(useCaseLabel('cookie_banner')).toBe('Cookie-Banner')
expect(useCaseLabel('code_security')).toBe('Code Security')
expect(useCaseLabel('dse')).toBe('Datenschutzerklärung')
})
it('humanizes an unknown key instead of showing the raw slug', () => {
expect(useCaseLabel('brand_new_thing')).toBe('Brand New Thing')
})
})
describe('mcVerificationLabel', () => {
it('maps the master-control verification methods', () => {
expect(mcVerificationLabel('source_code')).toBe('Source Code')
expect(mcVerificationLabel('it_process')).toBe('IT-Prozess')
expect(mcVerificationLabel('network')).toBe('Netzwerk/Infra')
expect(mcVerificationLabel('document')).toBe('Dokument')
})
it('humanizes an unknown method', () => {
expect(mcVerificationLabel('telepathy')).toBe('Telepathy')
})
})
describe('label coverage', () => {
it('labels the security/code use cases (>=50% code+process focus)', () => {
for (const k of ['code_security', 'network_security', 'cra', 'isms', 'tisax']) {
expect(USE_CASE_LABELS[k]).toBeTruthy()
}
})
it('covers every master-control verification method', () => {
for (const m of ['document', 'source_code', 'network', 'it_process', 'hybrid', 'manual']) {
expect(MC_VERIFICATION_LABELS[m]).toBeTruthy()
}
})
})