models.py and repository.py are backwards-compat re-export shims from
Phase 1. Both files still contained the original 1466/1547 line class
definitions below the re-export block. These inline definitions shadowed
the correctly-imported sub-module versions and failed at import time
because Column, AuditResultEnum, etc. were no longer in scope.
Fix:
- models.py: remove all duplicate Base-subclass definitions (lines 209-
1581). Retain EvidenceConfidenceEnum and EvidenceTruthStatusEnum (unique
to this shim, not yet extracted to a sub-module) and the two models that
have no sub-module yet: LLMGenerationAuditDB and AssertionDB. Add back
the SQLAlchemy column-type imports those two models need.
- repository.py: remove all duplicate Repository class definitions (lines
40-1692). All classes are now fully provided by the sub-repositories.
Result: 172 pytest tests pass, import OK.
Backend — delete 6 orphaned schema sub-modules never imported by any route:
compliance/schemas/{ai_system,bsi,dashboard,isms_governance,report,service_module}.py
All symbols were only accessible through the monolithic schemas.py barrel;
the split files were never wired up and created misleading import paths.
Frontend — delete 2 hollow "future implementation" stub pages:
app/sdk/agents/sessions/page.tsx
app/sdk/agents/statistics/page.tsx
Both showed a static placeholder with no API calls or real functionality.
Frontend — delete dead demo seed/clear API routes:
app/api/sdk/v1/demo/{seed,clear}/route.ts
Used a global in-memory store never connected to PostgreSQL.
The actual demo seeding (lib/sdk/demo-data/) goes through the real
state API (apiClient.saveState/deleteState), not these routes.
Frontend — remove unimplemented PDF export alert from retention page:
app/sdk/einwilligungen/retention/page.tsx
Removed the PDF button and alert('PDF-Export wird noch implementiert.')
stub. CSV and JSON export remain fully functional.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>