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:
@@ -12,9 +12,8 @@ Note: These tests mock actual execution since they would require
|
||||
database access and state machine operations in production.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
import uuid
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
class TestRecoverStaleWorkflowsTask:
|
||||
@@ -22,8 +21,8 @@ class TestRecoverStaleWorkflowsTask:
|
||||
|
||||
def test_recover_stale_workflows_task_exists(self):
|
||||
"""Test that recover_stale_workflows task is registered."""
|
||||
from app.celery_app import celery_app
|
||||
import app.tasks.workflow # noqa: F401
|
||||
from app.celery_app import celery_app
|
||||
|
||||
assert "app.tasks.workflow.recover_stale_workflows" in celery_app.tasks
|
||||
|
||||
@@ -59,8 +58,8 @@ class TestExecuteWorkflowStepTask:
|
||||
|
||||
def test_execute_workflow_step_task_exists(self):
|
||||
"""Test that execute_workflow_step task is registered."""
|
||||
from app.celery_app import celery_app
|
||||
import app.tasks.workflow # noqa: F401
|
||||
from app.celery_app import celery_app
|
||||
|
||||
assert "app.tasks.workflow.execute_workflow_step" in celery_app.tasks
|
||||
|
||||
@@ -111,8 +110,8 @@ class TestHandleApprovalResponseTask:
|
||||
|
||||
def test_handle_approval_response_task_exists(self):
|
||||
"""Test that handle_approval_response task is registered."""
|
||||
from app.celery_app import celery_app
|
||||
import app.tasks.workflow # noqa: F401
|
||||
from app.celery_app import celery_app
|
||||
|
||||
assert "app.tasks.workflow.handle_approval_response" in celery_app.tasks
|
||||
|
||||
@@ -167,8 +166,8 @@ class TestStartSprintWorkflowTask:
|
||||
|
||||
def test_start_sprint_workflow_task_exists(self):
|
||||
"""Test that start_sprint_workflow task is registered."""
|
||||
from app.celery_app import celery_app
|
||||
import app.tasks.workflow # noqa: F401
|
||||
from app.celery_app import celery_app
|
||||
|
||||
assert "app.tasks.workflow.start_sprint_workflow" in celery_app.tasks
|
||||
|
||||
@@ -198,8 +197,8 @@ class TestStartStoryWorkflowTask:
|
||||
|
||||
def test_start_story_workflow_task_exists(self):
|
||||
"""Test that start_story_workflow task is registered."""
|
||||
from app.celery_app import celery_app
|
||||
import app.tasks.workflow # noqa: F401
|
||||
from app.celery_app import celery_app
|
||||
|
||||
assert "app.tasks.workflow.start_story_workflow" in celery_app.tasks
|
||||
|
||||
@@ -331,15 +330,14 @@ class TestWorkflowTaskSignatures:
|
||||
def test_workflow_chain_creation(self):
|
||||
"""Test that workflow tasks can be chained together."""
|
||||
from celery import chain
|
||||
|
||||
from app.tasks.workflow import (
|
||||
start_sprint_workflow,
|
||||
execute_workflow_step,
|
||||
handle_approval_response,
|
||||
)
|
||||
|
||||
project_id = str(uuid.uuid4())
|
||||
sprint_id = str(uuid.uuid4())
|
||||
workflow_id = str(uuid.uuid4())
|
||||
str(uuid.uuid4())
|
||||
|
||||
# Build a chain (doesn't execute, just creates the workflow)
|
||||
workflow = chain(
|
||||
|
||||
Reference in New Issue
Block a user