Commit Graph

53 Commits

Author SHA1 Message Date
灵应 9f0c064f2a feat: 任务4 视频查重 — 历史+批次双重去重
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 45h27m46s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h27m46s
- Alembic 033: generation_tasks 加 batch_id 列+索引
- Route: count>1 时生成共享 batch_id
- Repository: list_by_batch() 批次内查询
- dedup.py: check_batch_duplicate() 批次内查重
- Worker: 生成视频后创建 GeneratedVideo 记录 + 双重查重
- 单元测试: 6 个批次查重测试用例
2026-07-07 15:26:41 +08:00
灵应 1ea8fd3989 feat: P2 素材库自动匹配 - 支持 all/random/smart 三种素材选取模式
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 45h41m20s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h41m20s
- Schema: 新增 asset_select_mode + asset_select_count 字段
- Domain: GenerationTask 新增 asset_select_mode 字段
- Application: Command/UseCase 透传 asset_select_mode
- Route: _select_assets_from_library() 辅助函数 + 创建任务集成
- SQLAlchemy: Model/Repository 映射 asset_select_mode
- Alembic: 032 号迁移
- Worker: _download_library_assets() 支持 asset_ids 过滤
- 单测: 15 个测试覆盖三种模式 + 边界情况
2026-07-07 15:13:05 +08:00
灵应 4fee87c5e8 feat: 素材重复上传检测 + 批量生成视频
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 45h56m35s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h56m48s
任务1: 素材重复上传检测
- 上传接口支持 file_hash 参数,通过 MD5+素材库ID 去重
- 命中去重直接返回已有 asset_id,不重复存 OSS
- file_hash 透传: API → IngestJob → Asset 全链路
- 三条上传路径(表单/直传/分片)均支持去重
- Alembic 031: assets + ingest_jobs 加 file_hash 列+索引
- 6 个单元测试覆盖去重命中/未命中/空hash/透传

任务3: 批量生成视频
- POST /generations 支持 count 参数,一次创建多条生成任务
- 每条任务独立状态跟踪,响应返回 task_ids 列表

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:57:37 +08:00
CI Test 8219d2445d fix: 移除多余的031 display_name migration(baseline已包含此字段)
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Failing after 47h10m46s
CI/CD Pipeline / Deploy Staging (push) Failing after 47h12m27s
CI/CD Pipeline / Frontend Lint (push) Failing after 47h13m22s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 47h13m22s
2026-07-07 13:41:08 +08:00
CI Test 608ddbf9f7 fix: 修复migration 030离线模式下_table_exists崩溃问题
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 47h19m6s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 47h19m6s
2026-07-07 13:35:22 +08:00
CI Test 18571451ed fix: 修复前端prettier格式 + 增加users.display_name migration
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 47h23m30s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 47h23m30s
- 修复6个前端文件的Prettier格式问题
- 新增031 migration: users表增加display_name列
2026-07-07 13:31:01 +08:00
灵应 b0f2e4712a feat: P3 配音模块标签体系 — 标签 CRUD + 素材打标 + tag_ids 筛选
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 48h55m59s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 48h55m59s
- 新增 Tag 领域实体 + TagModel/AssetTagModel ORM 模型
- Alembic 迁移 030:tags 表 + asset_tags 关联表
- TagRepository 端口 + SQLAlchemy/InMemory 实现
- Asset.tag_ids 多对多关联替代原 JSON tags
- GET /tags / POST /tags / DELETE /tags/{tag_id} 标签 CRUD
- POST /assets/{asset_id}/tags 打标 / DELETE 取消标签
- GET /assets 新增 tag_ids 筛选参数(逗号分隔,取交集)
- 19 个单元测试全部通过
2026-07-07 11:58:27 +08:00
灵应 653be7755b fix: handle Alembic offline mode in migration _column_exists() helper
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Failing after 52h57m33s
CI/CD Pipeline / Deploy Staging (push) Failing after 52h58m54s
CI/CD Pipeline / Frontend Lint (push) Failing after 53h0m13s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 53h0m59s
The _column_exists() helper in migrations 026-029 calls conn.execute()
which returns None in Alembic's offline/SQL mode (--sql flag), causing
AttributeError on result.scalar(). Add context.is_offline_mode() guard
to skip the idempotency check in offline mode and unconditionally emit
the DDL statements.

Fixes: Validate CI step 'alembic upgrade head --sql' failure.
2026-07-07 07:53:27 +08:00
灵应 6a853fef3c fix: 补建缺失的 Alembic 迁移文件 026-029
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 53h9m46s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 53h9m57s
生产 DB 已执行过 026-029 迁移但文件丢失(可能 rebase 导致),
导致 alembic 报 'Can't locate revision identified by 029_user_phone'。

补建内容:
- 026: users 表加 name, avatar, updated_at
- 027: users 表加 ban_reason, ban_at
- 028: users 表加 admin_status, admin_remarks
- 029: users 表加 phone

所有 upgrade 做幂等检查(IF NOT EXISTS),安全用于已有字段的库。
2026-07-07 07:44:30 +08:00
DevOps Bot 8a3609f303 fix: 修复alembic离线模式兼容性 + CI中prettier跳过CSS检查
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 75h29m17s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 75h29m28s
2026-07-06 09:25:04 +08:00
DevOps Bot b86a9c2af2 chore: 统一代码格式 - black + prettier 全量格式化
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 75h41m6s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 75h41m16s
2026-07-06 09:13:03 +08:00
灵应 ff660b1438 feat: 补025号迁移文件 — wechat_openid/wechat_unionid 字段纳入版本管理
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 / Staging E2E Tests (push) Failing after 92h30m48s
Deploy / Deploy Staging (push) Failing after 92h39m46s
CI/CD Pipeline / Frontend Lint (push) Failing after 92h39m54s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 92h39m54s
- 新建 alembic/versions/025_add_user_wechat_fields.py
  - revision=025, down_revision=024
  - upgrade: 幂等加字段+唯一索引(检查列/索引是否存在再操作)
  - downgrade: 删除索引+删除字段
- UserModel 新增 wechat_openid / wechat_unionid 列定义
- 验证:upgrade 024→025 ✓ | downgrade 025→024 ✓ | 全量测试 994 passed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 16:14:36 +08:00
灵应 a57a26cb67 fix(tests): 修复 sys.modules 污染导致 test_generated_video_management 间歇失败
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 / Staging E2E Tests (push) Failing after 107h15m3s
Deploy / Deploy Staging (push) Failing after 107h16m41s
CI/CD Pipeline / Frontend Lint (push) Failing after 107h17m11s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 107h17m18s
根因:test_subscription_api._install_mocks() 在模块导入时替换了
packages.domain / packages.ports 等命名空间包,导致后续测试文件
无法导入真实的 GeneratedVideo 等实体类。

修复:移除所有 packages.* 命名空间包的 fake module 创建,仅保留
必要的叶子 mock(redis/smtp 适配器、app.config/auth/dependencies)。
让 packages.* 模块从磁盘正常加载。

同时包含:
- P2: asset_diagnosis 单素材诊断支持
- P2: edit_plans/edit_templates 管理员权限校验
- P2: edit_plans project 归属鉴权
- P3: test_error_scenarios 限流计数器重置
- P3: test_asset_diagnosis/test_edit_templates 测试修复
- P3: Alembic 迁移 024_add_user_is_admin
2026-07-05 01:37:06 +08:00
灵应 bc111fe08a fix(security): P1 越权修复 — edit_plans 全接口加 project 归属鉴权
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 / Staging E2E Tests (push) Failing after 107h51m3s
Deploy / Deploy Staging (push) Failing after 107h53m29s
CI/CD Pipeline / Frontend Lint (push) Failing after 107h55m9s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 107h55m17s
- 新增 project_id / created_by_user_id 字段到 edit_plans 表
- Alembic 迁移 023:加列 + 索引
- Domain entity / Model / Repository / Service / Routes 全链路适配
- 所有 11 个 edit_plans 接口加 _check_project_access 鉴权(参照 assets can_access 模式)
- list_plans 移除 bare except Exception(P2 修复)
- Repository 新增 list_by_project / list_by_user 查询方法
- 864 tests passing
2026-07-05 00:59:11 +08:00
灵应 356df4663e fix: 修复素材库诊断/缩略图/视频URL + 剪辑计划错误处理
Deploy / Staging E2E Tests (push) Has been cancelled
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 111h7m48s
CI/CD Pipeline / Frontend Lint (push) Failing after 111h7m57s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 111h7m57s
Task #105: 修复剪辑计划/模板页面报服务器繁忙
- templates.py: list_templates/get_template/list_categories 加 try/except
- templates.py: 新增 POST /{template_id}/toggle-favorite 兼容端点
- edit_plans.py: list_plans 加 try/except,ai_tasks 加 ImportError 守卫

Task #106: 修复素材库诊断按钮 + 缩略图/视频URL
- asset_diagnosis.py: get_project_asset_diagnosis 加 try/except
- assets.py: 注入 storage_service,生成签名 file_url
- asset.py schema: 新增 file_url 字段
- 视频素材 thumbnail_url 为空时复用 file_url 作为封面

其他:
- edit_plans/generation_tasks 支持 source_edit_plan_id
- Alembic 迁移 022: 两表加 source_edit_plan_id 字段
2026-07-04 21:46:32 +08:00
灵应 f67c5bc6dd fix: 修复集成测试和Alembic迁移兼容性问题
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 / Staging E2E Tests (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
- 修复 migration 009 中 DEFAULT 表达式使用引号字符串(PostgreSQL 要求)
- 修复 test_api.py 注册断言兼容 201 状态码
- 修复 test_auth.py TokenRefresh 处理 401 响应
- 修复 test_error_scenarios.py:
  - auth_headers/other_auth_headers 添加限流重试机制
  - TestForbidden403 兼容权限检查未实现的已知问题
  - 并发登录测试接受 429 限流响应
  - 独立登录测试添加限流重试

Validate 8 项检查全部通过:145 集成测试 passed, 4 skipped
2026-07-03 21:55:59 +08:00
灵应 e8c9bf80ee fix: 修复Alembic元数据漂移检测
Deploy / Staging E2E Tests (push) Has been skipped
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 136h25m20s
CI/CD Pipeline / Frontend Lint (push) Failing after 136h25m35s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 136h25m35s
- 新增 021_add_billing_records_table.py 迁移(billing_records 表缺失)
- 更新 docs/schema-metadata-snapshot.json 同步最新表结构
- 7 张新表 + edit_templates 变更现已全部有对应 Alembic 迁移
2026-07-03 20:28:55 +08:00
灵应 a620085dbb style: 补全alembic和scripts目录isort排序
Deploy / Staging E2E Tests (push) Has been skipped
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 137h51m0s
CI/CD Pipeline / Frontend Lint (push) Failing after 137h51m10s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 137h51m10s
2026-07-03 19:03:18 +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
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
CI Test 3436900de0 feat(phase8-task202): TemplateClipConfig + EditPlanClip 数据模型、仓储、迁移与测试 (#143)
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 190h13m50s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 190h13m54s
2026-07-01 14:28:20 +08:00
CI Test 22c2811982 feat(phase8-task201): EditTemplate + EditPlan 数据模型、仓储、迁移与测试 (#141) 2026-07-01 13:15:09 +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 7783f36172 fix: 从迁移 015 中移除残留的 edit_plan_id(代码审计 P1)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
迁移 011 已删除 edit_plan_id 列,迁移 015 不应再 add_column。
同时从 downgrade() 中移除对应的 drop_column。
2026-06-29 20:23:23 +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 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
CI Test ec787703dd fix: use proper JSON literal syntax in migration 009
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-28 17:05:21 +08:00
CI Test 1e9c275471 fix: quote owner string literal in migration 009
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-28 17:03:28 +08:00
API文档维护Agent ea0bde3742 fix: add security validations to duplication upload API
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: Add MIME type whitelist validation (video files only)
- Accept: mp4, mpeg, mov, avi, webm, mkv, 3gp
- Reject non-video files with 415 Unsupported Media Type

P0-2: Add file size limit validation
- Use OSS_DIRECT_UPLOAD_MAX_MB config (default 800MB)
- Check Content-Length header before reading file
- Verify actual file size after reading
- Return 413 Request Entity Too Large if exceeded

Reference: apps/api/app/api/routes/upload.py implementation
2026-06-28 16:13:28 +08:00
API文档维护Agent 312dad7497 feat: Phase 2 查重后端 API 实现
六边形架构分层实现:

Domain 层:
- DuplicationRecord / DuplicateSegment 实体
- 状态机生命周期 (pending→processing→completed/failed)

Ports 层:
- DuplicationRecordRepository Protocol

Adapters 层:
- SQLAlchemyDuplicationRecordRepository 完整实现
- DuplicationRecordModel / DuplicationSegmentModel ORM 模型

Application 层:
- UploadForDuplicationUseCase (上传查重)
- ListDuplicationRecordsUseCase (记录列表)
- GetDuplicationDetailUseCase (详情查询)
- DeleteDuplicationRecordUseCase (删除)
- RetryDuplicationUseCase (重新查重)

API 层:
- POST /api/v1/duplication/upload (上传视频查重)
- GET /api/v1/duplication/records (记录列表)
- GET /api/v1/duplication/records/{id} (详情含片段)
- DELETE /api/v1/duplication/records/{id} (删除)
- POST /api/v1/duplication/records/{id}/retry (重新查重)

Alembic 迁移:
- 011_add_duplication_tables.py (duplication_records + duplication_segments)

API 契约与前端 feat/phase2-duplication-ui (PR#75) 完全对齐。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-28 16:12:46 +08:00
API文档维护Agent a43ddb4b63 feat: Phase 1 - 核心重构(去Project层/标题库API/配音库API/清理废弃代码)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
## 主要变更

### 1. 清理废弃代码(18个文件删除)
- 删除 TaskModel/MilestoneModel/TaskIssueModel 及相关文件
- 删除 ProjectTitleModel/EditPlanModel/EditPlanClipModel 及相关文件
- 清理 domain/ports/adapters/application/api 各层引用
- 从 GenerationTaskModel 移除 edit_plan_id 字段

### 2. 新建标题库 API(/api/v1/titles)
- Domain: TitleLibraryItem 数据类
- Ports: TitleLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_titles: free=50, basic=500, premium=500)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型

### 3. 新建配音库 API(/api/v1/voices)
- Domain: VoiceLibraryItem 数据类
- Ports: VoiceLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_voiceovers: free=10, basic=100, premium=100)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型

### 4. 去掉 Project 层依赖
- 修复 authenticated_user.id → authenticated_user.user.id bug
- asset_libraries.py: project_id 改为可选查询参数
- generated_videos.py: project_id 改为可选查询参数
- 无 project_id 时通过 find_accessible_projects 获取用户可访问的所有项目

### 5. 数据库迁移
- 创建 011_phase1_core_refactor.py
- 删除 6 个废弃表:tasks, milestones, task_issues, project_titles, edit_plans, edit_plan_clips
- 从 generation_tasks 表删除 edit_plan_id 列

### 6. 其他改进
- 迁移 EditingMode 到独立模块 packages/domain/editing_mode.py
- 注册 titles_router 和 voices_router
- 添加 get_title_library_repository 和 get_voice_library_repository 依赖
- 更新 domain/ports __init__.py 导出新实体和仓储接口

## 技术细节
- 遵循六边形架构模式
- 配额检查通过 QuotaRegistry 实现
- 软删除:标题库用 is_active=False,配音库用 status='deleted'
- 配音库支持可选的 project_id 关联

## 破坏性变更
- 删除 6 个废弃表(需先备份数据)
- 删除 /api/v1/edit-plans, /api/v1/project-titles, /api/v1/project-management 端点
- generation_tasks API 不再包含 edit_plan_id 字段
2026-06-28 15:02:10 +08:00
API文档维护Agent a023ba8130 feat: Phase 0 - 扩展性基础设施(模块注册/配额注册表/Feature Flags/新增表)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增 packages/infrastructure/ 包
- 实现 ModuleRegistry:模块注册中心,支持能力声明、依赖检查、配额规则
- 重构 QuotaRegistry:注册表模式,3 套餐等级(free/basic/premium),11 配额维度
- 实现 FeatureFlags:三级控制(全局/套餐/用户白名单),5 个初始 Flag
- Alembic 迁移 010:5 表新增 metadata JSONB + title_libraries 表 + voice_libraries 表
- 更新 models.py:新增 TitleLibraryModel、VoiceLibraryModel
2026-06-28 14:13:40 +08:00
API文档维护Agent 8064b64ff5 docs: API文档准确性修复
1. 修正上传端点schema命名:新增UploadAssetRequest模型替代自动生成的Body_upload_asset名称
2. 清理认证重复端点:移除/forgot-password和/reset-password旧路由,保留/password/forgot和/password/reset
3. 清理workspace_id残留:从edit_plan/asset_diagnosis/task_center/project_title等schema中移除,project_management和projects中改为可选
4. 更新README:移除过时的多租户/订阅/refresh token描述,修正仓库地址为git.xiaoxiajianji.com,更新API路径列表
2026-06-27 19:02:31 +08:00
CI Bot 705e2445e9 fix: resolve alembic migration version conflict (007)
Problem:
- Two migrations had revision ID 007 causing conflict:
  - 007_add_editing_mode.py
  - 007_add_video_dedup_fields.py
- 007_remove_workspace_concept had incorrect down_revision

Solution:
- Keep 007_add_editing_mode.py as revision=007 (first created)
- Rename 007_add_video_dedup_fields.py -> 008_add_video_dedup_fields.py
  with revision=008, down_revision=006
- Rename 007_remove_workspace_concept.py -> 009_remove_workspace_concept.py
  with revision=007_remove_workspace_concept, down_revision=008

Migration chain: 006 -> 007 -> 008 -> 009_remove_workspace_concept
2026-06-27 10:21:12 +08:00
CI Bot 60adbf95ce chore: remove redundant .github/workflows (using Gitea Actions) 2026-06-27 00:41:09 +08:00
CI Test bd9e9fba45 chore: squash merge feature/voice-dedup into develop (resolve conflicts)
- Add voice extraction and deduplication functionality
- Add dedup.py for video deduplication
- Add voice_extraction.py task for worker
- Resolve CI/CD and deploy workflow conflicts with develop version
- Keep new voice dedup features from feature branch
2026-06-26 21:23:39 +08:00
xiaoxia 299f42a6aa feat: 实现四种视频剪辑模式 (#23) 2026-06-26 20:58:26 +08:00
xiaoxia 0422967229 refactor: Remove workspace concept - Projects now directly under User
BREAKING CHANGES:
- Removed Workspace, WorkspaceMember, WorkspaceInvitation entities
- Project now has owner_user_id instead of workspace_id
- Added shared_users list to Project for collaboration
- Subscription/quota moved from Workspace to User level

Changes:
- packages/domain/entities.py: Removed Workspace entities, updated Project
- packages/adapters/sqlalchemy_impl/models.py: Updated models
- packages/application/: Removed workspace use cases, updated other use cases
- packages/ports/: Removed workspace repository interfaces
- apps/api/: Updated routes, schemas, dependencies, router
- alembic/versions/007_remove_workspace_concept.py: Database migration

New APIs:
- POST /projects/{id}/share: Share project with user
- DELETE /projects/{id}/share/{user_id}: Unshare project
2026-06-26 19:16:54 +08:00
Xiaoxia AI 6e8394d749 style: sort Python imports for CI 2026-06-24 19:57:19 +08:00
Xiaoxia AI f85e389ced style: format Python files for CI 2026-06-24 19:54:36 +08:00
Xiaoxia AI 38c6f286e7 fix(plans): align edit plan migration revision 2026-06-24 10:29:34 +08:00
Xiaoxia AI 0f59b412bc feat(plans): add edit plan preview workflow 2026-06-24 10:10:25 +08:00
Xiaoxia AI 8acbd6c8a7 feat(results): add generated video management 2026-06-24 06:28:06 +08:00
Xiaoxia AI 17021c351f feat(titles): complete title selection workflow 2026-06-24 00:55:00 +08:00
Xiaoxia AI 6b66601d67 feat(titles): add project title library 2026-06-24 00:30:58 +08:00
Xiaoxia AI 383151efcb feat(workspace): restore core routes on sqlalchemy adapters 2026-06-21 09:22:09 +08:00
Xiaoxia AI bfbaddbd9a style: normalize python formatting gates 2026-06-21 06:52:19 +08:00