Conversation
- Add UserEntity with Clerk ID, rate limiting, and role management - Add CodeReviewEntity with encrypted code storage support - Add AgentFindingEntity with severity and quality metrics - Create enums: SeverityEnum, UserRole aligned with PostgreSQL ENUMs - Configure Alembic env.py for model discovery and autogenerate - Implement relationships with cascade delete for data integrity Related CGAI-15
- Create users table with Clerk ID, role, rate limiting fields - Create code_reviews table with encrypted code storage - Create agent_findings table with severity and metrics - Add PostgreSQL ENUMs: userrole, reviewstatus, severityenum - Add indexes for performance optimization - Configure cascade delete for data integrity Migration ID: ba48c1bb8e18 Related CGAI-15
feat(database): integrate Supabase PostgreSQL with SQLAlchemy models and Alembic migrations
… de ajustar a flake8
- Add ClerkClient for JWT validation with HS256 algorithm - Add UserRepository for CRUD operations on users table - Add AuthService to orchestrate login and token validation - Add auth dependency (get_current_user, get_optional_user) - Add /api/v1/auth/login and /api/v1/auth/me endpoints - Sync users from Clerk to Supabase on login - Add email-validator dependency for pydantic EmailStr Closes CGAI-28
feat(auth): Clerk JWT authentication with Supabase user sync - Add ClerkClient for JWT validation with HS256 algorithm - Add UserRepository for CRUD operations on users table - Add AuthService to orchestrate login and token validation - Add auth dependency (get_current_user, get_optional_user) - Add /api/v1/auth/login and /api/v1/auth/me endpoints - Sync users from Clerk to Supabase on login - Add email-validator dependency for pydantic EmailStr Closes CGAI-28
- Add 12 tests for UserRepository (get_by_id, create, update, delete) - Add 10 tests for UserEntity (can_analyze, increment_analysis_count) - Add 9 integration tests for auth endpoints (/login, /me) - Coverage increased from 92% to 96%
- Add tests for CodeReviewEntity (__repr__, calculate_quality_score) - Add tests for AgentFindingEntity (penalty, to_dict, __repr__) - Add tests for get_db dependency (session lifecycle) - Fix auth router tests to accept 401/403 for missing token - Fix severity assertion to expect uppercase enum values Coverage improvements: - code_review.py: 89% -> 100% - finding.py: 88% -> 100% - get_db.py: 50% -> 100% Total: 175 tests, 97.46% coverage
- Add tests for CodeReviewEntity (__repr__, calculate_quality_score) - Add tests for AgentFindingEntity (penalty, to_dict, __repr__) - Add tests for get_db dependency (session lifecycle) - Fix auth router tests to accept 401/403 for missing token - Fix severity assertion to expect uppercase enum values Coverage improvements: - code_review.py: 89% -> 100% - finding.py: 88% -> 100% - get_db.py: 50% -> 100% Total: 175 tests, 97.46% coverage
…yleAgent-analisis-integral-de-estilo-PEP-8
- Implementar PylintAnalyzer y Flake8Analyzer para análisis externo - Agregar detección de convenciones de nombres (snake_case, PascalCase) - Agregar detección de imports duplicados y no usados - Agregar detección de docstrings faltantes - Agregar detección de líneas largas y trailing whitespace - Emitir eventos AGENT_STARTED/COMPLETED/FAILED - Ordenar findings por line_number (ascendente) - Usar categorías de issue_type: style/pep8, style/documentation, style/imports, style/naming - Agregar tests unitarios para StyleAgent (23 tests) - Agregar tests de integración para StyleAgent (15 tests) - Agregar tests para PylintAnalyzer y Flake8Analyzer - Cobertura total: 94.66% (279 tests passing) BREAKING CHANGE: ninguno Closes CGAI-29
- Eliminar métodos de cobertura de código no utilizados - Añadir pruebas de integración completas (5 tests pasados) - Cobertura de pruebas unitarias alcanzada: 96% - Eliminar credenciales hardcodeadas en scripts de prueba - Verificar integración exitosa con el servicio de análisis Related: CGAI-30-QualityAgent-code-quality-analysis
…ttps://github.com/Yosoyepa/CodeGuardAI into feature/CGAI-30-QualityAgent-code-quality-analysis
…d in analysis process Refactor(test_analysis_service): mock StyleAgent in tests for comprehensive agent coverage
…): clean up imports and improve logging format
…e-quality-analysis Feature/cgai 30 quality agent code quality analysis
- Agregar OrchestratorAgent para coordinar ejecución de agentes Related CGAI-13
… eficiencia - Añadir PerformanceAgent para detectar complejidad algorítmica (bucles anidados O(n^2), O(n^3)) - Implementar detección de fugas de recursos (uso de open/socket sin context managers) - Agregar validaciones para patrones N+1 queries y operaciones ineficientes en colecciones - Integrar el agente en el flujo principal de AnalysisService para ejecución paralela - Incluir pruebas unitarias Relacionado con CGAI-31
…-code-performance-analysis Feature/cgai 31 performance agent code performance analysis
…ltiples agentes y agregar sus hallazgos. Implementación de la lógica en AnalysisService para utilizar OrchestratorAgent en lugar de agentes individuales.
…OrchestratorAgent(paralelo)
… orquestación de agentes.
Removed the Performance Agent analysis from the orchestrator process.
Feature/cgai 13 orchestator
- Add GeminiClient for Vertex AI integration with gemini-1.5-flash/pro models - Implement Model Context Protocol (MCP) with OWASP Top 10 security contexts - Create AIService as orchestrator for AI-powered code analysis - Add SecurityContext dataclass for structured prompt engineering - Fix Clerk JWT authentication to support HS256 with Custom JWT Templates - Update auth_service to use standard 'sub' claim from JWT payload - Fix Severity enum to use uppercase values matching database schema - Add comprehensive unit tests for AI components (88%+ coverage) - Configure GCP credentials for Vertex AI authentication BREAKING CHANGE: Severity enum values changed from lowercase to UPPERCASE Closes CGAI-32
…tegration-GenerativeAI
- Change severity ordering list from lowercase to UPPERCASE in performance_agent.py
- Update expected_order in integration test to match Severity enum values
- Fixes ValueError: 'HIGH' is not in list during findings sorting
The Severity enum uses UPPERCASE values ('CRITICAL', 'HIGH', etc.) but the
sorting list used lowercase, causing index lookup failures.
Fixes 2 failing tests:
- test_comprehensive_performance_detection
- test_detect_triple_nested_loops_critical
…mprove formatting
…rativeAI feat(ai): integrate Vertex AI Gemini with MCP for code analysis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.