fix: Comprehensive validation and bug fixes

Infrastructure:
- Add Redis and Celery workers to all docker-compose files
- Fix celery migration race condition in entrypoint.sh
- Add healthchecks and resource limits to dev compose
- Update .env.template with Redis/Celery variables

Backend Models & Schemas:
- Rename Sprint.completed_points to velocity (per requirements)
- Add AgentInstance.name as required field
- Rename Issue external tracker fields for consistency
- Add IssueSource and TrackerType enums
- Add Project.default_tracker_type field

Backend Fixes:
- Add Celery retry configuration with exponential backoff
- Remove unused sequence counter from EventBus
- Add mypy overrides for test dependencies
- Fix test file using wrong schema (UserUpdate -> dict)

Frontend Fixes:
- Fix memory leak in useProjectEvents (proper cleanup)
- Fix race condition with stale closure in reconnection
- Sync TokenWithUser type with regenerated API client
- Fix expires_in null handling in useAuth
- Clean up unused imports in prototype pages
- Add ESLint relaxed rules for prototype files

CI/CD:
- Add E2E testing stage with Testcontainers
- Add security scanning with Trivy and pip-audit
- Add dependency caching for faster builds

Tests:
- Update all tests to use renamed fields (velocity, name, etc.)
- Fix 14 schema test failures
- All 1500 tests pass with 91% coverage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-30 10:35:30 +01:00
parent 6ea9edf3d1
commit 742ce4c9c8
57 changed files with 1062 additions and 332 deletions

View File

@@ -12,9 +12,8 @@ Note: These tests mock actual execution since they would require
Git operations and external APIs in production.
"""
import pytest
from unittest.mock import patch
import uuid
from unittest.mock import patch
class TestCloneRepositoryTask:
@@ -22,8 +21,8 @@ class TestCloneRepositoryTask:
def test_clone_repository_task_exists(self):
"""Test that clone_repository task is registered."""
from app.celery_app import celery_app
import app.tasks.git # noqa: F401
from app.celery_app import celery_app
assert "app.tasks.git.clone_repository" in celery_app.tasks
@@ -72,8 +71,8 @@ class TestCommitChangesTask:
def test_commit_changes_task_exists(self):
"""Test that commit_changes task is registered."""
from app.celery_app import celery_app
import app.tasks.git # noqa: F401
from app.celery_app import celery_app
assert "app.tasks.git.commit_changes" in celery_app.tasks
@@ -114,8 +113,8 @@ class TestCreateBranchTask:
def test_create_branch_task_exists(self):
"""Test that create_branch task is registered."""
from app.celery_app import celery_app
import app.tasks.git # noqa: F401
from app.celery_app import celery_app
assert "app.tasks.git.create_branch" in celery_app.tasks
@@ -156,8 +155,8 @@ class TestCreatePullRequestTask:
def test_create_pull_request_task_exists(self):
"""Test that create_pull_request task is registered."""
from app.celery_app import celery_app
import app.tasks.git # noqa: F401
from app.celery_app import celery_app
assert "app.tasks.git.create_pull_request" in celery_app.tasks
@@ -201,8 +200,8 @@ class TestPushChangesTask:
def test_push_changes_task_exists(self):
"""Test that push_changes task is registered."""
from app.celery_app import celery_app
import app.tasks.git # noqa: F401
from app.celery_app import celery_app
assert "app.tasks.git.push_changes" in celery_app.tasks
@@ -254,7 +253,6 @@ class TestGitTaskRouting:
def test_all_git_tasks_match_routing_pattern(self):
"""Test that all git task names match the routing pattern."""
from app.tasks import git
task_names = [
"app.tasks.git.clone_repository",