CI Test
a4991628be
fix(security): /metrics 端点添加 Bearer Token 认证
...
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 148h21m16s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 148h21m22s
- 通过 METRICS_AUTH_TOKEN 环境变量配置认证 Token
- 未配置 Token 时不启用认证(向后兼容)
- 认证失败返回 401 Unauthorized
2026-07-03 08:32:49 +08:00
CI Test
c1a89ae221
fix(security): 注册登录接口 RateLimitMiddleware 防止暴力破解
...
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 148h23m2s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 148h23m8s
- RateLimitMiddleware 增加 paths 参数支持路径过滤
- 在 main.py 注册登录限流:每 IP 每分钟最多 10 次
- 仅针对 /api/v1/auth/login 路径
2026-07-03 08:29:52 +08:00
CI Test
abfc598d3f
refactor: 代码精简优化 - 移除无用代码和重复定义
...
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 156h9m36s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 156h9m43s
1. 删除无用文件:
- apps/api/app/core/database.py (未被引用的死代码)
- requirements-quality.txt (与 requirements-dev.txt 完全重复)
- fix_script.py, fix_tracker_encoding.py (一次性修复脚本)
- init_tracker_phase4.py, init_tracker_simple.py, update_tracker.py (SQLite迁移脚本)
2. 清理死代码:
- apps/api/app/db.py: 移除未使用的 get_db() 函数和 sqlalchemy.orm 导入
- 11个路由/中间件文件: 移除未使用的 import (os, datetime, BaseModel, Session, List 等)
3. 消除重复定义:
- apps/worker/video_processing/video_compose_service.py: 移除重复的 EditingMode 枚举
- 改为从 packages.domain.editing_mode 导入统一的 EditingMode
影响: 无功能变更,仅移除未使用的代码
2026-07-03 00:44:29 +08:00
xiaoxia
4d1a0925d3
fix: correct 204 response in edit_templates delete endpoint
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 159h30m34s
CI/CD Pipeline / Frontend Lint (push) Failing after 159h31m5s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 159h31m10s
Change return type to Response, add explicit return Response(status_code=204)
2026-07-02 21:15:20 +08:00
xiaoxia
167ee9a9d7
fix: correct 204 response in edit_plans delete endpoint
...
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Remove response_class=Response, change return type to Response, add explicit return Response(status_code=204)
2026-07-02 21:15:13 +08:00
xiaoxia
d0e4235828
Merge pull request 'hotfix: 修复 204 状态码 response_class=Response 导致 API 容器崩溃' ( #177 ) from hotfix/fix-204-response-class into main
CI/CD Pipeline / Frontend Lint (push) Failing after 159h51m4s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 159h51m11s
Deploy / Deploy Staging (push) Failing after 159h50m29s
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
2026-07-02 21:03:18 +08:00
灵应
09dd1546b7
hotfix: 移除 delete 路由的 response_class=Response 修复 204 断言崩溃
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 159h55m46s
CI/CD Pipeline / Frontend Lint (push) Failing after 159h56m19s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 159h56m26s
FastAPI 不允许 status_code=204 同时指定 response_class=Response,
导致 API 容器启动时 AssertionError 不断重启。
修复 8 处 @router.delete 装饰器:
- duplication.py:242
- recipes.py:177
- templates.py:198, 276
- titles.py:146
- tts.py:179
- voice_clones.py:194
- voices.py:319
2026-07-02 20:57:58 +08:00
灵应
dd2808d17a
hotfix: 移除 delete 路由的 response_class=Response 修复 204 断言崩溃
...
Tests / lint (pull_request) Failing after 159h56m48s
Tests / test (pull_request) Failing after 159h56m48s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 159h57m21s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 159h57m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 159h58m2s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 159h58m8s
FastAPI 不允许 status_code=204 同时指定 response_class=Response,
导致 API 容器启动时 AssertionError 不断重启。
修复 8 处 @router.delete 装饰器:
- duplication.py:242
- recipes.py:177
- templates.py:198, 276
- titles.py:146
- tts.py:179
- voice_clones.py:194
- voices.py:319
2026-07-02 20:56:02 +08:00
xiaoxia
87a5ce84d3
fix(api): move Response import to correct position after other imports
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 160h15m5s
CI/CD Pipeline / Frontend Lint (push) Failing after 160h15m38s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 160h15m45s
2026-07-02 20:33:46 +08:00
xiaoxia
bb21990173
fix(api): add response_class=Response to DELETE endpoint for 204 status
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 160h22m25s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 160h22m27s
2026-07-02 20:32:05 +08:00
xiaoxia
127dc4a769
fix: IngestJobResponse.result_asset_id 改为可选字段
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 163h34m12s
CI/CD Pipeline / Frontend Lint (push) Failing after 163h34m13s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 163h34m19s
2026-07-02 17:20:14 +08:00
灵应
e539105256
fix: 3.09 审计问题修复 — P1-1 TTS Celery 执行器 + P2-1~P2-4
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 163h53m1s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 163h53m6s
Deploy / Deploy Staging (push) Failing after 164h23m43s
CI/CD Pipeline / Frontend Lint (push) Failing after 164h23m43s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 164h23m50s
P1-1 (阻塞性): TTS 合成完整异步链路
- CosyVoiceService 新增 submit_synthesize_task() + poll_synthesize_task()
- 新建 TTSWorkflowService 编排层 (packages/application/tts_job/workflow.py)
- 新建 Celery 任务 process_tts_synthesis (apps/worker/worker_app/tasks/tts_synthesis.py)
- 注册到 celery_app.conf.imports + tasks/__init__.py 懒加载
- TTS 路由 synthesize() 增加 CosyVoice 提交 + Celery 调度
P2-1: voice_clone.py 添加详细 Celery 重试策略注释
P2-2: 修复 voice_clone.py Session 泄漏 (session=None 安全模式)
P2-3: ListVoiceLibraryUseCase 返回 (items, count) 元组,消除重复 count_by_user()
P2-4: 新增 find_profile_ids_by_voice_ids() 批量方法,填充 voice_clone_profile_id
测试: 749 passed, 0 failed
2026-07-02 16:30:37 +08:00
灵应
796aeff499
fix: 修复 PR #169 代码审查发现的 4 个 P2 问题
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 166h12m36s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 166h12m41s
Deploy / Deploy Staging (push) Failing after 166h15m4s
CI/CD Pipeline / Frontend Lint (push) Failing after 166h15m32s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 166h15m39s
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 >
2026-07-02 14:37:37 +08:00
灵应
24ac12167c
feat(task-308): 音色克隆完整流程实现
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 168h3m41s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 168h3m46s
Deploy / Deploy Staging (push) Failing after 168h7m8s
CI/CD Pipeline / Frontend Lint (push) Failing after 168h7m37s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 168h7m45s
- CosyVoiceService: 新增 submit_clone_task() 和 check_task_status() 非阻塞方法
- VoiceCloneWorkflowService: 编排层,处理 start_clone/process_result/process_failure/retry
- Celery 任务 process_voice_clone: 异步轮询 CosyVoice 克隆结果
- API 路由: 创建后触发 Celery 异步任务,支持重试
- 57 个单元测试全部通过(workflow 14 + task 6 + cosyvoice 37)
2026-07-02 12:46:44 +08:00
灵应
e29a698325
feat: implement TTS synthesis API (task 3.06)
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 169h43m28s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 169h43m33s
Deploy / Deploy Staging (push) Failing after 169h47m22s
CI/CD Pipeline / Frontend Lint (push) Failing after 169h47m58s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 169h48m6s
- 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 >
2026-07-02 11:06:25 +08:00
灵应
c55dafdbb1
feat: implement voice clone API (Task 3.05)
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 170h0m19s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 170h0m23s
Deploy / Deploy Staging (push) Failing after 170h2m52s
CI/CD Pipeline / Frontend Lint (push) Failing after 170h3m23s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 170h3m30s
- 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 >
2026-07-02 10:50:57 +08:00
灵应
5584df3d55
fix: PR#164审查修复 - P1 count_by_user status参数 + P2 内存分页优化
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 170h11m59s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 170h12m4s
Deploy / Deploy Staging (push) Failing after 170h14m34s
CI/CD Pipeline / Frontend Lint (push) Failing after 170h15m9s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 170h15m14s
P1修复:
- voice_library_repository.count_by_user() 增加可选 status 参数
- 修复 list_voices_unified 中 TypeError: count_by_user got unexpected keyword argument 'status'
P2修复:
- 移除 limit=1000 全量拉取,改为直接传递 skip/limit 到仓储层
- 删除冗余的 clone_repository_count() 辅助函数
- 优化统一列表分页逻辑,代码更清晰
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-02 10:39:15 +08:00
灵应
44dc89360a
feat: 配音列表 API 增强 — 预置音色 + 克隆音色统一接口
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 170h24m47s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 170h24m52s
Deploy / Deploy Staging (push) Failing after 170h27m34s
CI/CD Pipeline / Frontend Lint (push) Failing after 170h28m8s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 170h28m14s
- 新增预置音色配置(8 个 CosyVoice 真实音色)
- 增强 GET /api/v1/voices 接口,支持 type 查询参数(preset/clone/all)
- 新增 GET /api/v1/voices/presets 端点
- 统一响应格式,包含 preset_count 和 clone_count
- 保留原有 CRUD 端点向后兼容
- 添加 18 个预置音色单元测试(全部通过)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-02 10:26:14 +08:00
CI Test
89a53b5211
fix: 修复 submit/retry/cancel 路由权限检查顺序(P1)
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 181h7m52s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 181h7m56s
Deploy / Deploy Staging (push) Failing after 181h8m31s
CI/CD Pipeline / Frontend Lint (push) Failing after 181h9m16s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 181h9m22s
将权限检查从状态变更之后移到之前,防止非授权用户触发状态变更:
- submit_job: 先获取 job 并验证权限,再执行 SubmitJobUseCase
- retry_job: 同上
- cancel_job: 同上
修复审计 P1 问题。
2026-07-01 23:45:07 +08:00
CI Test
43366f290c
feat: 实现任务2.10 JobService — 异步任务管理
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 181h43m15s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 181h43m19s
Deploy / Deploy Staging (push) Failing after 181h59m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 181h59m53s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 182h0m0s
- 新增 Job 领域模型(状态机、JobType/JobStatus 枚举)
- 新增 JobRepository 端口 + SQLAlchemy 实现
- 新增 10 个 Use Cases(CreateJob/Submit/Progress/Complete/Fail/Retry/Cancel/Get/List/Statistics)
- 新增 JobService 服务层,集成 VideoComposeService
- 新增 Pydantic schemas + RESTful API 路由
- 新增 Celery compose_video 任务(含进度追踪)
- 新增数据库迁移 018(jobs 表)
- 新增 44 个单元测试,全部通过
- 修复状态转换:允许 pending→success(快速完成场景)
2026-07-01 22:54:21 +08:00
灵应
17fc46c662
fix: 修复 _has_audio() 始终返回 True 的 P0 问题
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 183h54m54s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 183h54m58s
Deploy / Deploy Staging (push) Failing after 183h55m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 183h55m54s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 183h55m58s
- 仅当 clip_type 不是 title/subtitle 时才设置 audio_label
- title/subtitle 是纯文字/图片卡片,没有音频流
- 添加 7 个单元测试验证修复逻辑
- 所有 36 个测试通过
2026-07-01 20:58:31 +08:00
xiaoxia
e3706bd652
Merge conflict resolved: combine both services imports
2026-07-01 20:58:31 +08:00
灵应
18ea6cfadb
feat(phase8): AutoClipService 智能选片服务 (任务 2.07)
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 185h13m20s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 185h13m24s
Deploy / Deploy Staging (push) Failing after 185h13m50s
CI/CD Pipeline / Frontend Lint (push) Failing after 185h14m17s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 185h14m23s
- 新增 AutoClipService:自动为剪辑计划片段分配最佳素材
- 评分算法:质量分(0.5) + 时长匹配(0.3) + 分类匹配(0.2)
- 支持按 file_type/quality_score/duration/classification/tags 筛选
- AssetRepository 新增 search_candidates() 方法(抽象+SQLAlchemy实现)
- 18 个单元测试全部通过
2026-07-01 19:40:02 +08:00
灵应
b7bb572b46
feat(phase8): 任务 2.06 — EditTemplateService + EditPlanService 服务层
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 185h28m1s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 185h28m5s
Deploy / Deploy Staging (push) Failing after 185h28m32s
CI/CD Pipeline / Frontend Lint (push) Failing after 185h28m58s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 185h29m4s
- 新增 EditTemplateService:模板 CRUD、名称去重、片段配置管理、重排序
- 新增 EditPlanService:计划 CRUD、状态机流转、片段管理、素材分配、生成流程
- 重构 edit_templates 路由:使用 EditTemplateService 封装业务逻辑
- 重构 edit_plans 路由:使用 EditPlanService 封装业务逻辑
- 新增 77 个单元测试(33 EditTemplateService + 44 EditPlanService)
- 使用 stub 仓储注入,不依赖数据库
2026-07-01 19:24:31 +08:00
灵应
b41e0255ef
feat(phase8-task205): API 剪辑生成 — 渲染触发 + 进度查询 + Celery任务 + 单元测试
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 188h23m27s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 188h23m31s
Deploy / Deploy Staging (push) Failing after 188h23m54s
CI/CD Pipeline / Frontend Lint (push) Failing after 188h24m18s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 188h24m24s
- 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 个单元测试全部通过
2026-07-01 16:28:59 +08:00
xiaoxia
385dc4a9e0
Merge pull request 'refactor(dedup): 查重模块优化 — XOR 汉明距离 + 简化判定逻辑' ( #148 ) from feature/duplication-optimization into develop
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 188h35m56s
CI/CD Pipeline / Frontend Lint (push) Failing after 188h36m23s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 188h36m27s
2026-07-01 16:18:04 +08:00
灵应
6c3ddb018f
fix: 修复 APIRouter 不支持 summary 参数的问题
2026-07-01 15:31:24 +08:00
灵应
b79c05377a
fix: 重新注册 edit_plans_router 到 API Router
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 189h50m15s
CI/CD Pipeline / Frontend Lint (push) Failing after 189h50m42s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 189h50m46s
2026-07-01 14:49:08 +08:00
灵应
ee8c60a143
perf(duplication): 查重模块代码优化 — 修复6个代码质量问题
...
1. 修复 hamming_distance 不等长哈希处理(hex() 前导零丢失)
2. 集成颜色直方图到 check_duplicate(此前计算但未使用,浪费 CPU)
3. check_duplicate 改为返回最佳匹配而非首个匹配
4. 修复仓库删除顺序(先删片段再删记录,防止孤儿数据)
5. 域模型添加 can_retry()/reset_for_retry(),仅 failed 状态允许重试
6. 列表接口暴露 offset/limit 分页参数
2026-07-01 14:48:15 +08:00
灵应
2730d2ce8d
feat(phase8): 实现剪辑计划 CRUD API (任务 2.04)
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 189h51m12s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 189h51m15s
Deploy / Deploy Staging (push) Failing after 189h51m46s
CI/CD Pipeline / Frontend Lint (push) Failing after 189h52m16s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 189h52m19s
- 新增 /api/v1/edit-plans 五个端点 (GET list/detail, POST, PUT, DELETE)
- 支持分页、按模板ID/状态筛选
- PUT 端点集成状态机流转 (draft→editing→rendering→completed/failed)
- 非法状态流转返回 400,资源不存在返回 404
- 注册 edit_plans_router 到 API Router
- 编写 28 个单元测试覆盖 CRUD + 状态机 + 异常场景
- 全部测试通过
2026-07-01 14:47:49 +08:00
CI Test
ba4dc747fb
feat(phase8-task203): API 模板管理 CRUD - RESTful接口 + Pydantic验证 + 单元测试 ( #144 )
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-07-01 14:41:30 +08:00
Deploy Bot
98b833ceb3
style: fix isort ordering in chunked_upload.py
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 209h58m45s
CI/CD Pipeline / Frontend Lint (push) Failing after 209h59m14s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 209h59m18s
2026-06-30 18:55:15 +08:00
xiaoxia
fff644deac
fix: resolve bandit security issues and fix vitest configuration ( #132 )
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h18m25s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h18m51s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h18m54s
2026-06-30 18:35:20 +08:00
xiaoxia
560856cf22
fix: resolve all flake8 errors and apply Prettier formatting ( #131 )
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h26m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h27m0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h27m7s
2026-06-30 18:26:53 +08:00
xiaoxia
1217d8cef0
style: apply isort formatting to pass CI validation ( #129 )
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 210h35m44s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h36m11s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h36m17s
2026-06-30 18:17:44 +08:00
xiaoxia
52ff2f80ad
style: apply black formatting to pass CI validation ( #126 )
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-30 17:23:08 +08:00
Audit Bot
16b18dc2fd
test: 补充表单上传端点单元测试
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增 tests/unit/test_form_upload_routes.py,覆盖10个测试场景
- 修复 upload.py 表单参数处理:从 Annotated[Model, Form()] 改为独立 Form() 参数
- 测试覆盖:正常上传成功、缺少文件字段、缺少必填参数、项目/素材库不存在、OSS未配置
- 所有测试通过,与现有 upload/chunked_upload 测试风格保持一致
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-06-30 13:12:49 +08:00
Audit Bot
37152a0729
fix: list_by_project → find_by_project (修复上传/诊断端点 500)
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根因:upload.py、chunked_upload.py、asset_diagnosis.py 调用了
asset_library_repository.list_by_project(),但 SQLAlchemy 实现
只有 find_by_project(),导致 AttributeError → 500。
同步修复 InMemory 实现的方法名以保持一致。
2026-06-30 10:14:08 +08:00
Audit Bot
05c9137ece
fix: 上传端点异常处理 + OSS 诊断能力
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
问题:PR#119 修复变量名后上传端点仍然 500,说明根因不仅是变量名错误
修复:
1. upload.py — 所有 3 个上传端点添加完整异常捕获和日志
- prepare_direct_upload: 捕获 RuntimeError→503 + 其他异常→500+日志
- complete_direct_upload: file_exists() 异常捕获→503(之前未捕获→500)
- upload_asset: upload_file() 异常捕获→503/500+日志(之前未捕获→500)
2. storage.py — OSSStorageService.__init__ 添加启动诊断日志
- 凭证缺失时记录 missing env vars
- oss2 SDK 未安装时记录错误
- bucket 初始化成功/失败时记录
3. health.py — /ready 端点增加 OSS 检查
- 检查凭证是否配置
- 检查 oss2 SDK 是否可用
- 调用 get_bucket_info() 验证连通性
部署后请调用 GET /api/v1/ready 查看 OSS 状态
2026-06-30 09:56:20 +08:00
Audit Bot
e6ecce79ee
fix: rename OSS_DIRECT_UPLOAD_EXPRESS_SECRET to OSS_DIRECT_UPLOAD_EXPIRE_SECONDS
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Root cause of upload endpoint 500 errors:
- config.py defined OSS_DIRECT_UPLOAD_EXPRESS_SECRET (wrong name)
- upload.py accessed settings.OSS_DIRECT_UPLOAD_EXPIRE_SECONDS (correct name)
- AttributeError on every call to prepare_direct_upload → 500
This fixes both /api/v1/upload/prepare-direct-upload and any other
upload endpoints that reference the expire seconds config.
2026-06-30 09:24:27 +08:00
Audit Bot
b98c83582b
fix: 上传文件大小限制从 800MB 提升至 2000MB
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0 修复:
- config.py: OSS_DIRECT_UPLOAD_MAX_MB 默认值从 800 改为 2000
- config.py: 添加 AliasChoices 支持 MAX_UPLOAD_SIZE_MB 环境变量
(.env.production 中 MAX_UPLOAD_SIZE_MB=2000 现在可被正确读取)
P1 修复:
- infra/nginx/xiaoxia-saas.conf: client_max_body_size 800m → 2g(3处)
- infra/docker/nginx-production.conf: client_max_body_size 800m → 2g
2026-06-29 22:11:22 +08:00
Audit Bot
f9e8d6efdc
fix: 修复 3 个 P0 端点 500 错误的真正根因
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Bug 1 — GET /api/v1/assets → 500:
asset_repository 所有方法为 async def,但调用方为同步上下文,
未 await 导致返回 coroutine 对象而非实际数据。
修复:全部改为 def(同步),与 SQLAlchemy 同步 Session 一致。
Bug 2 — POST /api/v1/generation/tasks → 500:
GenerationTaskModel 仍定义 edit_plan_id 列,但迁移 011 已从数据库
删除该列,INSERT 时报 column does not exist。
修复:从 model、repository、domain entity、application use case、
所有路由中彻底移除 edit_plan_id 引用。
Bug 3 — GET /api/v1/dashboard/overview → 500:
generation_task_repository._to_domain() 访问 model.edit_plan_id,
该列已被迁移 011 删除,触发 AttributeError。
修复:同上,移除 edit_plan_id 引用。
涉及文件:
- packages/adapters/sqlalchemy_impl/asset_repository.py (async→sync)
- packages/ports/asset_repository.py (async→sync 接口)
- packages/adapters/sqlalchemy_impl/models.py (移除 edit_plan_id 列)
- packages/adapters/sqlalchemy_impl/generation_task_repository.py
- packages/domain/generation_task.py
- packages/application/generation_tasks.py
- apps/api/app/api/routes/generation_tasks.py
- apps/api/app/api/routes/task_center.py
2026-06-29 20:10:51 +08:00
Audit Bot
d2578a9093
fix: PR#112 P2 建议修复
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P2-1: list_by_user[:5] → list_recent_by_user(user_id, limit=5) SQL层LIMIT
P2-2: DashboardOverviewResponse 补充 subscription 字段(plan + is_active)
- packages/ports/generation_task_repository.py: 新增 list_recent_by_user
- packages/adapters/sqlalchemy_impl/generation_task_repository.py: 实现
- apps/api/app/schemas/dashboard.py: 新增 SubscriptionInfo + subscription 字段
- apps/api/app/api/routes/dashboard.py: 使用新接口 + 填充 subscription
2026-06-29 18:23:49 +08:00
Audit Bot
e723025889
fix: 修复 projects 500 + 实现 dashboard/overview 端点
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Bug 1: GET /api/v1/projects → 500
- _to_project_response() 缺少 owner_user_id 和 shared_users 字段
- 补全 ProjectResponse schema 必填字段
Bug 2: GET /api/v1/dashboard/overview → 404
- 新建 dashboard schema + route
- 添加 count_by_user / count_by_project_ids / sum_storage_by_project_ids 仓储方法
- 注册 /api/v1/dashboard 路由
2026-06-29 18:12:39 +08:00
Audit Bot
d2097744e4
fix: retry 端点增加归属校验 (P1 安全修复)
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- generation_tasks.py: retry_generation_task 增加 created_by_user_id 校验
- task_center.py: retry_task_by_id 增加 created_by_user_id 校验
- 非任务创建者返回 403 Access denied
2026-06-29 17:19:13 +08:00
Audit Bot
ea9e536740
feat: 扩展生成任务API支持模板模式
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
方案A: 后端扩展3处API改动,支持前端模板中心化模型。
1. POST /api/v1/generation/tasks — project_id改为可选,新增template_id/asset_ids/title_ids/voice_ids
2. GET /api/v1/generation/tasks + GET /api/v1/tasks — 新增用户级列表(跨project)
3. POST /api/v1/tasks/{task_id}/retry + POST /api/v1/generation/tasks/{task_id}/retry — 简化重试
改动涉及:
- Domain: GenerationTask新增6个字段,放宽create()校验
- Application: CreateGenerationTaskCommand新增字段
- Ports: GenerationTaskRepository新增list_by_user()
- Adapter: SQLAlchemy模型+仓储实现新字段和list_by_user
- Schema: 双模式校验(project模式/模板模式)
- Routes: generation_tasks + task_center双路由注册
- Migration: 015_add_generation_task_extensions
向后兼容:所有旧端点和参数不变。
2026-06-29 17:05:53 +08:00
Audit Bot
9b6a0b8b14
fix: 修复代码审计5个问题 (P0-1,P0-2,P1-3,P1-4,P1-5)
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0-1: 剪辑模式使用 EditingMode 枚举,移除硬编码字符串
- voice_over_mix → voice_over, person_narration → voice_pip
- use_cases.py 导入 EditingMode 枚举替代硬编码 VALID_MODES
P0-2: 补充 packages/application/template/__init__.py
P1-3: Use Cases 依赖 TemplateRepositoryPort 而非 SQLAlchemyTemplateRepository
P1-4: generate 端点重命名为 validate(只校验不生成)
- GenerateFromTemplateUseCase → ValidateTemplateUseCase
- POST /{id}/generate → POST /{id}/validate
P1-5: 软删除模板时级联清理关联 segments,避免孤儿数据
测试全部通过 (21/21)
2026-06-29 14:44:24 +08:00
Audit Bot
62c8d1cdff
feat: 剪辑计划编辑器后端 — 模板 CRUD + 分类 + 生成校验
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- domain: Template, TemplateSegment, TemplateCategory 实体
- ports: TemplateRepositoryPort Protocol
- adapters: SQLAlchemyTemplateRepository + 3 个 ORM Model
- application: CRUD use cases + GenerateFromTemplateUseCase
- 业务规则: one_take=1片段, voice_over_mix=每段需material_type, 配音±30%警告
- schemas: Pydantic request/response models
- routes: /api/v1/templates CRUD + /generate + /categories
- alembic: 014_add_template_tables (templates/template_segments/template_categories)
- tests: 21 个单元测试全部通过
2026-06-29 14:14:58 +08:00
Audit Bot
f2e123a017
feat: 配方复用功能后端实现
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- domain: Recipe/RecipeItem 实体
- ports: RecipeRepository Protocol
- adapters: SQLAlchemy RecipeRepository 实现 + ORM models
- application: 6个 UseCase (CRUD + Use) + Commands
- API: 6个端点 POST/GET/PATCH/DELETE /recipes + POST /recipes/{id}/use
- feature flag: recipe_reuse 仅 basic/premium 可用
- Alembic 迁移: recipes + recipe_items 表
- 单元测试: 覆盖所有 UseCase
2026-06-29 10:59:05 +08:00
API文档维护Agent
47533e7037
fix: 修复标题/配音创建500、素材库列表500、CORS缺失
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- titles.py/voices.py: get_by_id → find_by_id(方法名错误导致AttributeError)
- project_repository.py: cast shared_users to JSONB for @> operator(JSON列不支持@>)
- main.py: CORS allow_origins 添加 https://saas.xiaoxiajianji.com
2026-06-28 21:33:07 +08:00