fix(quality): Ruff/CVE/TS-Fixes, 104 neue Tests, Complexity-Refactoring
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 30s
CI / test-python-backend-compliance (push) Successful in 30s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 17s

- Ruff: 144 auto-fixes (unused imports, == None → is None), F821/F811/F841 manuell
- CVEs: python-multipart>=0.0.22, weasyprint>=68.0, pillow>=12.1.1, npm audit fix (0 vulns)
- TS: 5 tote Drafting-Engine-Dateien entfernt, allowed-facts/sanitizer/StepHeader/context fixes
- Tests: +104 (ISMS 58, Evidence 18, VVT 14, Generation 14) → 1449 passed
- Refactoring: collect_ci_evidence (F→A), row_to_response (E→A), extract_requirements (E→A)
- Dead Code: pca-platform, 7 Go-Handler, dsr_api.py, duplicate Schemas entfernt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-07 19:00:33 +01:00
parent 6509e64dd9
commit 95fcba34cd
124 changed files with 2533 additions and 15709 deletions

View File

@@ -515,7 +515,7 @@ export function setContextPath(ctx: TemplateContext, dotPath: string, value: unk
return {
...ctx,
[section]: {
...(ctx[section] as Record<string, unknown>),
...(ctx[section] as unknown as Record<string, unknown>),
[key]: value,
},
}
@@ -526,6 +526,6 @@ export function setContextPath(ctx: TemplateContext, dotPath: string, value: unk
*/
export function getContextPath(ctx: TemplateContext, dotPath: string): unknown {
const [section, ...rest] = dotPath.split('.') as [keyof TemplateContext, ...string[]]
const sectionObj = ctx[section] as Record<string, unknown>
const sectionObj = ctx[section] as unknown as Record<string, unknown>
return sectionObj?.[rest.join('.')]
}

View File

@@ -313,7 +313,7 @@ function ContextSectionForm({
onChange: (section: keyof TemplateContext, key: string, value: unknown) => void
}) {
const fields = SECTION_FIELDS[section]
const sectionData = context[section] as Record<string, unknown>
const sectionData = context[section] as unknown as Record<string, unknown>
return (
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
@@ -523,7 +523,7 @@ function GeneratorSection({
}, [template.id]) // eslint-disable-line react-hooks/exhaustive-deps
// Computed flags pills config
const flagPills: { key: keyof typeof ruleResult.computedFlags; label: string; color: string }[] = ruleResult ? [
const flagPills: { key: string; label: string; color: string }[] = ruleResult ? [
{ key: 'IS_B2C', label: 'B2C', color: 'bg-blue-100 text-blue-700' },
{ key: 'SERVICE_IS_SAAS', label: 'SaaS', color: 'bg-green-100 text-green-700' },
{ key: 'HAS_PENALTY', label: 'Vertragsstrafe', color: 'bg-orange-100 text-orange-700' },
@@ -842,7 +842,7 @@ function DocumentGeneratorPageInner() {
useEffect(() => {
if (state?.companyProfile) {
const profile = state.companyProfile
const p = profile as Record<string, string>
const p = profile as unknown as Record<string, string>
setContext((prev) => ({
...prev,
PROVIDER: {
@@ -919,7 +919,7 @@ function DocumentGeneratorPageInner() {
(section: keyof TemplateContext, key: string, value: unknown) => {
setContext((prev) => ({
...prev,
[section]: { ...(prev[section] as Record<string, unknown>), [key]: value },
[section]: { ...(prev[section] as unknown as Record<string, unknown>), [key]: value },
}))
},
[]

View File

@@ -2,7 +2,7 @@
import React, { useState, useEffect, useCallback } from 'react'
import { useSDK } from '@/lib/sdk'
import { StepHeader, STEP_EXPLANATIONS } from '@/components/sdk/StepHeader'
import { StepHeader } from '@/components/sdk/StepHeader'
// =============================================================================
// TYPES
@@ -321,16 +321,7 @@ export default function EmailTemplatesPage() {
return (
<div className="space-y-6">
<StepHeader stepId="email-templates" explanation={STEP_EXPLANATIONS['email-templates'] || {
title: 'E-Mail-Templates',
description: 'Verwalten Sie Vorlagen fuer alle DSGVO-relevanten Benachrichtigungen.',
steps: [
'Template-Typen und Variablen pruefen',
'Inhalte im Editor anpassen',
'Vorschau pruefen und publizieren',
'Branding-Einstellungen konfigurieren',
],
}} />
<StepHeader stepId="email-templates" />
{error && (
<div className="bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700">