This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
breakpilot-pwa/backend/scripts/verify_sprint4.sh
Benjamin Admin 21a844cb8a fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.

This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).

Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:51:32 +01:00

142 lines
5.7 KiB
Bash
Executable File

#!/bin/bash
# Verification script for Sprint 4 implementation
# Checks that all required components are present
echo "========================================"
echo "Sprint 4 - KI-Integration Verifikation"
echo "========================================"
echo ""
# Color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
FAILED=0
PASSED=0
check_file() {
local file="$1"
local description="$2"
if [ -f "$file" ]; then
echo -e "${GREEN}${NC} $description"
echo "$file"
((PASSED++))
else
echo -e "${RED}${NC} $description"
echo "$file (NOT FOUND)"
((FAILED++))
fi
}
check_content() {
local file="$1"
local pattern="$2"
local description="$3"
if [ -f "$file" ] && grep -q "$pattern" "$file"; then
echo -e "${GREEN}${NC} $description"
((PASSED++))
else
echo -e "${RED}${NC} $description"
echo " → Pattern '$pattern' not found in $file"
((FAILED++))
fi
}
echo "1. Core Components"
echo "-------------------"
check_file "compliance/services/llm_provider.py" "LLM Provider Abstraction"
check_file "compliance/services/ai_compliance_assistant.py" "AI Compliance Assistant"
check_file "compliance/api/routes.py" "API Routes"
check_file "compliance/api/schemas.py" "API Schemas"
echo ""
echo "2. LLM Provider Classes"
echo "------------------------"
check_content "compliance/services/llm_provider.py" "class LLMProvider" "Abstrakte LLMProvider Klasse"
check_content "compliance/services/llm_provider.py" "class AnthropicProvider" "AnthropicProvider"
check_content "compliance/services/llm_provider.py" "class SelfHostedProvider" "SelfHostedProvider"
check_content "compliance/services/llm_provider.py" "class MockProvider" "MockProvider"
check_content "compliance/services/llm_provider.py" "def get_llm_provider" "get_llm_provider() Factory"
echo ""
echo "3. AI Assistant Methods"
echo "------------------------"
check_content "compliance/services/ai_compliance_assistant.py" "async def interpret_requirement" "interpret_requirement()"
check_content "compliance/services/ai_compliance_assistant.py" "async def suggest_controls" "suggest_controls()"
check_content "compliance/services/ai_compliance_assistant.py" "async def assess_module_risk" "assess_module_risk()"
check_content "compliance/services/ai_compliance_assistant.py" "async def analyze_gap" "analyze_gap()"
check_content "compliance/services/ai_compliance_assistant.py" "async def batch_interpret_requirements" "batch_interpret_requirements()"
echo ""
echo "4. API Endpoints"
echo "-----------------"
check_content "compliance/api/routes.py" "async def get_ai_status" "GET /ai/status"
check_content "compliance/api/routes.py" "async def interpret_requirement" "POST /ai/interpret"
check_content "compliance/api/routes.py" "async def suggest_controls" "POST /ai/suggest-controls"
check_content "compliance/api/routes.py" "async def assess_module_risk" "POST /ai/assess-risk"
check_content "compliance/api/routes.py" "async def analyze_gap" "POST /ai/gap-analysis"
check_content "compliance/api/routes.py" "async def batch_interpret_requirements" "POST /ai/batch-interpret"
echo ""
echo "5. Pydantic Schemas"
echo "--------------------"
check_content "compliance/api/schemas.py" "class AIStatusResponse" "AIStatusResponse"
check_content "compliance/api/schemas.py" "class AIInterpretationRequest" "AIInterpretationRequest"
check_content "compliance/api/schemas.py" "class AIInterpretationResponse" "AIInterpretationResponse"
check_content "compliance/api/schemas.py" "class AIControlSuggestionRequest" "AIControlSuggestionRequest"
check_content "compliance/api/schemas.py" "class AIControlSuggestionResponse" "AIControlSuggestionResponse"
check_content "compliance/api/schemas.py" "class AIRiskAssessmentRequest" "AIRiskAssessmentRequest"
check_content "compliance/api/schemas.py" "class AIRiskAssessmentResponse" "AIRiskAssessmentResponse"
check_content "compliance/api/schemas.py" "class AIGapAnalysisRequest" "AIGapAnalysisRequest"
check_content "compliance/api/schemas.py" "class AIGapAnalysisResponse" "AIGapAnalysisResponse"
echo ""
echo "6. Environment Variables"
echo "-------------------------"
check_content ".env.example" "COMPLIANCE_LLM_PROVIDER" "COMPLIANCE_LLM_PROVIDER"
check_content ".env.example" "ANTHROPIC_MODEL" "ANTHROPIC_MODEL"
check_content ".env.example" "SELF_HOSTED_LLM_URL" "SELF_HOSTED_LLM_URL"
check_content ".env.example" "COMPLIANCE_LLM_MAX_TOKENS" "COMPLIANCE_LLM_MAX_TOKENS"
echo ""
echo "7. Documentation"
echo "-----------------"
check_file "docs/compliance_ai_integration.md" "Vollständige Dokumentation"
check_file "compliance/README_AI.md" "Quick-Start Guide"
check_file "compliance/SPRINT_4_SUMMARY.md" "Sprint 4 Zusammenfassung"
echo ""
echo "8. Tests"
echo "---------"
check_file "tests/test_compliance_ai.py" "Unit Tests"
check_file "scripts/test_compliance_ai_endpoints.py" "Integration Test Script"
echo ""
echo "9. German Prompts"
echo "------------------"
check_content "compliance/services/ai_compliance_assistant.py" "Du bist ein Compliance-Experte" "Deutscher System Prompt"
check_content "compliance/services/ai_compliance_assistant.py" "Breakpilot" "Breakpilot-spezifisch"
check_content "compliance/services/ai_compliance_assistant.py" "EdTech" "EdTech Kontext"
echo ""
# Summary
echo "========================================"
echo "Zusammenfassung"
echo "========================================"
echo -e "${GREEN}Bestanden: $PASSED${NC}"
echo -e "${RED}Fehlgeschlagen: $FAILED${NC}"
echo ""
if [ $FAILED -eq 0 ]; then
echo -e "${GREEN}✓ Sprint 4 ist vollständig implementiert!${NC}"
exit 0
else
echo -e "${RED}✗ Es fehlen noch $FAILED Komponenten${NC}"
exit 1
fi