Merge develop → main: 阶段0-3 全量上线(V21 UI + Phase 8 + CosyVoice) #176
Reference in New Issue
Block a user
Delete Branch "develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
上线内容
阶段 0: V21 UI 前端升级
阶段 1: Phase 8 模板编排引擎
阶段 2: Phase 8 前端 P1 修复
阶段 3: CosyVoice 集成
测试修复
自动化测试: 926 passed, 0 新增回归
- 新增 api/accounts.ts mock API(平台配置 + 绑定/解绑/查询) - 新增 pages/accounts/Accounts.tsx 账号管理页面 - 4 平台卡片(抖音/快手/小红书/微信视频号) - 2 列网格布局,响应式 768px 单列 - 账号列表含头像/状态标签/解绑按钮 - 空状态 🔓 提示 - 底部统计栏:已绑定数/平台总数 - 绑定/解绑操作(mock + window.prompt/confirm) - 自定义 toast 提示 - 新增 accounts.css V21 样式(CSS 变量,零 antd) - 更新路由 /accounts - 更新 Sidebar/Header 导航 + PageHead 标题映射- hamming_distance: 替换 zfill+字符比较为 XOR bit 计数 (bin(h1^h2).count('1')) - check_duplicate: 移除直方图融合和 best_match,返回第一个匹配 - compute_phash: 补充详细中文算法注释(DCT 步骤说明) - 修复 similarity 精度:移除 round(x, 4) 保留完整浮点精度 所有 74 个测试通过(8 个 cv2 依赖跳过)。- POST /edit-plans/{id}/generate: 触发剪辑渲染生成 - 验证 editing 状态 + 片段存在 - pending 片段标记为 ready - 创建 GenerationTask 并调度 Celery 任务 - 计划状态流转为 rendering - GET /edit-plans/{id}/generation-status: 查询生成进度 - 返回计划状态、GenerationTask ID、各片段状态 - Celery 任务 worker.render_edit_plan: - 下载素材 → FFmpeg concat 拼接 → 上传 OSS - 更新 EditPlan/EditPlanClip/GenerationTask 状态 - 失败重试(max_retries=2, countdown=60s) - 16 个单元测试全部通过- Add VoiceCloneProfile CRUD endpoints: POST /api/v1/voice-clones (create clone task, status=pending) GET /api/v1/voice-clones (list with pagination + status filter) GET /api/v1/voice-clones/{id} (get details) GET /api/v1/voice-clones/{id}/status (polling endpoint) DELETE /api/v1/voice-clones/{id} (soft delete) POST /api/v1/voice-clones/{id}/retry (retry failed clone) - Add VoiceCloneProfile SQLAlchemy model and repository adapter - Add Alembic migration 019 for voice_clone_profiles table - Add use cases: Create, List, Get, GetStatus, Delete, Retry - Add Pydantic schemas for request/response validation - Add 19 unit tests (all passing) - CosyVoice API integration deferred to Task 3.07 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>- POST /api/v1/tts/synthesize: create TTS job (status=pending) - GET /api/v1/tts/jobs: list user's jobs (page/page_size pagination) - GET /api/v1/tts/jobs/{job_id}: get job details - GET /api/v1/tts/jobs/{job_id}/status: query status for polling - DELETE /api/v1/tts/jobs/{job_id}: delete job (soft delete) Includes: - Schema: TTSSynthesizeRequest, TTSJobResponse, ListTTSJobResponse, TTSStatusResponse - Use Cases: CreateTTSJob, ListTTSJobs, GetTTSJob, GetTTSJobStatus, DeleteTTSJob - SQLAlchemy adapter: SQLAlchemyTTSJobRepository - ORM model: TTSJobModel - Alembic migration: 020_add_tts_jobs_table - Unit tests: 14 tests covering all use cases CosyVoice API calls deferred to task 3.07. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>P2-1: workflow.py start_clone() 将 mark_processing() 移到音频 URL 检查之后, 无 URL 时保持 pending 状态,避免永久卡在 processing P2-2: voice_clone.py Celery 任务改用 VoiceCloneWorkflowService 公开方法 (process_clone_result/process_clone_failure),不再直接操作 profile P2-3: voice_clones.py 路由中 Celery .delay() 失败时调用 process_clone_failure() 标记 profile 为 failed(create + retry 两个路由) P2-4: 由 P2-2 修复自动解决 同步更新 test_voice_clone_workflow.py 测试用例适配 P2-1 行为变更 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>